Skip to contentSkip to conversation

e1000: Fix NAPI state bug when Rx complete

PATCH Applied Auke Kok 2 participants 2 messages Nov 28, 2007 – Dec 1, 2007

Subsystems (2)
lore
Share & tools
lore

Auke Kok

author
#0 lore raw

PATCH 1/1 e1000: Fix NAPI state bug when Rx complete

Don't exit polling when we have not yet used our budget, this causes the NAPI system to end up with a messed up poll list.

---

 drivers/net/e1000/e1000_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/e1000/e1000_main.c +1 -1
index b7c3070..724f067 100644
@@ -3926,7 +3926,7 @@ e1000_clean(struct napi_struct *napi, int budget)
 	                  &work_done, budget);
 
 	/* If no Tx and not enough Rx work done, exit the polling mode */
-	if ((!tx_cleaned && (work_done < budget)) ||
+	if ((!tx_cleaned && (work_done == 0)) ||
 	   !netif_running(poll_dev)) {
 quit_polling:
 		if (likely(adapter->itr_setting & 3))
Applied
#1 lore raw
Quoted 14 lines · Auke Kok

Don't exit polling when we have not yet used our budget, this causes the NAPI system to end up with a messed up poll list.

---

 drivers/net/e1000/e1000_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/e1000/e1000_main.c +0 -0
index b7c3070..724f067 100644

drivers/net/e1000/e1000_main.c e1000_clean(struct napi_struct *napi, int budget) · line 3930

Quoted 6 lines
drivers/net/e1000/e1000_main.c +1 -1
@@ -3926,7 +3926,7 @@ e1000_clean(struct napi_struct *napi, int budget)
 	                  &work_done, budget);
 
 	/* If no Tx and not enough Rx work done, exit the polling mode */
-	if ((!tx_cleaned && (work_done < budget)) ||
+	if ((!tx_cleaned && (work_done == 0)) ||
 	   !netif_running(poll_dev)) {

applied