From owner-svn-src-projects@freebsd.org Mon Feb 19 12:48:00 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FBB6F236EB for ; Mon, 19 Feb 2018 12:48:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3943736BF; Mon, 19 Feb 2018 12:47:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B965E1AB5D; Mon, 19 Feb 2018 12:47:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1JClxau069517; Mon, 19 Feb 2018 12:47:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1JClxIg069516; Mon, 19 Feb 2018 12:47:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201802191247.w1JClxIg069516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Feb 2018 12:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r329574 - projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: projects X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 329574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 12:48:00 -0000 Author: hselasky Date: Mon Feb 19 12:47:59 2018 New Revision: 329574 URL: https://svnweb.freebsd.org/changeset/base/329574 Log: MFC r303646: ipoib: Bound the number of egress mbufs buffered during pathrec lookups. In pathological situations where the master subnet manager becomes unresponsive for an extended period, we may otherwise end up queuing all of the system's mbufs while waiting for a response to a path record lookup. This addresses the same issue as commit 1e85b806f9 in Linux. Reviewed by: cem, ngie Sponsored by: EMC / Isilon Storage Division Modified: projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: projects/bsd_rdma_4_9_stable_11/ (props changed) Modified: projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Feb 19 12:42:40 2018 (r329573) +++ projects/bsd_rdma_4_9_stable_11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Feb 19 12:47:59 2018 (r329574) @@ -685,7 +685,13 @@ ipoib_unicast_send(struct mbuf *mb, struct ipoib_dev_p new_path = 1; } if (path) { - _IF_ENQUEUE(&path->queue, mb); + if (_IF_QLEN(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) + _IF_ENQUEUE(&path->queue, mb); + else { + if_inc_counter(priv->dev, IFCOUNTER_OERRORS, 1); + m_freem(mb); + } + if (!path->query && path_rec_start(priv, path)) { spin_unlock_irqrestore(&priv->lock, flags); if (new_path)