mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 16:29:05 +00:00
net: dev: use kfree_skb_reason() for sch_handle_egress()
Replace kfree_skb() used in sch_handle_egress() with kfree_skb_reason(). The drop reason SKB_DROP_REASON_TC_EGRESS is introduced. Considering the code path of tc egerss, we make it distinct with the drop reason of SKB_DROP_REASON_QDISC_DROP in the next commit. Signed-off-by: Menglong Dong <imagedong@tencent.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9f9919f73c
commit
98b4d7a4e7
@ -394,6 +394,7 @@ enum skb_drop_reason {
|
||||
* entry is full
|
||||
*/
|
||||
SKB_DROP_REASON_NEIGH_DEAD, /* neigh entry is dead */
|
||||
SKB_DROP_REASON_TC_EGRESS, /* dropped in TC egress HOOK */
|
||||
SKB_DROP_REASON_MAX,
|
||||
};
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
EM(SKB_DROP_REASON_NEIGH_FAILED, NEIGH_FAILED) \
|
||||
EM(SKB_DROP_REASON_NEIGH_QUEUEFULL, NEIGH_QUEUEFULL) \
|
||||
EM(SKB_DROP_REASON_NEIGH_DEAD, NEIGH_DEAD) \
|
||||
EM(SKB_DROP_REASON_TC_EGRESS, TC_EGRESS) \
|
||||
EMe(SKB_DROP_REASON_MAX, MAX)
|
||||
|
||||
#undef EM
|
||||
|
@ -3889,7 +3889,7 @@ sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
|
||||
case TC_ACT_SHOT:
|
||||
mini_qdisc_qstats_cpu_drop(miniq);
|
||||
*ret = NET_XMIT_DROP;
|
||||
kfree_skb(skb);
|
||||
kfree_skb_reason(skb, SKB_DROP_REASON_TC_EGRESS);
|
||||
return NULL;
|
||||
case TC_ACT_STOLEN:
|
||||
case TC_ACT_QUEUED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user