socsvn commit: r305709 - soc2016/vincenzo/head/sys/dev/netmap
vincenzo at FreeBSD.org
vincenzo at FreeBSD.org
Mon Jul 4 07:43:23 UTC 2016
Author: vincenzo
Date: Mon Jul 4 07:43:22 2016
New Revision: 305709
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305709
Log:
freebsd: ptnet_transmit: assert we cannot run out of slots while transmitting
Modified:
soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jul 4 07:43:12 2016 (r305708)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jul 4 07:43:22 2016 (r305709)
@@ -1301,16 +1301,8 @@
slot->flags = NS_MOREFRAG;
head = nm_next(head, lim);
- if (head == ring->tail) {
- /* Run out of slots while processing
- * a packet. Reset head to the previous
- * position and requeue the mbuf. */
- RD(1, "%s: Drop, no free slots\n",
- __func__);
- head = prev_head;
- drbr_putback(ifp, pq->bufring, m);
- goto escape;
- }
+ KASSERT(head != rina->tail,
+ "Unexpectedly run out of TX space");
slot = ring->slot + head;
nmbuf = NMB(na, slot);
nmbuf_bytes = 0;
@@ -1331,7 +1323,7 @@
ptnet_ring_update(pq, kring, head);
}
}
-escape:
+
if (batch_count) {
ptnet_ring_update(pq, kring, head);
}
More information about the svn-soc-all
mailing list