From owner-svn-src-all@freebsd.org Wed Aug 17 00:10:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C61FBBCE40; Wed, 17 Aug 2016 00:10:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 151AE1EB6; Wed, 17 Aug 2016 00:10:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u7H09r5E006541 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 16 Aug 2016 17:09:53 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u7H09rJR006540; Tue, 16 Aug 2016 17:09:53 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 16 Aug 2016 17:09:53 -0700 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303646 - head/sys/ofed/drivers/infiniband/ulp/ipoib Message-ID: <20160817000953.GB1069@FreeBSD.org> References: <201608012222.u71MMB4E018482@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201608012222.u71MMB4E018482@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Wed, 17 Aug 2016 00:10:01 -0000 Mark, On Mon, Aug 01, 2016 at 10:22:11PM +0000, Mark Johnston wrote: M> Author: markj M> Date: Mon Aug 1 22:22:11 2016 M> New Revision: 303646 M> URL: https://svnweb.freebsd.org/changeset/base/303646 M> M> Log: M> ipoib: Bound the number of egress mbufs buffered during pathrec lookups. M> M> In pathological situations where the master subnet manager becomes M> unresponsive for an extended period, we may otherwise end up queuing all M> of the system's mbufs while waiting for a response to a path record lookup. M> M> This addresses the same issue as commit 1e85b806f9 in Linux. M> M> Reviewed by: cem, ngie M> MFC after: 2 weeks M> Sponsored by: EMC / Isilon Storage Division M> M> Modified: M> head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c M> M> Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c M> ============================================================================== M> --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 1 22:19:23 2016 (r303645) M> +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 1 22:22:11 2016 (r303646) M> @@ -660,7 +660,13 @@ ipoib_unicast_send(struct mbuf *mb, stru M> new_path = 1; M> } M> if (path) { M> - _IF_ENQUEUE(&path->queue, mb); M> + if (_IF_QLEN(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) M> + _IF_ENQUEUE(&path->queue, mb); M> + else { M> + if_inc_counter(priv->dev, IFCOUNTER_OERRORS, 1); M> + m_freem(mb); M> + } Shouldn't that be IFCOUNTER_ODROPS? -- Totus tuus, Glebius.