From owner-svn-src-head@freebsd.org Wed Aug 17 02:22:55 2016 Return-Path: Delivered-To: svn-src-head@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 204A8BBC6D6; Wed, 17 Aug 2016 02:22:55 +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 08E1315C6; Wed, 17 Aug 2016 02:22:54 +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 u7H2MrxE006924 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 16 Aug 2016 19:22:53 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u7H2Mrbw006923; Tue, 16 Aug 2016 19:22: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 19:22: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: <20160817022253.GD1069@FreeBSD.org> References: <201608012222.u71MMB4E018482@repo.freebsd.org> <20160817000953.GB1069@FreeBSD.org> <20160817004128.GB94062@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160817004128.GB94062@wkstn-mjohnston.west.isilon.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Wed, 17 Aug 2016 02:22:55 -0000 On Tue, Aug 16, 2016 at 05:41:28PM -0700, Mark Johnston wrote: M> > M> Log: M> > M> ipoib: Bound the number of egress mbufs buffered during pathrec lookups. M> > M> M> > M> In pathological situations where the master subnet manager becomes M> > M> unresponsive for an extended period, we may otherwise end up queuing all M> > M> of the system's mbufs while waiting for a response to a path record lookup. M> > M> M> > M> This addresses the same issue as commit 1e85b806f9 in Linux. M> > M> M> > M> Reviewed by: cem, ngie M> > M> MFC after: 2 weeks M> > M> Sponsored by: EMC / Isilon Storage Division M> > M> M> > M> Modified: M> > M> head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c M> > M> M> > M> Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c M> > M> ============================================================================== M> > M> --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 1 22:19:23 2016 (r303645) M> > M> +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 1 22:22:11 2016 (r303646) M> > M> @@ -660,7 +660,13 @@ ipoib_unicast_send(struct mbuf *mb, stru M> > M> new_path = 1; M> > M> } M> > M> if (path) { M> > M> - _IF_ENQUEUE(&path->queue, mb); M> > M> + if (_IF_QLEN(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) M> > M> + _IF_ENQUEUE(&path->queue, mb); M> > M> + else { M> > M> + if_inc_counter(priv->dev, IFCOUNTER_OERRORS, 1); M> > M> + m_freem(mb); M> > M> + } M> > M> > Shouldn't that be IFCOUNTER_ODROPS? M> M> I'm not sure. I used IFCOUNTER_OERRORS to be consistent with other error M> cases in this function. This error case doesn't represent the normal M> source of outbound packet drops but rather indicates that a key routing M> agent on the network is not responding. OQDROPS seems like it's M> specifically for the case that we can't buffer packets because the M> transmitter isn't keeping up. I see. The fact that this is an if_queue has confused me. I expected that it is an ifqueue belonging to an ifnet. btw, may be this ifqueue can be reduced to mbufq. -- Totus tuus, Glebius.