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) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"