netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, sdf@fomichev.me,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 02/11] net: remove netif_set_real_num_rx_queues() helper for when SYSFS=n
Date: Wed, 12 Mar 2025 23:34:58 +0100	[thread overview]
Message-ID: <20250312223507.805719-3-kuba@kernel.org> (raw)
In-Reply-To: <20250312223507.805719-1-kuba@kernel.org>

Since commit a953be53ce40 ("net-sysfs: add support for device-specific
rx queue sysfs attributes"), so for at least a decade now it is safe
to call net_rx_queue_update_kobjects() when SYSFS=n. That function
does its own ifdef-inery and will return 0. Remove the unnecessary
stub for netif_set_real_num_rx_queues().

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 include/linux/netdevice.h | 10 ----------
 net/core/dev.c            |  2 --
 2 files changed, 12 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0dbfe069a6e3..2f344d5ad953 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4062,17 +4062,7 @@ static inline bool netif_is_multiqueue(const struct net_device *dev)
 }
 
 int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq);
-
-#ifdef CONFIG_SYSFS
 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 rxqs)
-{
-	dev->real_num_rx_queues = rxqs;
-	return 0;
-}
-#endif
 int netif_set_real_num_queues(struct net_device *dev,
 			      unsigned int txq, unsigned int rxq);
 
diff --git a/net/core/dev.c b/net/core/dev.c
index 0bf5af9706b1..3f35f3f8b2f1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3162,7 +3162,6 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
 }
 EXPORT_SYMBOL(netif_set_real_num_tx_queues);
 
-#ifdef CONFIG_SYSFS
 /**
  *	netif_set_real_num_rx_queues - set actual number of RX queues used
  *	@dev: Network device
@@ -3193,7 +3192,6 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
 	return 0;
 }
 EXPORT_SYMBOL(netif_set_real_num_rx_queues);
-#endif
 
 /**
  *	netif_set_real_num_queues - set actual number of RX and TX queues used
-- 
2.48.1


  parent reply	other threads:[~2025-03-12 22:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 22:34 [PATCH net-next 00/11] net: skip taking rtnl_lock for queue GET Jakub Kicinski
2025-03-12 22:34 ` [PATCH net-next 01/11] net: bubble up taking netdev instance lock to callers of net_devmem_unbind_dmabuf() Jakub Kicinski
2025-03-12 22:34 ` Jakub Kicinski [this message]
2025-03-12 22:34 ` [PATCH net-next 03/11] net: constify dev pointer in misc instance lock helpers Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 04/11] net: explain "protection types" for the instance lock Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 05/11] net: designate queue counts as "double ops protected" by " Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 06/11] net: designate queue -> napi linking as "ops protected" Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 07/11] net: protect rxq->mp_params with the instance lock Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 08/11] net: make NETDEV_UNREGISTER and instance lock more consistent Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 09/11] net: designate XSK pool pointers in queues as "ops protected" Jakub Kicinski
2025-03-13  8:28   ` Stanislav Fomichev
2025-03-19 21:51   ` Paolo Abeni
2025-03-12 22:35 ` [PATCH net-next 10/11] netdev: add "ops compat locking" helpers Jakub Kicinski
2025-03-12 22:35 ` [PATCH net-next 11/11] netdev: don't hold rtnl_lock over nl queue info get when possible Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250312223507.805719-3-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).