Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2017 21:18:04 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321253 - head/sys/net
Message-ID:  <201707192118.v6JLI4NM042972@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Jul 19 21:18:04 2017
New Revision: 321253
URL: https://svnweb.freebsd.org/changeset/base/321253

Log:
  Don't cache mbuf pointers if the number of descriptors is greater than
  the number of buffers.
  
  Submitted by:	Matt Macy <mmacy@mattmacy.io>
  Sponsored by:	Limelight Networks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c	Wed Jul 19 21:06:31 2017	(r321252)
+++ head/sys/net/iflib.c	Wed Jul 19 21:18:04 2017	(r321253)
@@ -2927,6 +2927,14 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag
 				m_free(tmp);
 				continue;
 			}
+			m = m->m_next;
+			count++;
+		} while (m != NULL);
+		if (count > *nsegs)
+			return (0);
+		m = *m0;
+		count = 0;
+		do {
 			next = (pidx + count) & (ntxd-1);
 			MPASS(ifsd_m[next] == NULL);
 			ifsd_m[next] = m;



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