diff options
author | Fabian Frederick <fabf@skynet.be> | 2020-10-05 22:34:58 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-06 06:23:21 -0700 |
commit | 1e84527b7fa92496ac7fbee9f8c3557e7fe1ecb1 (patch) | |
tree | 8f96a7d35e298ef8594f3d1389b09792532be73e /drivers | |
parent | 1f8dda1d26d31ed6e0a188936536e8811849a041 (diff) |
geneve: 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/geneve.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 974a244f45ba..d07008a818df 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -217,7 +217,6 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs, { struct genevehdr *gnvh = geneve_hdr(skb); struct metadata_dst *tun_dst = NULL; - struct pcpu_sw_netstats *stats; unsigned int len; int err = 0; void *oiph; @@ -296,13 +295,9 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs, len = skb->len; err = gro_cells_receive(&geneve->gro_cells, skb); - if (likely(err == NET_RX_SUCCESS)) { - stats = this_cpu_ptr(geneve->dev->tstats); - u64_stats_update_begin(&stats->syncp); - stats->rx_packets++; - stats->rx_bytes += len; - u64_stats_update_end(&stats->syncp); - } + if (likely(err == NET_RX_SUCCESS)) + dev_sw_netstats_rx_add(geneve->dev, len); + return; drop: /* Consume bad packet */ |