svn commit: r267247 - stable/9/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Mon Jun 9 01:39:48 UTC 2014


Author: np
Date: Mon Jun  9 01:39:47 2014
New Revision: 267247
URL: http://svnweb.freebsd.org/changeset/base/267247

Log:
  MFC r267082:
  
  cxgbe(4):  Properly account for the freelist buffers used when returning
  early from service_iq due to a budget restriction.  This fixes a potential
  rx hang when using INTx.
  
  Approved by:	re@ (gjb)

Modified:
  stable/9/sys/dev/cxgbe/t4_sge.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/9/sys/dev/cxgbe/t4_sge.c	Mon Jun  9 01:24:53 2014	(r267246)
+++ stable/9/sys/dev/cxgbe/t4_sge.c	Mon Jun  9 01:39:47 2014	(r267247)
@@ -1334,8 +1334,15 @@ service_iq(struct sge_iq *iq, int budget
 				    V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX)));
 				ndescs = 0;
 
-				if (budget)
+				if (budget) {
+					if (fl_bufs_used) {
+						FL_LOCK(fl);
+						fl->needed += fl_bufs_used;
+						refill_fl(sc, fl, 32);
+						FL_UNLOCK(fl);
+					}
 					return (EINPROGRESS);
+				}
 			}
 		}
 


More information about the svn-src-stable mailing list