Message ID | 20201005203634.55435-1-fabf@skynet.be |
---|---|
State | New |
Headers | show |
Series | None | expand |
On Mon, Oct 05, 2020 at 10:36:34PM +0200, Fabian Frederick wrote: > use new helper for netstats settings > > Signed-off-by: Fabian Frederick <fabf@skynet.be> > --- > net/xfrm/xfrm_interface.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) Acked-by: Herbert Xu <herbert@gondor.apana.org.au> -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index eb8181987620d..8f8631eafe784 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; }
use new helper for netstats settings Signed-off-by: Fabian Frederick <fabf@skynet.be> --- net/xfrm/xfrm_interface.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)