diff options
author | Eric Dumazet <edumazet@google.com> | 2022-06-08 08:46:34 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-09 21:53:10 -0700 |
commit | 3a960ca7f6e538fba63e3d47c21eeb6bbd7289dd (patch) | |
tree | 555f4815e5e250eb597db3302f91823b64e1090b /net/ipv6 | |
parent | 5665f48ef309d0189e97353a294b54af5d4a726c (diff) |
sit: use dev_sw_netstats_rx_add()
We have a convenient helper, let's use it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/sit.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 4f1721865fda..fab89fd978f0 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -686,8 +686,6 @@ static int ipip6_rcv(struct sk_buff *skb) tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev, iph->saddr, iph->daddr, sifindex); if (tunnel) { - struct pcpu_sw_netstats *tstats; - if (tunnel->parms.iph.protocol != IPPROTO_IPV6 && tunnel->parms.iph.protocol != 0) goto out; @@ -724,11 +722,7 @@ static int ipip6_rcv(struct sk_buff *skb) } } - tstats = this_cpu_ptr(tunnel->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(tunnel->dev, skb->len); netif_rx(skb); |