Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2014 00:38:32 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267082 - head/sys/dev/cxgbe
Message-ID:  <201406050038.s550cWnk011666@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu Jun  5 00:38:32 2014
New Revision: 267082
URL: http://svnweb.freebsd.org/changeset/base/267082

Log:
  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.
  
  MFC after:	3 days

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Wed Jun  4 21:17:51 2014	(r267081)
+++ head/sys/dev/cxgbe/t4_sge.c	Thu Jun  5 00:38:32 2014	(r267082)
@@ -1424,8 +1424,15 @@ service_iq(struct sge_iq *iq, int budget
 				}
 #endif
 
-				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?201406050038.s550cWnk011666>