summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_tunnel.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-06-08 18:46:35 +0300
committerJakub Kicinski <kuba@kernel.org>2022-06-10 07:53:10 +0300
commitafd2051b18404640a116fd3bb2460da214ccbda4 (patch)
tree298feb2c102adaf03f091041ee15ab10baad6883 /net/ipv6/ip6_tunnel.c
parent3a960ca7f6e538fba63e3d47c21eeb6bbd7289dd (diff)
downloadlinux-afd2051b18404640a116fd3bb2460da214ccbda4.tar.xz
ip6_tunnel: 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/ip6_tunnel.c')
-rw-r--r--net/ipv6/ip6_tunnel.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 689de5eb604e..c7279f205817 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -796,7 +796,6 @@ static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
struct sk_buff *skb),
bool log_ecn_err)
{
- struct pcpu_sw_netstats *tstats;
const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
int err;
@@ -856,11 +855,7 @@ static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, 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);
skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev)));