xdp: generic XDP handling of xdp_rxq_info
Hook points for xdp_rxq_info: * reg : netif_alloc_rx_queues * unreg: netif_free_rx_queues The net_device have some members (num_rx_queues + real_num_rx_queues) and data-area (dev->_rx with struct netdev_rx_queue's) that were primarily used for exporting information about RPS (CONFIG_RPS) queues to sysfs (CONFIG_SYSFS). For generic XDP extend struct netdev_rx_queue with the xdp_rxq_info, and remove some of the CONFIG_SYSFS ifdefs. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:

committed by
Alexei Starovoitov

parent
754b8a21a9
commit
e817f85652
@@ -44,6 +44,7 @@
|
||||
#include <net/dcbnl.h>
|
||||
#endif
|
||||
#include <net/netprio_cgroup.h>
|
||||
#include <net/xdp.h>
|
||||
|
||||
#include <linux/netdev_features.h>
|
||||
#include <linux/neighbour.h>
|
||||
@@ -686,6 +687,7 @@ struct netdev_rx_queue {
|
||||
#endif
|
||||
struct kobject kobj;
|
||||
struct net_device *dev;
|
||||
struct xdp_rxq_info xdp_rxq;
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user