mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
packet: report tx_dropped in packet_direct_xmit
Since commit 015f0688f5
("net: net: add a core netdev->tx_dropped
counter"), we can now account for TX drops from within the core
stack instead of drivers.
Therefore, fix packet_direct_xmit() and increase drop count when we
encounter a problem before driver's xmit function was called (we do
not want to doubly account for it).
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bdab82759b
commit
0f97ede45e
1 changed files with 1 additions and 0 deletions
|
@ -275,6 +275,7 @@ static int packet_direct_xmit(struct sk_buff *skb)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
drop:
|
drop:
|
||||||
|
atomic_long_inc(&dev->tx_dropped);
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return NET_XMIT_DROP;
|
return NET_XMIT_DROP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue