netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Lorenzo Bianconi <lorenzo@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 09:09:52 -0700	[thread overview]
Message-ID: <20241015090952.6bcb5856@kernel.org> (raw)
In-Reply-To: <Zw6QUxpdnJtorc_e@lore-desk>

On Tue, 15 Oct 2024 17:54:59 +0200 Lorenzo Bianconi wrote:
> > 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?

Whatever is in the queue at the time ndo_stop() gets called.
Could be the full descriptor ring I presume?

> 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?

They will only get consumed if the DMA gets to them right?
Stop seems to stop the DMA.

> 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?

So to be clear I think this patch is correct as of the current driver
code. I'm just wondering if we should call airoha_qdma_cleanup_tx_queue()
on stop as well, and then that should come with the reset.
I think having a packet stuck in a queue may lead to all sort of oddness
so my recommendation would be to flush the queues.

  reply	other threads:[~2024-10-15 16:09 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
2024-10-15 16:09         ` Jakub Kicinski [this message]
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=20241015090952.6bcb5856@kernel.org \
    --to=kuba@kernel.org \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo@kernel.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).