Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2016 22:22:11 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303646 - head/sys/ofed/drivers/infiniband/ulp/ipoib
Message-ID:  <201608012222.u71MMB4E018482@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Aug  1 22:22:11 2016
New Revision: 303646
URL: https://svnweb.freebsd.org/changeset/base/303646

Log:
  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
  MFC after:	2 weeks
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c

Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Mon Aug  1 22:19:23 2016	(r303645)
+++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Mon Aug  1 22:22:11 2016	(r303646)
@@ -660,7 +660,13 @@ ipoib_unicast_send(struct mbuf *mb, stru
 			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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608012222.u71MMB4E018482>