From d76bf4ff7b9b7bcecd295403d2663218bb646dab Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 13 Apr 2012 16:03:07 +0000 Subject: A bit of cleanup in the names of fields of netmap-related structures. Use the name 'ring' instead of 'queue' in all fields. Bump NETMAP_API. --- tools/tools/netmap/bridge.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/tools') diff --git a/tools/tools/netmap/bridge.c b/tools/tools/netmap/bridge.c index 7d2f4f4c1461..6e20b634cb27 100644 --- a/tools/tools/netmap/bridge.c +++ b/tools/tools/netmap/bridge.c @@ -300,7 +300,7 @@ howmany(struct my_ring *me, int tx) if (0 && verbose && tot && !tx) D("ring %s %s %s has %d avail at %d", me->ifname, tx ? "tx": "rx", - me->end > me->nifp->ni_rx_queues ? + me->end >= me->nifp->ni_tx_rings ? // XXX who comes first ? "host":"net", tot, NETMAP_TXRING(me->nifp, me->begin)->cur); return tot; @@ -361,6 +361,8 @@ main(int argc, char **argv) } } + argc -= optind; + argv += optind; if (argc > 1) ifa = argv[1]; @@ -440,8 +442,8 @@ main(int argc, char **argv) D("Wait %d secs for link to come up...", wait_link); sleep(wait_link); D("Ready to go, %s 0x%x/%d <-> %s 0x%x/%d.", - me[0].ifname, me[0].queueid, me[0].nifp->ni_rx_queues, - me[1].ifname, me[1].queueid, me[1].nifp->ni_rx_queues); + me[0].ifname, me[0].queueid, me[0].nifp->ni_rx_rings, + me[1].ifname, me[1].queueid, me[1].nifp->ni_rx_rings); /* main loop */ signal(SIGINT, sigint_h); -- cgit v1.2.3