net-device: move lstats in net_device_read_txrx
authorEric Dumazet <edumazet@google.com>
Thu, 8 Feb 2024 14:43:23 +0000 (14:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Feb 2024 09:51:26 +0000 (09:51 +0000)
commitc353c7b7ffb7ae6ed8f3339906fe33c8be6cf344
tree3989289e35fc370cf94ec076fa44970fcceffe10
parent666a877deab2bcf8fd11c962d69e687e18168a6f
net-device: move lstats in net_device_read_txrx

dev->lstats is notably used from loopback ndo_start_xmit()
and other virtual drivers.

Per cpu stats updates are dirtying per-cpu data,
but the pointer itself is read-only.

Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Coco Li <lixiaoyan@google.com>
Cc: Simon Horman <horms@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/net_cachelines/net_device.rst
include/linux/netdevice.h
net/core/dev.c