Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net-device: move gso_partial_features to net_device_read_tx

dev->gso_partial_features is read from tx fast path for GSO packets.

Move it to appropriate section to avoid a cache line miss.

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: David Ahern <dsahern@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
993498e5 07938d77

+4 -3
+1 -1
Documentation/networking/net_cachelines/net_device.rst
··· 38 38 netdev_features_t vlan_features 39 39 netdev_features_t hw_enc_features - - netif_skb_features 40 40 netdev_features_t mpls_features 41 - netdev_features_t gso_partial_features 41 + netdev_features_t gso_partial_features read_mostly gso_features_check 42 42 unsigned_int min_mtu 43 43 unsigned_int max_mtu 44 44 unsigned_short type
+1 -1
include/linux/netdevice.h
··· 2115 2115 const struct net_device_ops *netdev_ops; 2116 2116 const struct header_ops *header_ops; 2117 2117 struct netdev_queue *_tx; 2118 + netdev_features_t gso_partial_features; 2118 2119 unsigned int real_num_tx_queues; 2119 2120 unsigned int gso_max_size; 2120 2121 unsigned int gso_ipv4_max_size; ··· 2212 2211 netdev_features_t vlan_features; 2213 2212 netdev_features_t hw_enc_features; 2214 2213 netdev_features_t mpls_features; 2215 - netdev_features_t gso_partial_features; 2216 2214 2217 2215 unsigned int min_mtu; 2218 2216 unsigned int max_mtu;
+2 -1
net/core/dev.c
··· 11629 11629 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_max_size); 11630 11630 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_ipv4_max_size); 11631 11631 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_max_segs); 11632 + CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_partial_features); 11632 11633 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, num_tc); 11633 11634 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, mtu); 11634 11635 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, needed_headroom); ··· 11643 11642 #ifdef CONFIG_NET_XGRESS 11644 11643 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, tcx_egress); 11645 11644 #endif 11646 - CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 152); 11645 + CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 160); 11647 11646 11648 11647 /* TXRX read-mostly hotpath */ 11649 11648 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags);