Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Dec 2018 15:07:36 +0000 (UTC)
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r342394 - stable/11/sys/dev/netmap
Message-ID:  <201812241507.wBOF7aMG027443@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Mon Dec 24 15:07:36 2018
New Revision: 342394
URL: https://svnweb.freebsd.org/changeset/base/342394

Log:
  MFC r342299
  
  netmap: pipes: make sure both ends use the same number of slots

Modified:
  stable/11/sys/dev/netmap/netmap_pipe.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/netmap/netmap_pipe.c
==============================================================================
--- stable/11/sys/dev/netmap/netmap_pipe.c	Mon Dec 24 14:51:13 2018	(r342393)
+++ stable/11/sys/dev/netmap/netmap_pipe.c	Mon Dec 24 15:07:36 2018	(r342394)
@@ -780,9 +780,11 @@ netmap_get_pipe_na(struct nmreq_header *hdr, struct ne
 	/* most fields are the same, copy from master and then fix */
 	*sna = *mna;
 	sna->up.nm_mem = netmap_mem_get(mna->up.nm_mem);
-	/* swap the number of tx/rx rings */
+	/* swap the number of tx/rx rings and slots */
 	sna->up.num_tx_rings = mna->up.num_rx_rings;
+	sna->up.num_tx_desc  = mna->up.num_rx_desc;
 	sna->up.num_rx_rings = mna->up.num_tx_rings;
+	sna->up.num_rx_desc  = mna->up.num_tx_desc;
 	snprintf(sna->up.name, sizeof(sna->up.name), "%s}%s", pna->name, pipe_id);
 	sna->role = NM_PIPE_ROLE_SLAVE;
 	error = netmap_attach_common(&sna->up);



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