From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 1/3] net: update real_num_rx_queues even when !CONFIG_SYSFS Date: Mon, 30 Jul 2018 20:43:51 -0700 Message-ID: <20180731034353.3774-2-jakub.kicinski@netronome.com> References: <20180731034353.3774-1-jakub.kicinski@netronome.com> Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, bjorn.topel@intel.com, Jakub Kicinski To: davem@davemloft.net, alexei.starovoitov@gmail.com, daniel@iogearbox.net Return-path: Received: from mail-qt0-f196.google.com ([209.85.216.196]:46377 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbeGaFWb (ORCPT ); Tue, 31 Jul 2018 01:22:31 -0400 Received: by mail-qt0-f196.google.com with SMTP id d4-v6so14505850qtn.13 for ; Mon, 30 Jul 2018 20:44:22 -0700 (PDT) In-Reply-To: <20180731034353.3774-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- include/linux/netdevice.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9c917467a2c7..3bf7e93c9e96 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 -- 2.17.1