Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 00:10:45 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274361 - head/sys/dev/netmap
Message-ID:  <201411110010.sAB0Ajqs078299@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411110010.sAB0Ajqs078299>