* [PATCH net-next] net: xilinx: axienet: Implement BQL
@ 2025-02-14 21:12 Sean Anderson
2025-02-15 11:32 ` Gupta, Suraj
2025-02-19 2:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 8+ messages in thread
From: Sean Anderson @ 2025-02-14 21:12 UTC (permalink / raw)
To: Radhey Shyam Pandey, netdev
Cc: linux-kernel, Paolo Abeni, David S . Miller, Jakub Kicinski,
Michal Simek, linux-arm-kernel, Eric Dumazet, Andrew Lunn,
Sean Anderson
Implement byte queue limits to allow queueing disciplines to account for
packets enqueued in the ring buffers but not yet transmitted.
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 0673b2694e4c..7406e00de0fb 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1002,6 +1002,7 @@ static int axienet_tx_poll(struct napi_struct *napi, int budget)
&size, budget);
if (packets) {
+ netdev_completed_queue(ndev, packets, size);
u64_stats_update_begin(&lp->tx_stat_sync);
u64_stats_add(&lp->tx_packets, packets);
u64_stats_add(&lp->tx_bytes, size);
@@ -1125,6 +1126,7 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
if (++new_tail_ptr >= lp->tx_bd_num)
new_tail_ptr = 0;
WRITE_ONCE(lp->tx_bd_tail, new_tail_ptr);
+ netdev_sent_queue(ndev, skb->len);
/* Start the transfer */
axienet_dma_out_addr(lp, XAXIDMA_TX_TDESC_OFFSET, tail_p);
@@ -1751,6 +1753,7 @@ static int axienet_stop(struct net_device *ndev)
dma_release_channel(lp->tx_chan);
}
+ netdev_reset_queue(ndev);
axienet_iow(lp, XAE_IE_OFFSET, 0);
if (lp->eth_irq > 0)
@@ -2676,6 +2679,7 @@ static void axienet_dma_err_handler(struct work_struct *work)
~(XAE_OPTION_TXEN | XAE_OPTION_RXEN));
axienet_dma_stop(lp);
+ netdev_reset_queue(ndev);
for (i = 0; i < lp->tx_bd_num; i++) {
cur_p = &lp->tx_bd_v[i];
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 8+ messages in thread* RE: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-14 21:12 [PATCH net-next] net: xilinx: axienet: Implement BQL Sean Anderson
@ 2025-02-15 11:32 ` Gupta, Suraj
2025-02-18 16:00 ` Sean Anderson
2025-02-19 2:10 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 8+ messages in thread
From: Gupta, Suraj @ 2025-02-15 11:32 UTC (permalink / raw)
To: Sean Anderson, Pandey, Radhey Shyam, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
> -----Original Message-----
> From: Sean Anderson <sean.anderson@linux.dev>
> Sent: Saturday, February 15, 2025 2:43 AM
> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
> netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Paolo Abeni <pabeni@redhat.com>; David S .
> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Simek, Michal
> <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; Eric Dumazet
> <edumazet@google.com>; Andrew Lunn <andrew+netdev@lunn.ch>; Sean
> Anderson <sean.anderson@linux.dev>
> Subject: [PATCH net-next] net: xilinx: axienet: Implement BQL
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Implement byte queue limits to allow queueing disciplines to account for packets
> enqueued in the ring buffers but not yet transmitted.
>
Could you please check if BQL can be implemented for DMAengine flow?
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 0673b2694e4c..7406e00de0fb 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1002,6 +1002,7 @@ static int axienet_tx_poll(struct napi_struct *napi, int
> budget)
> &size, budget);
>
> if (packets) {
> + netdev_completed_queue(ndev, packets, size);
> u64_stats_update_begin(&lp->tx_stat_sync);
> u64_stats_add(&lp->tx_packets, packets);
> u64_stats_add(&lp->tx_bytes, size); @@ -1125,6 +1126,7 @@
> axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
> if (++new_tail_ptr >= lp->tx_bd_num)
> new_tail_ptr = 0;
> WRITE_ONCE(lp->tx_bd_tail, new_tail_ptr);
> + netdev_sent_queue(ndev, skb->len);
>
> /* Start the transfer */
> axienet_dma_out_addr(lp, XAXIDMA_TX_TDESC_OFFSET, tail_p); @@ -
> 1751,6 +1753,7 @@ static int axienet_stop(struct net_device *ndev)
> dma_release_channel(lp->tx_chan);
> }
>
> + netdev_reset_queue(ndev);
> axienet_iow(lp, XAE_IE_OFFSET, 0);
>
> if (lp->eth_irq > 0)
> @@ -2676,6 +2679,7 @@ static void axienet_dma_err_handler(struct work_struct
> *work)
> ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN));
>
> axienet_dma_stop(lp);
> + netdev_reset_queue(ndev);
>
> for (i = 0; i < lp->tx_bd_num; i++) {
> cur_p = &lp->tx_bd_v[i];
> --
> 2.35.1.1320.gc452695387.dirty
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-15 11:32 ` Gupta, Suraj
@ 2025-02-18 16:00 ` Sean Anderson
2025-02-18 16:16 ` Andrew Lunn
2025-02-20 16:58 ` Sean Anderson
0 siblings, 2 replies; 8+ messages in thread
From: Sean Anderson @ 2025-02-18 16:00 UTC (permalink / raw)
To: Gupta, Suraj, Pandey, Radhey Shyam, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
On 2/15/25 06:32, Gupta, Suraj wrote:
>
>
>> -----Original Message-----
>> From: Sean Anderson <sean.anderson@linux.dev>
>> Sent: Saturday, February 15, 2025 2:43 AM
>> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
>> netdev@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org; Paolo Abeni <pabeni@redhat.com>; David S .
>> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Simek, Michal
>> <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; Eric Dumazet
>> <edumazet@google.com>; Andrew Lunn <andrew+netdev@lunn.ch>; Sean
>> Anderson <sean.anderson@linux.dev>
>> Subject: [PATCH net-next] net: xilinx: axienet: Implement BQL
>>
>> Caution: This message originated from an External Source. Use proper caution
>> when opening attachments, clicking links, or responding.
>>
>>
>> Implement byte queue limits to allow queueing disciplines to account for packets
>> enqueued in the ring buffers but not yet transmitted.
>>
>
> Could you please check if BQL can be implemented for DMAengine flow?
I can have a look, but TBH I do not test the dma engine configuration since it is
so much slower.
--Sean
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-18 16:00 ` Sean Anderson
@ 2025-02-18 16:16 ` Andrew Lunn
2025-02-18 16:18 ` Sean Anderson
2025-02-20 16:58 ` Sean Anderson
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2025-02-18 16:16 UTC (permalink / raw)
To: Sean Anderson
Cc: Gupta, Suraj, Pandey, Radhey Shyam, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
> > Could you please check if BQL can be implemented for DMAengine flow?
>
> I can have a look, but TBH I do not test the dma engine configuration since it is
> so much slower.
It might actually benefit more from BQL if it is slower?
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-18 16:16 ` Andrew Lunn
@ 2025-02-18 16:18 ` Sean Anderson
0 siblings, 0 replies; 8+ messages in thread
From: Sean Anderson @ 2025-02-18 16:18 UTC (permalink / raw)
To: Andrew Lunn
Cc: Gupta, Suraj, Pandey, Radhey Shyam, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
On 2/18/25 11:16, Andrew Lunn wrote:
>> > Could you please check if BQL can be implemented for DMAengine flow?
>>
>> I can have a look, but TBH I do not test the dma engine configuration since it is
>> so much slower.
>
> It might actually benefit more from BQL if it is slower?
Actually, it will benefit less. The hardware is the same, so the
slowdown is entirely due to extra CPU overhead. From the CPU's
perspective, the queues actually drain faster than normal.
--Sean
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-18 16:00 ` Sean Anderson
2025-02-18 16:16 ` Andrew Lunn
@ 2025-02-20 16:58 ` Sean Anderson
2025-02-20 19:46 ` Gupta, Suraj
1 sibling, 1 reply; 8+ messages in thread
From: Sean Anderson @ 2025-02-20 16:58 UTC (permalink / raw)
To: Gupta, Suraj, Pandey, Radhey Shyam, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
On 2/18/25 11:00, Sean Anderson wrote:
> On 2/15/25 06:32, Gupta, Suraj wrote:
>>
>>
>>> -----Original Message-----
>>> From: Sean Anderson <sean.anderson@linux.dev>
>>> Sent: Saturday, February 15, 2025 2:43 AM
>>> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
>>> netdev@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org; Paolo Abeni <pabeni@redhat.com>; David S .
>>> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Simek, Michal
>>> <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; Eric Dumazet
>>> <edumazet@google.com>; Andrew Lunn <andrew+netdev@lunn.ch>; Sean
>>> Anderson <sean.anderson@linux.dev>
>>> Subject: [PATCH net-next] net: xilinx: axienet: Implement BQL
>>>
>>> Caution: This message originated from an External Source. Use proper caution
>>> when opening attachments, clicking links, or responding.
>>>
>>>
>>> Implement byte queue limits to allow queueing disciplines to account for packets
>>> enqueued in the ring buffers but not yet transmitted.
>>>
>>
>> Could you please check if BQL can be implemented for DMAengine flow?
>
> I can have a look, but TBH I do not test the dma engine configuration since it is
> so much slower.
I had a look, and BQL is already implemented for dmaengine.
--Sean
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-20 16:58 ` Sean Anderson
@ 2025-02-20 19:46 ` Gupta, Suraj
0 siblings, 0 replies; 8+ messages in thread
From: Gupta, Suraj @ 2025-02-20 19:46 UTC (permalink / raw)
To: Sean Anderson, Pandey, Radhey Shyam, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Paolo Abeni, David S . Miller,
Jakub Kicinski, Simek, Michal,
linux-arm-kernel@lists.infradead.org, Eric Dumazet, Andrew Lunn
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Sean Anderson <sean.anderson@linux.dev>
> Sent: Thursday, February 20, 2025 10:29 PM
> To: Gupta, Suraj <Suraj.Gupta2@amd.com>; Pandey, Radhey Shyam
> <radhey.shyam.pandey@amd.com>; netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Paolo Abeni <pabeni@redhat.com>; David S .
> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Simek, Michal
> <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; Eric Dumazet
> <edumazet@google.com>; Andrew Lunn <andrew+netdev@lunn.ch>
> Subject: Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On 2/18/25 11:00, Sean Anderson wrote:
> > On 2/15/25 06:32, Gupta, Suraj wrote:
> >>
> >>
> >>> -----Original Message-----
> >>> From: Sean Anderson <sean.anderson@linux.dev>
> >>> Sent: Saturday, February 15, 2025 2:43 AM
> >>> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
> >>> netdev@vger.kernel.org
> >>> Cc: linux-kernel@vger.kernel.org; Paolo Abeni <pabeni@redhat.com>; David S
> .
> >>> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>;
> >>> Simek, Michal <michal.simek@amd.com>;
> >>> linux-arm-kernel@lists.infradead.org; Eric Dumazet
> >>> <edumazet@google.com>; Andrew Lunn <andrew+netdev@lunn.ch>; Sean
> >>> Anderson <sean.anderson@linux.dev>
> >>> Subject: [PATCH net-next] net: xilinx: axienet: Implement BQL
> >>>
> >>> Caution: This message originated from an External Source. Use proper
> >>> caution when opening attachments, clicking links, or responding.
> >>>
> >>>
> >>> Implement byte queue limits to allow queueing disciplines to account
> >>> for packets enqueued in the ring buffers but not yet transmitted.
> >>>
> >>
> >> Could you please check if BQL can be implemented for DMAengine flow?
> >
> > I can have a look, but TBH I do not test the dma engine configuration
> > since it is so much slower.
>
> I had a look, and BQL is already implemented for dmaengine.
>
> --Sean
Ok, great then. Thanks :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: xilinx: axienet: Implement BQL
2025-02-14 21:12 [PATCH net-next] net: xilinx: axienet: Implement BQL Sean Anderson
2025-02-15 11:32 ` Gupta, Suraj
@ 2025-02-19 2:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-19 2:10 UTC (permalink / raw)
To: Sean Anderson
Cc: radhey.shyam.pandey, netdev, linux-kernel, pabeni, davem, kuba,
michal.simek, linux-arm-kernel, edumazet, andrew+netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 14 Feb 2025 16:12:52 -0500 you wrote:
> Implement byte queue limits to allow queueing disciplines to account for
> packets enqueued in the ring buffers but not yet transmitted.
>
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
Here is the summary with links:
- [net-next] net: xilinx: axienet: Implement BQL
https://git.kernel.org/netdev/net-next/c/c900e49d58eb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-20 19:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 21:12 [PATCH net-next] net: xilinx: axienet: Implement BQL Sean Anderson
2025-02-15 11:32 ` Gupta, Suraj
2025-02-18 16:00 ` Sean Anderson
2025-02-18 16:16 ` Andrew Lunn
2025-02-18 16:18 ` Sean Anderson
2025-02-20 16:58 ` Sean Anderson
2025-02-20 19:46 ` Gupta, Suraj
2025-02-19 2:10 ` patchwork-bot+netdevbpf
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).