From owner-svn-src-head@FreeBSD.ORG Thu Jun 5 00:38:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D58E9DD; Thu, 5 Jun 2014 00:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B1D8267A; Thu, 5 Jun 2014 00:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s550cW2I011667; Thu, 5 Jun 2014 00:38:32 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s550cWnk011666; Thu, 5 Jun 2014 00:38:32 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406050038.s550cWnk011666@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 5 Jun 2014 00:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267082 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 00:38:33 -0000 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); + } } }