diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-03-04 09:00:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-04 15:17:11 +0300 |
commit | 7faef0547f4c29031a68d058918b031a8e520d49 (patch) | |
tree | ccd4d6b5a1643c62514cf24f6423433c713857e7 /net | |
parent | 215b0f1963d4e34fccac6992b3debe26f78a6eb8 (diff) | |
download | linux-7faef0547f4c29031a68d058918b031a8e520d49.tar.xz |
net: dev: add skb drop reasons to __dev_xmit_skb()
Add reasons for skb drops to __dev_xmit_skb() by replacing
kfree_skb_list() with kfree_skb_list_reason(). The drop reason of
SKB_DROP_REASON_QDISC_DROP is introduced for qdisc enqueue fails.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index ef0b1992cf13..e2c107643ee5 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3759,7 +3759,8 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, no_lock_out: if (unlikely(to_free)) - kfree_skb_list(to_free); + kfree_skb_list_reason(to_free, + SKB_DROP_REASON_QDISC_DROP); return rc; } @@ -3814,7 +3815,7 @@ no_lock_out: } spin_unlock(root_lock); if (unlikely(to_free)) - kfree_skb_list(to_free); + kfree_skb_list_reason(to_free, SKB_DROP_REASON_QDISC_DROP); if (unlikely(contended)) spin_unlock(&q->busylock); return rc; |