@@ -400,6 +400,10 @@ enum skb_drop_reason {
* failed (maybe an eBPF program
* is tricking?)
*/
+ SKB_DROP_REASON_QDISC_DROP, /* dropped by qdisc when packet
+ * outputting (failed to enqueue to
+ * current qdisc)
+ */
SKB_DROP_REASON_MAX,
};
@@ -44,6 +44,7 @@
EM(SKB_DROP_REASON_NEIGH_FAILED, NEIGH_FAILED) \
EM(SKB_DROP_REASON_NEIGH_QUEUEFULL, NEIGH_QUEUEFULL) \
EM(SKB_DROP_REASON_QDISC_EGRESS, QDISC_EGRESS) \
+ EM(SKB_DROP_REASON_QDISC_DROP, QDISC_DROP) \
EMe(SKB_DROP_REASON_MAX, MAX)
#undef EM
@@ -3710,7 +3710,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;
}
@@ -3765,7 +3766,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
}
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;