]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: socket: rename SKB_DROP_REASON_SOCKET_FILTER
authorMenglong Dong <imagedong@tencent.com>
Thu, 27 Jan 2022 09:13:01 +0000 (17:13 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jan 2022 16:45:13 +0000 (08:45 -0800)
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@tencent.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/all/20220127091308.91401-2-imagedong@tencent.com/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/skbuff.h
include/trace/events/skb.h
net/ipv4/tcp_ipv4.c

index bf11e1fbd69b65660ca217c5d22623a9b7046e9c..8a636e678902db73ef95a1ce3effc8d3d160abb2 100644 (file)
@@ -318,7 +318,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_MAX,
 };
index 3e042ca2cedb506b32c31d26287c447386f1e085..a8a64b97504d8a5d0a743a58c4cd5cb2625f0a83 100644 (file)
@@ -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)                  \
        EMe(SKB_DROP_REASON_MAX, MAX)
 
index b3f34e366b27f7f1aece164aa485b1e9a7248d93..938b59636578e0a3c442be93d6796c2e1e9f80b3 100644 (file)
@@ -2095,7 +2095,7 @@ process:
        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;