svn commit: r274361 - head/sys/dev/netmap
Luigi Rizzo
luigi at FreeBSD.org
Tue Nov 11 00:10:45 UTC 2014
Author: luigi
Date: Tue Nov 11 00:10:44 2014
New Revision: 274361
URL: https://svnweb.freebsd.org/changeset/base/274361
Log:
- fix typo: use ring size from the rx ring, not the tx one (they should be
the same, but just in case);
- reuse the previously computed len-1 value
Modified:
head/sys/dev/netmap/netmap_pipe.c
Modified: head/sys/dev/netmap/netmap_pipe.c
==============================================================================
--- head/sys/dev/netmap/netmap_pipe.c Mon Nov 10 23:56:06 2014 (r274360)
+++ head/sys/dev/netmap/netmap_pipe.c Tue Nov 11 00:10:44 2014 (r274361)
@@ -197,10 +197,10 @@ netmap_pipe_txsync(struct netmap_kring *
if (m < 0)
m += txkring->nkr_num_slots;
limit = m;
- m = rxkring->nkr_num_slots - 1; /* max avail space on destination */
+ m = lim_rx; /* max avail space on destination */
busy = j - rxkring->nr_hwcur; /* busy slots */
if (busy < 0)
- busy += txkring->nkr_num_slots;
+ busy += rxkring->nkr_num_slots;
m -= busy; /* subtract busy slots */
ND(2, "m %d limit %d", m, limit);
if (m < limit)
More information about the svn-src-head
mailing list