diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-04-07 14:20:50 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-11 10:38:37 +0100 |
commit | 9f8ed577c28813410614b418bad42285840c1a00 (patch) | |
tree | ebd538fe93d4771296598cd60a4eb9a3c46d1138 /net/core/dev.c | |
parent | c1b8a56755ee121f9fa374de9eec36c91a7da25f (diff) | |
download | linux-9f8ed577c28813410614b418bad42285840c1a00.tar.bz2 |
net: skb: rename SKB_DROP_REASON_PTYPE_ABSENT
As David Ahern suggested, the reasons for skb drops should be more
general and not be code based.
Therefore, rename SKB_DROP_REASON_PTYPE_ABSENT to
SKB_DROP_REASON_UNHANDLED_PROTO, which is used for the cases of no
L3 protocol handler, no L4 protocol handler, version extensions, etc.
From previous discussion, now we have the aim to make these reasons
more abstract and users based, avoiding code based.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e027410e861b..ba853e878007 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5375,13 +5375,11 @@ check_vlan_id: *ppt_prev = pt_prev; } else { drop: - if (!deliver_exact) { + if (!deliver_exact) dev_core_stats_rx_dropped_inc(skb->dev); - kfree_skb_reason(skb, SKB_DROP_REASON_PTYPE_ABSENT); - } else { + else dev_core_stats_rx_nohandler_inc(skb->dev); - kfree_skb(skb); - } + kfree_skb_reason(skb, SKB_DROP_REASON_UNHANDLED_PROTO); /* Jamal, now you will not able to escape explaining * me how you were going to use this. :-) */ |