diff options
author | 2020-11-20 12:22:23 +0100 | |
---|---|---|
committer | 2020-11-21 14:40:50 -0800 | |
commit | 7609ecb2ed2868a253ca5ea995d845802dbf1865 (patch) | |
tree | 82b7685a1c1042a71838b91e66171b1a05b9c735 /net/bridge/br_input.c | |
parent | Merge branch 'net-hns3-misc-updates-for-next' (diff) | |
download | linux-7609ecb2ed2868a253ca5ea995d845802dbf1865.tar.gz linux-7609ecb2ed2868a253ca5ea995d845802dbf1865.tar.bz2 linux-7609ecb2ed2868a253ca5ea995d845802dbf1865.zip |
net: bridge: switch to net core statistics counters handling
Use netdev->tstats instead of a member of net_bridge for storing
a pointer to the per-cpu counters. This allows us to use core
functionality for statistics handling.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/9bad2be2-fd84-7c6e-912f-cee433787018@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r-- | net/bridge/br_input.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 21808985f268..8ca1f1bc6d12 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -35,12 +35,8 @@ static int br_pass_frame_up(struct sk_buff *skb) struct net_device *indev, *brdev = BR_INPUT_SKB_CB(skb)->brdev; struct net_bridge *br = netdev_priv(brdev); struct net_bridge_vlan_group *vg; - struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); - u64_stats_update_begin(&brstats->syncp); - brstats->rx_packets++; - brstats->rx_bytes += skb->len; - u64_stats_update_end(&brstats->syncp); + dev_sw_netstats_rx_add(brdev, skb->len); vg = br_vlan_group_rcu(br); /* Bridge is just like any other port. Make sure the |