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>
This commit is contained in:
committed by
David S. Miller
parent
215b0f1963
commit
7faef0547f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user