From c852162ea931256284dcead244ad2dd0fbf14ed7 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Mon, 5 Oct 2020 22:36:34 +0200 Subject: xfrm: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Acked-by: Herbert Xu Signed-off-by: David S. Miller --- net/xfrm/xfrm_interface.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'net/xfrm') diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index a8f66112c52b..5b120936d82f 100644 --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c @@ -210,7 +210,6 @@ static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet) static int xfrmi_rcv_cb(struct sk_buff *skb, int err) { const struct xfrm_mode *inner_mode; - struct pcpu_sw_netstats *tstats; struct net_device *dev; struct xfrm_state *x; struct xfrm_if *xi; @@ -255,13 +254,7 @@ static int xfrmi_rcv_cb(struct sk_buff *skb, int err) } xfrmi_scrub_packet(skb, xnet); - - tstats = this_cpu_ptr(dev->tstats); - - u64_stats_update_begin(&tstats->syncp); - tstats->rx_packets++; - tstats->rx_bytes += skb->len; - u64_stats_update_end(&tstats->syncp); + dev_sw_netstats_rx_add(dev, skb->len); return 0; } -- cgit v1.2.3-58-ga151