History

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.

Eric Dumazet committed 2 years ago

Commit 993498e1 parent 07938d73 files · +4 −3Browse files

Unified · Split

3 files
  1. Documentation/networking/net_cachelines/net_device.rst +1 −1
  2. include/linux/netdevice.h +1 −1
  3. net/core/dev.c +2 −1
Documentation/networking/net_cachelines/net_device.rst+1−1
@@ -38,7 +38,7 @@ netdev_features_t wanted_features · 37 unmodified lines
3838 netdev_features_t vlan_features
3939 netdev_features_t hw_enc_features - - netif_skb_features
4040 netdev_features_t mpls_features
41−netdev_features_t gso_partial_features
41+netdev_features_t gso_partial_features read_mostly gso_features_check
4242 unsigned_int min_mtu
4343 unsigned_int max_mtu
4444 unsigned_short type
include/linux/netdevice.h+1−1
@@ -2115,6 +2115,7 @@ struct net_device { · 2114 unmodified lines
21152115 const struct net_device_ops *netdev_ops;
21162116 const struct header_ops *header_ops;
21172117 struct netdev_queue *_tx;
2118+ netdev_features_t gso_partial_features;
21182119 unsigned int real_num_tx_queues;
21192120 unsigned int gso_max_size;
21202121 unsigned int gso_ipv4_max_size;
@@ -2211,7 +2212,6 @@ struct net_device { · 90 unmodified lines
22112212 netdev_features_t vlan_features;
22122213 netdev_features_t hw_enc_features;
22132214 netdev_features_t mpls_features;
2214− netdev_features_t gso_partial_features;
22152215
22162216 unsigned int min_mtu;
22172217 unsigned int max_mtu;
net/core/dev.c+2−1
@@ -11629,6 +11629,7 @@ static void __init net_dev_struct_check(void) · 11628 unmodified lines
1162911629 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_max_size);
1163011630 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, gso_ipv4_max_size);
1163111631 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);
1163211633 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, num_tc);
1163311634 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, mtu);
1163411635 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, needed_headroom);
@@ -11642,7 +11643,7 @@ static void __init net_dev_struct_check(void) · 7 unmodified lines
1164211643 #ifdef CONFIG_NET_XGRESS
1164311644 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, tcx_egress);
1164411645 #endif
11645− CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 152);
11646+ CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 160);
1164611647
1164711648 /* TXRX read-mostly hotpath */
1164811649 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t