From owner-svn-src-all@freebsd.org Wed Aug 17 00:36:56 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 9F675BBA62D; Wed, 17 Aug 2016 00:36:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74C2D1D57; Wed, 17 Aug 2016 00:36:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x235.google.com with SMTP id h186so32307519pfg.3; Tue, 16 Aug 2016 17:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EyvcQuKITxGeDJX45pDLL64gXT3PjBY5tFqIMT74s4U=; b=NKq+Gq5GzrcUg8/7JYbgP96Bz0/rkO4TTUAqRF1MYAy2EMNjwjAki1a6xBCf6bf5pg ok4rrw4LDU+j8YSkEEQbTkVbKNx+mwWxSrR5nDeqeTEXFoIJdh0PDHMBsVOYgBVNPwRq yAscGIWotvCefotawZaMer95/FOYUjYhVKZ3ljn2YWmKKwVnKYkAuR/+boSpuhyy80Aw pDeHnmz7lqY22kvM0U+E44ijRAIbe0Zd8r/AvBzQ/Lci6kTzz7cavFcmOEDn4DhxDgPI IsgvGYz7wNmygDlVFghGliC4YIoW5YKXoLt/YJOJegu7dcgnmh/p8SJCacfL/1NxWsI2 4lPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=EyvcQuKITxGeDJX45pDLL64gXT3PjBY5tFqIMT74s4U=; b=RGV3VD1gk9+N8A+WOMGR+kcpwvvVUB1IR9sMGR1UZWgSZiH7dTS/JE9dno+of48Pfq yb+1YhpY4+aAKFRSrhULtz8+yP/b5+wIuf6QAtJOYokkjXOlNEQlIPM+haK6qi2JRXa8 lRglkgRvyC+w1XFnES8bULPaAREj6jg3VJ/zgSd2Xxytq5MRqIeLxFgGZ62jxx6KZVzs kZEFe+yyD6aqPNrT/JScwUFKfzRZtpQjz18N+5MIOZofQjBX8mUQxcfCklkzM2A8mzDq E52Ky7tRRzFq+p9ufyEUl5oMo+VrzVDuOQcQ4Ep4EBAA9yI/HI9hGMRV9YkUp8PTA6ff pRfw== X-Gm-Message-State: AEkoouswwd/BszYHh4WIfcJtB8wN1nWTuOjua92Knb0IjLW42TF7clrMGT40wOJDdjhZAw== X-Received: by 10.98.103.214 with SMTP id t83mr69306515pfj.158.1471394215614; Tue, 16 Aug 2016 17:36:55 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id q26sm42046071pfj.53.2016.08.16.17.36.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 17:36:55 -0700 (PDT) Sender: Mark Johnston Date: Tue, 16 Aug 2016 17:41:28 -0700 From: Mark Johnston To: Gleb Smirnoff 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: <20160817004128.GB94062@wkstn-mjohnston.west.isilon.com> References: <201608012222.u71MMB4E018482@repo.freebsd.org> <20160817000953.GB1069@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160817000953.GB1069@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:36:56 -0000 On Tue, Aug 16, 2016 at 05:09:53PM -0700, Gleb Smirnoff wrote: > 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? I'm not sure. I used IFCOUNTER_OERRORS to be consistent with other error cases in this function. This error case doesn't represent the normal source of outbound packet drops but rather indicates that a key routing agent on the network is not responding. OQDROPS seems like it's specifically for the case that we can't buffer packets because the transmitter isn't keeping up.