diff options
author | Fabian Frederick <fabf@skynet.be> | 2020-10-05 22:34:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-06 06:23:21 -0700 |
commit | 1f8dda1d26d31ed6e0a188936536e8811849a041 (patch) | |
tree | ec818c762599f50428681f3227329deb6b077fcb | |
parent | 451b05f413d3fd89ee84ae99a5029f619ed3cb78 (diff) |
vxlan: use dev_sw_netstats_rx_add()
use new helper for netstats settings
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/vxlan.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index be3bf233a809..1a557aeba32b 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1826,7 +1826,6 @@ static bool vxlan_ecn_decapsulate(struct vxlan_sock *vs, void *oiph, /* Callback from net/ipv4/udp.c to receive packets */ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) { - struct pcpu_sw_netstats *stats; struct vxlan_dev *vxlan; struct vxlan_sock *vs; struct vxlanhdr unparsed; @@ -1940,12 +1939,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) goto drop; } - stats = this_cpu_ptr(vxlan->dev->tstats); - u64_stats_update_begin(&stats->syncp); - stats->rx_packets++; - stats->rx_bytes += skb->len; - u64_stats_update_end(&stats->syncp); - + dev_sw_netstats_rx_add(vxlan->dev, skb->len); gro_cells_receive(&vxlan->gro_cells, skb); rcu_read_unlock(); |