Patch "tsnep: Fix NAPI polling with budget 0" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tsnep: Fix NAPI polling with budget 0

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tsnep-fix-napi-polling-with-budget-0.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a5172eec2a53cb9b7811a7ef73e03a69f7a35d78
Author: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>
Date:   Fri Sep 15 23:01:26 2023 +0200

    tsnep: Fix NAPI polling with budget 0
    
    [ Upstream commit 46589db3817bd8b523701274885984b5a5dda7d1 ]
    
    According to the NAPI documentation networking/napi.rst, Rx specific
    APIs like page pool and XDP cannot be used at all when budget is 0.
    skb Tx processing should happen regardless of the budget.
    
    Stop NAPI polling after Tx processing and skip Rx processing if budget
    is 0.
    
    Signed-off-by: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index 00436a6f785e8..2be518db04270 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -930,6 +930,10 @@ static int tsnep_poll(struct napi_struct *napi, int budget)
 	if (queue->tx)
 		complete = tsnep_tx_poll(queue->tx, budget);
 
+	/* handle case where we are called by netpoll with a budget of 0 */
+	if (unlikely(budget <= 0))
+		return budget;
+
 	if (queue->rx) {
 		done = tsnep_rx_poll(queue->rx, napi, budget);
 		if (done >= budget)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux