diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-23 13:00:48 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-23 13:00:48 -0700 |
commit | 406818ff347cbbdae2fb21fafd1939d00cf479c5 (patch) | |
tree | 02c6a4d90b4a810ed28a3e61e486cf00c9404bbd /net/bridge/br_input.c | |
parent | 16b8a4761cbe5082cd35641c066d7c4b6b83cdca (diff) | |
download | blackbird-op-linux-406818ff347cbbdae2fb21fafd1939d00cf479c5.tar.gz blackbird-op-linux-406818ff347cbbdae2fb21fafd1939d00cf479c5.zip |
bridge: 64bit rx/tx counters
Use u64_stats_sync infrastructure to provide 64bit rx/tx
counters even on 32bit hosts.
It is safe to use a single u64_stats_sync for rx and tx,
because BH is disabled on both, and we use per_cpu data.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r-- | net/bridge/br_input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index f076c9d79d5e..5fc1c5b1c360 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -27,8 +27,10 @@ static int br_pass_frame_up(struct sk_buff *skb) struct net_bridge *br = netdev_priv(brdev); struct br_cpu_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); indev = skb->dev; skb->dev = brdev; |