Commit d3d344a1 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

net-device: move xdp_prog to net_device_read_rx

xdp_prog is used in receive path, both from XDP enabled drivers
and from netif_elide_gro().

This patch also removes two 4-bytes holes.

Fixes: 43a71cd6 ("net-device: reorganize net_device fast path variables")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Coco Li <lixiaoyan@google.com>
Cc: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240102162220.750823-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a562a027
...@@ -96,7 +96,7 @@ unsigned_char* dev_addr ...@@ -96,7 +96,7 @@ unsigned_char* dev_addr
struct_netdev_queue* _rx read_mostly - netdev_get_rx_queue(rx) struct_netdev_queue* _rx read_mostly - netdev_get_rx_queue(rx)
unsigned_int num_rx_queues unsigned_int num_rx_queues
unsigned_int real_num_rx_queues - read_mostly get_rps_cpu unsigned_int real_num_rx_queues - read_mostly get_rps_cpu
struct_bpf_prog* xdp_prog struct_bpf_prog* xdp_prog - read_mostly netif_elide_gro()
unsigned_long gro_flush_timeout - read_mostly napi_complete_done unsigned_long gro_flush_timeout - read_mostly napi_complete_done
int napi_defer_hard_irqs - read_mostly napi_complete_done int napi_defer_hard_irqs - read_mostly napi_complete_done
unsigned_int gro_max_size - read_mostly skb_gro_receive unsigned_int gro_max_size - read_mostly skb_gro_receive
......
...@@ -2150,6 +2150,7 @@ struct net_device { ...@@ -2150,6 +2150,7 @@ struct net_device {
/* RX read-mostly hotpath */ /* RX read-mostly hotpath */
__cacheline_group_begin(net_device_read_rx); __cacheline_group_begin(net_device_read_rx);
struct bpf_prog __rcu *xdp_prog;
struct list_head ptype_specific; struct list_head ptype_specific;
int ifindex; int ifindex;
unsigned int real_num_rx_queues; unsigned int real_num_rx_queues;
...@@ -2325,7 +2326,6 @@ struct net_device { ...@@ -2325,7 +2326,6 @@ struct net_device {
const unsigned char *dev_addr; const unsigned char *dev_addr;
unsigned int num_rx_queues; unsigned int num_rx_queues;
struct bpf_prog __rcu *xdp_prog;
#define GRO_LEGACY_MAX_SIZE 65536u #define GRO_LEGACY_MAX_SIZE 65536u
/* TCP minimal MSS is 8 (TCP_MIN_GSO_SIZE), /* TCP minimal MSS is 8 (TCP_MIN_GSO_SIZE),
* and shinfo->gso_segs is a 16bit field. * and shinfo->gso_segs is a 16bit field.
......
...@@ -11670,7 +11670,7 @@ static void __init net_dev_struct_check(void) ...@@ -11670,7 +11670,7 @@ static void __init net_dev_struct_check(void)
#ifdef CONFIG_NET_XGRESS #ifdef CONFIG_NET_XGRESS
CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, tcx_ingress); CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, tcx_ingress);
#endif #endif
CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_rx, 96); CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_rx, 104);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment