All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring
@ 2026-06-02 11:46 Justin Lai
  2026-06-03  3:21 ` Justin Lai
  2026-06-04 16:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Justin Lai @ 2026-06-02 11:46 UTC (permalink / raw)
  To: kuba
  Cc: davem, edumazet, pabeni, andrew+netdev, linux-kernel, netdev,
	stable, horms, pkshih, larry.chiu, Justin Lai

rtase_tx_clear() clears the TX ring and resets the ring indexes.
However, the TX queue state and BQL accounting are not reset at
the same time.

This may leave __QUEUE_STATE_STACK_XOFF asserted after
rtase_sw_reset(), preventing new TX packets from being scheduled.

Reset the TX subqueue when clearing the TX ring so the TX queue
state and BQL accounting are restored together.

Fixes: 5a2a2f15244c ("rtase: Implement the rtase_down function")
Cc: stable@vger.kernel.org
Signed-off-by: Justin Lai <justinlai0215@realtek.com>
---
v1 -> v2:
- Target net tree.
- Add Fixes tag.
---
 drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c b/drivers/net/ethernet/realtek/rtase/rtase_main.c
index ef13109c49cf..6ccbefb5acf2 100644
--- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
+++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
@@ -239,6 +239,8 @@ static void rtase_tx_clear(struct rtase_private *tp)
 		rtase_tx_clear_range(ring, ring->dirty_idx, RTASE_NUM_DESC);
 		ring->cur_idx = 0;
 		ring->dirty_idx = 0;
+
+		netdev_tx_reset_subqueue(tp->dev, i);
 	}
 }
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring
  2026-06-02 11:46 [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring Justin Lai
@ 2026-06-03  3:21 ` Justin Lai
  2026-06-03 14:22   ` Alexander Lobakin
  2026-06-04 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Justin Lai @ 2026-06-03  3:21 UTC (permalink / raw)
  To: Justin Lai, kuba@kernel.org
  Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, stable@vger.kernel.org, horms@kernel.org,
	Alexander Lobakin, Ping-Ke Shih, Larry Chiu

Justin Lai <justinlai0215@realtek.com> wrote:
> 
> rtase_tx_clear() clears the TX ring and resets the ring indexes.
> However, the TX queue state and BQL accounting are not reset at the same
> time.
> 
> This may leave __QUEUE_STATE_STACK_XOFF asserted after rtase_sw_reset(),
> preventing new TX packets from being scheduled.
> 
> Reset the TX subqueue when clearing the TX ring so the TX queue state and
> BQL accounting are restored together.
> 
> Fixes: 5a2a2f15244c ("rtase: Implement the rtase_down function")
> Cc: stable@vger.kernel.org
> Signed-off-by: Justin Lai <justinlai0215@realtek.com>
> ---
> v1 -> v2:
> - Target net tree.
> - Add Fixes tag.
> ---
>  drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c
> b/drivers/net/ethernet/realtek/rtase/rtase_main.c
> index ef13109c49cf..6ccbefb5acf2 100644
> --- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
> +++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
> @@ -239,6 +239,8 @@ static void rtase_tx_clear(struct rtase_private *tp)
>  		rtase_tx_clear_range(ring, ring->dirty_idx, RTASE_NUM_DESC);
>  		ring->cur_idx = 0;
>  		ring->dirty_idx = 0;
> +
> +		netdev_tx_reset_subqueue(tp->dev, i);
>  	}
>  }
> 
> --
> 2.40.1

Adding Olek, who was accidentally missed from the CC list.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring
  2026-06-03  3:21 ` Justin Lai
@ 2026-06-03 14:22   ` Alexander Lobakin
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Lobakin @ 2026-06-03 14:22 UTC (permalink / raw)
  To: Justin Lai
  Cc: kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	stable@vger.kernel.org, horms@kernel.org, Ping-Ke Shih,
	Larry Chiu

From: Justin Lai <justinlai0215@realtek.com>
Date: Wed, 3 Jun 2026 03:21:34 +0000

> Justin Lai <justinlai0215@realtek.com> wrote:
>>
>> rtase_tx_clear() clears the TX ring and resets the ring indexes.
>> However, the TX queue state and BQL accounting are not reset at the same
>> time.
>>
>> This may leave __QUEUE_STATE_STACK_XOFF asserted after rtase_sw_reset(),
>> preventing new TX packets from being scheduled.
>>
>> Reset the TX subqueue when clearing the TX ring so the TX queue state and
>> BQL accounting are restored together.
>>
>> Fixes: 5a2a2f15244c ("rtase: Implement the rtase_down function")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Justin Lai <justinlai0215@realtek.com>
>> ---
>> v1 -> v2:
>> - Target net tree.
>> - Add Fixes tag.
>> ---
>>  drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c
>> b/drivers/net/ethernet/realtek/rtase/rtase_main.c
>> index ef13109c49cf..6ccbefb5acf2 100644
>> --- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
>> +++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
>> @@ -239,6 +239,8 @@ static void rtase_tx_clear(struct rtase_private *tp)
>>  		rtase_tx_clear_range(ring, ring->dirty_idx, RTASE_NUM_DESC);
>>  		ring->cur_idx = 0;
>>  		ring->dirty_idx = 0;
>> +
>> +		netdev_tx_reset_subqueue(tp->dev, i);
>>  	}
>>  }
>>
>> --
>> 2.40.1
> 
> Adding Olek, who was accidentally missed from the CC list.


Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>

Thanks,
Olek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring
  2026-06-02 11:46 [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring Justin Lai
  2026-06-03  3:21 ` Justin Lai
@ 2026-06-04 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-04 16:00 UTC (permalink / raw)
  To: Justin Lai
  Cc: kuba, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
	netdev, stable, horms, pkshih, larry.chiu

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 2 Jun 2026 19:46:59 +0800 you wrote:
> rtase_tx_clear() clears the TX ring and resets the ring indexes.
> However, the TX queue state and BQL accounting are not reset at
> the same time.
> 
> This may leave __QUEUE_STATE_STACK_XOFF asserted after
> rtase_sw_reset(), preventing new TX packets from being scheduled.
> 
> [...]

Here is the summary with links:
  - [net,v2] rtase: Reset TX subqueue when clearing TX ring
    https://git.kernel.org/netdev/net/c/ab1ecaabe74b

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] 4+ messages in thread

end of thread, other threads:[~2026-06-04 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:46 [PATCH net v2] rtase: Reset TX subqueue when clearing TX ring Justin Lai
2026-06-03  3:21 ` Justin Lai
2026-06-03 14:22   ` Alexander Lobakin
2026-06-04 16:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.