net: skb_free_datagram_locked() doesnt drop all packets
dropwatch wrongly diagnose all received UDP packets as drops. This patch removes trace_kfree_skb() done in skb_free_datagram_locked(). Locations calling skb_free_datagram_locked() should do it on their own. As a result, drops are accounted on the right function. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4c3af034fa
commit
22911fc581
4 changed files with 15 additions and 11 deletions
|
@ -108,6 +108,7 @@
|
|||
#include <net/xfrm.h>
|
||||
#include <trace/events/udp.h>
|
||||
#include <linux/static_key.h>
|
||||
#include <trace/events/skb.h>
|
||||
#include "udp_impl.h"
|
||||
|
||||
struct udp_table udp_table __read_mostly;
|
||||
|
@ -1220,8 +1221,10 @@ try_again:
|
|||
goto csum_copy_err;
|
||||
}
|
||||
|
||||
if (err)
|
||||
if (unlikely(err)) {
|
||||
trace_kfree_skb(skb, udp_recvmsg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (!peeked)
|
||||
UDP_INC_STATS_USER(sock_net(sk),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue