Skip to content

Commit

Permalink
net: move xdp_prog field in RX cache lines
Browse files Browse the repository at this point in the history
(struct net_device, xdp_prog) field should be moved in RX cache lines,
reducing latencies when a single packet is received on idle host,
since netif_elide_gro() needs it.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Apr 25, 2017
1 parent 5e1fc7c commit 7acedaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,7 @@ struct net_device {
unsigned int real_num_rx_queues;
#endif

struct bpf_prog __rcu *xdp_prog;
unsigned long gro_flush_timeout;
rx_handler_func_t __rcu *rx_handler;
void __rcu *rx_handler_data;
Expand Down Expand Up @@ -1905,7 +1906,6 @@ struct net_device {
struct lock_class_key *qdisc_tx_busylock;
struct lock_class_key *qdisc_running_key;
bool proto_down;
struct bpf_prog __rcu *xdp_prog;
};
#define to_net_dev(d) container_of(d, struct net_device, dev)

Expand Down

0 comments on commit 7acedaf

Please sign in to comment.