From owner-svn-src-all@FreeBSD.ORG Mon Jun 9 01:39:48 2014 Return-Path: Delivered-To: svn-src-all@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 585B8CB6; Mon, 9 Jun 2014 01:39:48 +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 45FE42BB2; Mon, 9 Jun 2014 01:39:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s591dmpe083744; Mon, 9 Jun 2014 01:39:48 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s591dmL1083743; Mon, 9 Jun 2014 01:39:48 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406090139.s591dmL1083743@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 9 Jun 2014 01:39:48 +0000 (UTC) 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 01:39:48 -0000 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); + } } }