netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
	Mark Lee <Mark-MC.Lee@mediatek.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	upstream@airoha.com
Subject: Re: [PATCH net-next v2] net: airoha: Implement BQL support
Date: Tue, 15 Oct 2024 17:54:59 +0200	[thread overview]
Message-ID: <Zw6QUxpdnJtorc_e@lore-desk> (raw)
In-Reply-To: <20241015075255.7a50074f@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

On Oct 15, Jakub Kicinski wrote:
> On Tue, 15 Oct 2024 16:39:08 +0200 Lorenzo Bianconi wrote:
> > On Oct 15, Jakub Kicinski wrote:
> > > On Sat, 12 Oct 2024 11:01:11 +0200 Lorenzo Bianconi wrote:  
> > > > Introduce BQL support in the airoha_eth driver reporting to the kernel
> > > > info about tx hw DMA queues in order to avoid bufferbloat and keep the
> > > > latency small.  
> > > 
> > > TBH I haven't looked at the code again, but when I looked at v1 I was
> > > surprised you don't have a reset in airoha_qdma_cleanup_tx_queue().
> > > Are you sure it's okay? It's a common bug not to reset the BQL state
> > > when queue is purged while stopping the interface.  
> > 
> > So far airoha_qdma_cleanup_tx_queue() is called just in airoha_hw_cleanup()
> > that in turn runs just when the module is removed (airoha_remove()).
> > Do we need it?
> 
> Oh, thought its called on stop. In that case we're probably good
> from BQL perspective.
> 
> But does it mean potentially very stale packets can sit on the Tx
> ring when the device is stopped, until it's started again?

Do you mean the packets that the stack is transmitting when the .ndo_stop() is
run? 
In airoha_dev_stop() we call netif_tx_disable() to disable the transmission on
new packets and inflight packets will be consumed by the completion napi,
is it not enough? I guess we can even add netdev_tx_reset_subqueue() for all netdev
queues in airoha_dev_stop(), I do not have a strong opinion about it. What
do you prefer?

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-10-15 15:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-12  9:01 [PATCH net-next v2] net: airoha: Implement BQL support Lorenzo Bianconi
2024-10-15 14:32 ` Jakub Kicinski
2024-10-15 14:39   ` Lorenzo Bianconi
2024-10-15 14:52     ` Jakub Kicinski
2024-10-15 15:54       ` Lorenzo Bianconi [this message]
2024-10-15 16:09         ` Jakub Kicinski
2024-10-15 16:35           ` Lorenzo Bianconi
2024-10-15 16:49             ` Jakub Kicinski
2024-10-15 17:10 ` patchwork-bot+netdevbpf

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=Zw6QUxpdnJtorc_e@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=upstream@airoha.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;
as well as URLs for NNTP newsgroup(s).