⬢ DragonFlyBSD Kernel Audit
DF-3778 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/jme/if_jme.c
+++ b/sys/dev/netif/jme/if_jme.c
@@ -250,6 +250,10 @@
 	  INTR_RXQ3_DESC_EMPTY }
 };
 
+static int	jme_rx_proc_limit = 64;	/* RX frames serviced per intr */
+
+TUNABLE_INT("hw.jme.rx_proc_limit", &jme_rx_proc_limit);
+
 static int	jme_rx_desc_count = JME_RX_DESC_CNT_DEF;
 static int	jme_tx_desc_count = JME_TX_DESC_CNT_DEF;
 static int	jme_rx_ring_count = 0;
@@ -3497,7 +3501,7 @@
 
 		if (status & rdata->jme_rx_coal) {
 			lwkt_serialize_enter(&rdata->jme_rx_serialize);
-			jme_rxeof(rdata, -1, cpuid);
+			jme_rxeof(rdata, jme_rx_proc_limit, cpuid);
 			lwkt_serialize_exit(&rdata->jme_rx_serialize);
 		}
 	}
@@ -3842,7 +3846,7 @@
 	    rdata->jme_rx_coal | rdata->jme_rx_comp);
 
 	if (ifp->if_flags & IFF_RUNNING)
-		jme_rxeof(rdata, -1, mycpuid);
+		jme_rxeof(rdata, jme_rx_proc_limit, mycpuid);
 
 	CSR_WRITE_4(sc, JME_INTR_MASK_SET, rdata->jme_rx_coal);
 }
@@ -3879,7 +3883,7 @@
 
 		if (status & rdata->jme_rx_empty) {
 			lwkt_serialize_enter(&rdata->jme_rx_serialize);
-			jme_rxeof(rdata, -1, cpuid);
+			jme_rxeof(rdata, jme_rx_proc_limit, cpuid);
 #ifdef JME_RSS_DEBUG
 			rdata->jme_rx_emp++;
 #endif