Netdev List
 help / color / mirror / Atom feed
From: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: davem@davemloft.net, alexanderduyck@fb.com, kuba@kernel.org,
	kernel-team@meta.com, andrew+netdev@lunn.ch, edumazet@kernel.org,
	pabeni@redhat.com, willemb@google.com, horms@kernel.org,
	bjorn@kernel.org, bobbyeshleman@meta.com, almasrymina@google.com,
	daskald@meta.com, netdev@vger.kernel.org
Subject: Re: [PATCH net 2/4] net: add netif_disable_subqueue()
Date: Tue, 24 Nov 2026 09:43:10 -0800	[thread overview]
Message-ID: <78dbd822-291c-490d-9f4f-15de0b44de78@gmail.com> (raw)
In-Reply-To: <179552362454.3135.13950803840518714648@kernel.org>

On 11/24/26 4:33 AM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
> 
> Low priority / nit picks for your consideration:
> 
> - [Low] The commit message for "net: add netif_disable_subqueue()"
>   describes the patch as only adding a new helper ("Add a helper like…
> 
> --
> 
> net: add netif_disable_subqueue()
> 
> This commit adds netif_disable_subqueue(). The helper stops a single TX
> subqueue while holding that queue's xmit lock, so ndo_start_xmit() is no
> longer running on it when the helper returns. The commit also rewrites
> netif_tx_disable() so that it calls the new helper for each queue.
> 
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 435be7880d7e5..e716b98e8b4c8 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
> 
> [ ... ]
> 
>>  static inline void netif_tx_disable(struct net_device *dev)
>>  {
>>  	unsigned int i;
>> -	int cpu;
>>
>> -	local_bh_disable();
>> -	cpu = smp_processor_id();
>> -	spin_lock(&dev->tx_global_lock);
>> -	for (i = 0; i < dev->num_tx_queues; i++) {
>> -		struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
>> -
>> -		__netif_tx_lock(txq, cpu);
>> -		netif_tx_stop_queue(txq);
>> -		__netif_tx_unlock(txq);
>> -	}
>> -	spin_unlock(&dev->tx_global_lock);
>> -	local_bh_enable();
>> +	spin_lock_bh(&dev->tx_global_lock);
>> +	for (i = 0; i < dev->num_tx_queues; i++)
>> +		netif_disable_subqueue(dev, i);
>> +	spin_unlock_bh(&dev->tx_global_lock);
>>  }
> 
> [Severity: Low]
> This isn't a bug, but the commit message only talks about adding a new
> helper:
> 
>   Add a helper like netif_tx_disable() (which drivers commonly use
>   when stopping the interface) but for one queue.
> 
> It doesn't say that netif_tx_disable() itself is rewritten here.
> 
> The old body disabled BH once, read smp_processor_id() once, and used
> __netif_tx_lock(txq, cpu) for each queue. The new body uses
> spin_lock_bh(&dev->tx_global_lock) and calls netif_disable_subqueue()
> for each queue. That helper does its own nested
> __netif_tx_lock_bh()/__netif_tx_unlock_bh(), and it takes the queue
> index as u16 rather than the unsigned int loop counter.
> 
> As far as I can tell the behavior is unchanged. Still, every driver
> calling netif_tx_disable() on its stop path picks up this change.
> 
> Could the commit log mention the conversion? Something like "Convert
> netif_tx_disable() to use the new helper, no functional change
> intended." would be enough.
> 

If this series needs a re-spin, I'll address the change in the commit msg.



  reply	other threads:[~2026-11-24 17:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  3:32 [PATCH net 0/4] eth: fbnic: queue stop fixes Dimitri Daskalakis
2026-11-21  3:32 ` [PATCH net 1/4] eth: fbnic: restart queues in place when fbnic_queue_stop() fails Dimitri Daskalakis
2026-11-24 12:33   ` netdev-bot+sashiko
2026-11-24 17:42     ` Dimitri Daskalakis
2026-11-21  3:32 ` [PATCH net 2/4] net: add netif_disable_subqueue() Dimitri Daskalakis
2026-11-24 12:33   ` netdev-bot+sashiko
2026-11-24 17:43     ` Dimitri Daskalakis [this message]
2026-11-21  3:32 ` [PATCH net 3/4] eth: fbnic: wait for in-flight xmit in fbnic_queue_stop() Dimitri Daskalakis
2026-11-21  3:32 ` [PATCH net 4/4] eth: fbnic: wait for both TWQs of a Tx queue to go idle Dimitri Daskalakis

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=78dbd822-291c-490d-9f4f-15de0b44de78@gmail.com \
    --to=dimitri.daskalakis1@gmail.com \
    --cc=alexanderduyck@fb.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@kernel.org \
    --cc=bobbyeshleman@meta.com \
    --cc=daskald@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    /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