[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zw6QUxpdnJtorc_e@lore-desk>
Date: Tue, 15 Oct 2024 17:54:59 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Felix Fietkau <nbd@....name>, Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org,
upstream@...oha.com
Subject: Re: [PATCH net-next v2] net: airoha: Implement BQL support
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
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists