tsnep: Fix TX queue stop/wake for multiple queues
Subsystems (2)
PATCH 1/1 tsnep: Fix TX queue stop/wake for multiple queues
netif_stop_queue() and netif_wake_queue() act on TX queue 0. This is ok as long as only a single TX queue is supported. But support for multiple TX queues was introduced with 762031375d5c and I missed to adapt stop and wake of TX queues.
Use netif_stop_subqueue() and netif_tx_wake_queue() to act on specific TX queue.
--- drivers/net/ethernet/engleder/tsnep_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/engleder/tsnep_main.c +4 -4
@@ -458,7 +458,7 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,/* ring full, shall not happen because queue is stopped if full * below */ -netif_stop_queue (tx->adapter->netdev); +netif_stop_subqueue (tx->adapter->netdev, tx->queue_index);return NETDEV_TX_BUSY ; }
@@ -495,7 +495,7 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,if (tsnep_tx_desc_available (tx) < (MAX_SKB_FRAGS +1 )) {/* ring can get full with next frame */ -netif_stop_queue (tx->adapter->netdev); +netif_stop_subqueue (tx->adapter->netdev, tx->queue_index); }return NETDEV_TX_OK ;
@@ -701,8 +701,8 @@ static bool tsnep_tx_poll(struct tsnep_tx *tx, int napi_budget) }while (likely (budget));if ((tsnep_tx_desc_available (tx) >= ((MAX_SKB_FRAGS +1 ) *2 )) && -netif_queue_stopped (tx->adapter->netdev)) { -netif_wake_queue (tx->adapter->netdev); +netif_tx_queue_stopped (nq)) { +netif_tx_wake_queue (nq); }__netif_tx_unlock (nq);
Signature · 1 line
2.30.2
Paolo Abeni
maintainerHello,
Quoted 10 lines · Gerhard Engleder
netif_stop_queue()andnetif_wake_queue()act on TX queue 0. This is ok as long as only a single TX queue is supported. But support for multiple TX queues was introduced with762031375d5cand I missed to adapt stop and wake of TX queues.Use
netif_stop_subqueue()andnetif_tx_wake_queue()to act on specific TX queue.Fixes 762031375d5c ("tsnep: Support multiple TX/RX queue pairs")Signed-off-by Gerhard Engleder <[email protected]>
Any special reason to have this on net-next instead of on the net tree? The fix is reasonably small and safe and the culprit commit is on net already.
Thanks,
Paolo
Quoted 11 lines · Paolo Abeni
Hello,
Quoted 8 lines · Gerhard Engleder
netif_stop_queue()andnetif_wake_queue()act on TX queue 0. This is ok as long as only a single TX queue is supported. But support for multiple TX queues was introduced with762031375d5cand I missed to adapt stop and wake of TX queues.Use
netif_stop_subqueue()andnetif_tx_wake_queue()to act on specific TX queue.
Quoted 6 lines
Quoted 2 lines
Fixes 762031375d5c ("tsnep: Support multiple TX/RX queue pairs")Signed-off-by Gerhard Engleder <[email protected]>Any special reason to have this on net-next instead of on the net tree? The fix is reasonably small and safe and the culprit commit is on net already.
Not really. May I'm too shy to send to net. I will repost to net. Commit will grow a little, but those additional lines should make a future merge more straightforward.
Gerhard