[Devel] [PATCH RHEL9 COMMIT] net: socket: rename SKB_DROP_REASON_SOCKET_FILTER

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jan 16 20:56:40 MSK 2023


The commit is pushed to "branch-rh9-5.14.0-162.6.1.vz9.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-162.6.1.vz9.18.2
------>
commit 5e1c7df1f2399999a7db1d5252df9344bbc5ca50
Author: Menglong Dong <imagedong at tencent.com>
Date:   Tue Jan 3 17:39:01 2023 +0200

    net: socket: rename SKB_DROP_REASON_SOCKET_FILTER
    
    Rename SKB_DROP_REASON_SOCKET_FILTER, which is used
    as the reason of skb drop out of socket filter before
    it's part of a released kernel. It will be used for
    more protocols than just TCP in future series.
    
    Signed-off-by: Menglong Dong <imagedong at tencent.com>
    Reviewed-by: David Ahern <dsahern at kernel.org>
    Link: https://lore.kernel.org/all/20220127091308.91401-2-imagedong@tencent.com/
    Signed-off-by: Jakub Kicinski <kuba at kernel.org>
    Acked-by: Nikolay Borisov <nborisov at suse.com>
    Signed-off-by: Nikolay Borisov <nikolay.borisov at virtuozzo.com>
    
    ======
    Patchset description:
    ms/net: Annotate skb free sites with reason
    
    This series backports most of the patches that add a reason to skb free sites.
    
    https://jira.sw.ru/browse/PSBM-143302
    
    Feature: net: improve verbosity of dropped packets reporting
---
 include/linux/skbuff.h     | 2 +-
 include/trace/events/skb.h | 2 +-
 net/ipv4/tcp_ipv4.c        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index aa7bed26bb0d..10505942655f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -316,7 +316,7 @@ enum skb_drop_reason {
 	SKB_DROP_REASON_NO_SOCKET,
 	SKB_DROP_REASON_PKT_TOO_SMALL,
 	SKB_DROP_REASON_TCP_CSUM,
-	SKB_DROP_REASON_TCP_FILTER,
+	SKB_DROP_REASON_SOCKET_FILTER,
 	SKB_DROP_REASON_UDP_CSUM,
 	SKB_DROP_REASON_NETFILTER_DROP, /* dropped by netfilter */
 	SKB_DROP_REASON_OTHERHOST,      /* packet don't belong to current
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 92ee7d674725..381840c1c7c1 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -14,7 +14,7 @@
 	EM(SKB_DROP_REASON_NO_SOCKET, NO_SOCKET)		\
 	EM(SKB_DROP_REASON_PKT_TOO_SMALL, PKT_TOO_SMALL)	\
 	EM(SKB_DROP_REASON_TCP_CSUM, TCP_CSUM)			\
-	EM(SKB_DROP_REASON_TCP_FILTER, TCP_FILTER)		\
+	EM(SKB_DROP_REASON_SOCKET_FILTER, SOCKET_FILTER)	\
 	EM(SKB_DROP_REASON_UDP_CSUM, UDP_CSUM)			\
 	EM(SKB_DROP_REASON_NETFILTER_DROP, NETFILTER_DROP)	\
 	EM(SKB_DROP_REASON_OTHERHOST, OTHERHOST)                \
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index a06a273139bb..4af44bb8228c 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2083,7 +2083,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
 	nf_reset_ct(skb);
 
 	if (tcp_filter(sk, skb)) {
-		drop_reason = SKB_DROP_REASON_TCP_FILTER;
+		drop_reason = SKB_DROP_REASON_SOCKET_FILTER;
 		goto discard_and_relse;
 	}
 	th = (const struct tcphdr *)skb->data;


More information about the Devel mailing list