Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2014 01:39:48 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r267247 - stable/9/sys/dev/cxgbe
Message-ID:  <201406090139.s591dmL1083743@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
+				}
 			}
 		}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406090139.s591dmL1083743>