socsvn commit: r305704 - soc2016/vincenzo/head/sys/dev/netmap
vincenzo at FreeBSD.org
vincenzo at FreeBSD.org
Mon Jul 4 07:42:07 UTC 2016
Author: vincenzo
Date: Mon Jul 4 07:42:06 2016
New Revision: 305704
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305704
Log:
freebsd: ptnet_transmit: update state variables at each iteration
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 03:19:06 2016 (r305703)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jul 4 07:42:06 2016 (r305704)
@@ -1218,12 +1218,7 @@
kring = na->tx_rings + pq->kring_id;
ring = kring->ring;
lim = kring->nkr_num_slots - 1;
-
- /* Initialize transmission state variables. */
head = ring->head;
- slot = ring->slot + head;
- nmbuf = NMB(na, slot);
- nmbuf_bytes = 0;
for (;;) {
if (head == ring->tail) {
@@ -1244,6 +1239,11 @@
break;
}
+ /* Initialize transmission state variables. */
+ slot = ring->slot + head;
+ nmbuf = NMB(na, slot);
+ nmbuf_bytes = 0;
+
for (prev_head = head, mf = m; mf; mf = mf->m_next) {
uint8_t *mdata = mf->m_data;
int mlen = mf->m_len;
More information about the svn-soc-all
mailing list