summaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2020-10-05 22:37:03 +0200
committerDavid S. Miller <davem@davemloft.net>2020-10-06 15:23:21 +0200
commite40b3727f90b186d5845c96b14f7a1e9f965b712 (patch)
treebafb6903479988417d94818fd59361245425d791 /net/openvswitch
parentxfrm: use dev_sw_netstats_rx_add() (diff)
downloadlinux-e40b3727f90b186d5845c96b14f7a1e9f965b712.tar.xz
linux-e40b3727f90b186d5845c96b14f7a1e9f965b712.zip
net: openvswitch: 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 'net/openvswitch')
-rw-r--r--net/openvswitch/vport-internal_dev.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 58a7b8312c28..d8fe66eea206 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -225,7 +225,6 @@ static void internal_dev_destroy(struct vport *vport)
static netdev_tx_t internal_dev_recv(struct sk_buff *skb)
{
struct net_device *netdev = skb->dev;
- struct pcpu_sw_netstats *stats;
if (unlikely(!(netdev->flags & IFF_UP))) {
kfree_skb(skb);
@@ -240,12 +239,7 @@ static netdev_tx_t internal_dev_recv(struct sk_buff *skb)
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, netdev);
skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
-
- stats = this_cpu_ptr(netdev->tstats);
- u64_stats_update_begin(&stats->syncp);
- stats->rx_packets++;
- stats->rx_bytes += skb->len;
- u64_stats_update_end(&stats->syncp);
+ dev_sw_netstats_rx_add(netdev, skb->len);
netif_rx(skb);
return NETDEV_TX_OK;