svn commit: r321253 - head/sys/net
Sean Bruno
sbruno at FreeBSD.org
Wed Jul 19 21:18:05 UTC 2017
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 at 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;
More information about the svn-src-all
mailing list