aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2014-11-11 00:10:44 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2014-11-11 00:10:44 +0000
commit204f91dd3a716784960430840d07e554a5734cde (patch)
tree547a3be35ca3532b405be6db0a9cf7cbd2a3c8cc /sys/dev/netmap
parentd1f79a3bfc91aefacc8bd6e40d081f850eba17b5 (diff)
downloadsrc-204f91dd3a716784960430840d07e554a5734cde.tar.gz
src-204f91dd3a716784960430840d07e554a5734cde.zip
- 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
Notes
Notes: svn path=/head/; revision=274361
Diffstat (limited to 'sys/dev/netmap')
-rw-r--r--sys/dev/netmap/netmap_pipe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/netmap/netmap_pipe.c b/sys/dev/netmap/netmap_pipe.c
index bc998c04a17e..ab77f4b6dcde 100644
--- a/sys/dev/netmap/netmap_pipe.c
+++ b/sys/dev/netmap/netmap_pipe.c
@@ -197,10 +197,10 @@ netmap_pipe_txsync(struct netmap_kring *txkring, int flags)
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)