xdp: generic XDP handling of xdp_rxq_info
authorJesper Dangaard Brouer <brouer@redhat.com>
Wed, 3 Jan 2018 10:26:09 +0000 (11:26 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Jan 2018 23:21:22 +0000 (15:21 -0800)
commite817f85652c14d78f170b18797e4c477c78949e0
treee7e0441b32d7d8507b84476a359f5b67ebbb59c7
parent754b8a21a96d5f11712245aef907149606b323ae
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>
include/linux/netdevice.h
net/core/dev.c