socsvn commit: r305823 - soc2016/vincenzo/head/sys/dev/netmap
vincenzo at FreeBSD.org
vincenzo at FreeBSD.org
Fri Jul 8 15:43:28 UTC 2016
Author: vincenzo
Date: Fri Jul 8 15:43:27 2016
New Revision: 305823
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305823
Log:
freebsd: ptnet_rx_eof: simplify budget management and debug prints
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 Fri Jul 8 15:43:19 2016 (r305822)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Fri Jul 8 15:43:27 2016 (r305823)
@@ -1549,18 +1549,13 @@
kring->nr_kflags &= ~NKR_PENDINTR;
- for (;;) {
+ do {
unsigned int prev_head = head;
struct mbuf *mhead, *mtail;
struct netmap_slot *slot;
unsigned int nmbuf_len;
uint8_t *nmbuf, *mdata;
- if (budget == 0) {
- RD(1, "Run out of budget h %u t %u", head, ring->tail);
- break;
- }
-
if (head == ring->tail) {
/* We ran out of slot, let's see if the host has
* added some, by reading hwcur and hwtail from
@@ -1682,8 +1677,7 @@
(*ifp->if_input)(ifp, mhead);
PTNET_Q_LOCK(pq);
- budget--;
- }
+ } while (--budget);
escape:
if (head != ring->head) {
/* Some packets have been pushed to the network stack.
@@ -1707,8 +1701,8 @@
if (!budget) {
/* If we ran out of budget or the double-check found new
* slots to process, schedule the taskqueue. */
- RD(1, "%s: resched: budget %u h %u t %u\n", __func__,
- budget, head, ring->tail);
+ RD(1, "out of budget: resched h %u t %u\n",
+ head, ring->tail);
taskqueue_enqueue(pq->taskq, &pq->task);
}
}
More information about the svn-soc-all
mailing list