From: Jakub Kicinski Date: Tue, 31 Jul 2018 03:43:51 +0000 (-0700) Subject: net: update real_num_rx_queues even when !CONFIG_SYSFS X-Git-Tag: v4.19-rc1~140^2~186^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c29c2ebd2ae0066c026045a21aa33ccbfcd8bb3c;p=thirdparty%2Fkernel%2Flinux.git net: update real_num_rx_queues even when !CONFIG_SYSFS We used to depend on real_num_rx_queues as a upper bound for sanity checks. For AF_XDP socket validation it's useful if the check behaves the same regardless of CONFIG_SYSFS setting. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9c917467a2c75..3bf7e93c9e968 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3431,8 +3431,9 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq); int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq); #else static inline int netif_set_real_num_rx_queues(struct net_device *dev, - unsigned int rxq) + unsigned int rxqs) { + dev->real_num_rx_queues = rxqs; return 0; } #endif