net: xilinx: axienet: Implement BQL
PATCH 1/1 net: xilinx: axienet: Implement BQL
Implement byte queue limits to allow queueing disciplines to account for packets enqueued in the ring buffers but not yet transmitted.
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +4 -0
@@ -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];
Signature · 1 line
2.35.1.1320.gc452695387.dirty
Quoted 14 lines
-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Saturday, February 15, 2025 2:43 AM
To: Pandey, Radhey Shyam <[email protected]>; [email protected]
Cc: [email protected]; Paolo Abeni <[email protected]>; David S . Miller <[email protected]>; Jakub Kicinski <[email protected]>; Simek, Michal <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; Andrew Lunn <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH net-next] net: xilinx: axienet: Implement BQL
Quoted 7 lines
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?
Quoted 48 lines
Signed-off-by Sean Anderson <[email protected]>---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1
-0@@ -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 intaxienet_stop(struct net_device *ndev)dma_release_channel(lp->tx_chan); }drivers/net/ethernet/xilinx/xilinx_axienet_main.c +2
-0+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
Quoted 18 lines · Suraj
Quoted 18 lines
-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Saturday, February 15, 2025 2:43 AM
To: Pandey, Radhey Shyam <[email protected]>; [email protected]
Cc: [email protected]; Paolo Abeni <[email protected]>; David S . Miller <[email protected]>; Jakub Kicinski <[email protected]>; Simek, Michal <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; Andrew Lunn <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH net-next] net: xilinx: axienet: Implement BQLCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 5 lines
Quoted 3 lines
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
Quoted 4 lines
Quoted 1 line
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
Quoted 6 lines · Andrew Lunn
Quoted 4 lines
Quoted 1 line
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
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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 <[email protected]>---
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 19 lines · Sean Anderson
Quoted 18 lines · Suraj
Quoted 18 lines
-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Saturday, February 15, 2025 2:43 AM
To: Pandey, Radhey Shyam <[email protected]>; [email protected]
Cc: [email protected]; Paolo Abeni <[email protected]>; David S . Miller <[email protected]>; Jakub Kicinski <[email protected]>; Simek, Michal <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; Andrew Lunn <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH net-next] net: xilinx: axienet: Implement BQLCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
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
[AMD Official Use Only - AMD Internal Distribution Only]
Quoted 41 lines
-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Thursday, February 20, 2025 10:29 PM
To: Gupta, Suraj <[email protected]>; Pandey, Radhey Shyam <[email protected]>; [email protected]
Cc: [email protected]; Paolo Abeni <[email protected]>; David S . Miller <[email protected]>; Jakub Kicinski <[email protected]>; Simek, Michal <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; Andrew Lunn <[email protected]>
Subject: Re: [PATCH net-next] net: xilinx: axienet: Implement BQLCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 9 lines · Sean Anderson
Quoted 8 lines · Suraj
Quoted 8 lines
-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Saturday, February 15, 2025 2:43 AM
To: Pandey, Radhey Shyam <[email protected]>; [email protected]
Cc: [email protected]; Paolo Abeni <[email protected]>; David S.
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Miller <[email protected]>; Jakub Kicinski <[email protected]>; Simek, Michal <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; Andrew Lunn <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH net-next] net: xilinx: axienet: Implement BQLCaution: 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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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 :)