net: move dev->state into net_device_read_txrx group
Subsystems (3)
PATCH 1/1 net: move dev->state into net_device_read_txrx group
dev->state can be read in rx and tx fast paths.
netif_running() which needs dev->state is called from
- enqueue_to_backlog() [RX path]
- __dev_direct_xmit() [TX path]
--- Documentation/networking/net_cachelines/net_device.rst | 2 +- include/linux/netdevice.h | 2 +- net/core/dev.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-)
Documentation/networking/net_cachelines/net_device.rst +1 -1
@@ -13,7 +13,7 @@ struct_dev_ifalias* ifalias unsigned_long mem_end unsigned_long mem_start unsigned_long base_addr -unsigned_long state +unsigned_long state read_mostly read_mostly netif_running(dev) struct_list_head dev_list struct_list_head napi_list struct_list_head unreg_list
include/linux/netdevice.h +1 -1
@@ -2072,6 +2072,7 @@ struct net_device {struct pcpu_sw_netstats __percpu *tstats;struct pcpu_dstats __percpu *dstats; }; +unsigned long state;unsigned int flags;unsigned short hard_header_len;netdev_features_t features;
@@ -2117,7 +2118,6 @@ struct net_device {* part of the usual set specified in Space.c. */ -unsigned long state;struct list_head dev_list;struct list_head napi_list;
net/core/dev.c +2 -1
@@ -11665,11 +11665,12 @@ static void __init net_dev_struct_check(void)/* TXRX read-mostly hotpath */ CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, lstats); + CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, state); CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags); CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, hard_header_len); CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, features); CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, ip6_ptr); - CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 38); + CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 46);/* RX read-mostly hotpath */ CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, ptype_specific);
Signature · 1 line
2.44.0.291.gc1ea87d7ee-goog
Quoted 8 lines · Thu, Mar 14, 2024 at 09:08:45PM CET, [email protected] wrote:
dev->statecan be read in rx and tx fast paths.
netif_running()which needsdev->stateis called from
-enqueue_to_backlog()[RX path]
-__dev_direct_xmit()[TX path]Fixes 43a71cd66b9c ("net-device: reorganize net_device fast path variables")Signed-off-by Eric Dumazet <[email protected]>
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 11 lines · On Thu, 14 Mar 2024 20:08:45 +0000 you wrote:
dev->statecan be read in rx and tx fast paths.
netif_running()which needsdev->stateis called from
-enqueue_to_backlog()[RX path]
-__dev_direct_xmit()[TX path]Fixes 43a71cd66b9c ("net-device: reorganize net_device fast path variables")Signed-off-by Eric Dumazet <[email protected]>Cc Coco Li <[email protected]>[...]
Here is the summary with links:
- [net] net: move dev->state into net_device_read_txrx group
https://git.kernel.org/netdev/net/c/f6e0a4984c2e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html