svn commit: r342390 - stable/12/sys/dev/netmap

Vincenzo Maffione vmaffione at FreeBSD.org
Mon Dec 24 14:47:27 UTC 2018


Author: vmaffione
Date: Mon Dec 24 14:47:26 2018
New Revision: 342390
URL: https://svnweb.freebsd.org/changeset/base/342390

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

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

Modified: stable/12/sys/dev/netmap/netmap_pipe.c
==============================================================================
--- stable/12/sys/dev/netmap/netmap_pipe.c	Mon Dec 24 10:47:48 2018	(r342389)
+++ stable/12/sys/dev/netmap/netmap_pipe.c	Mon Dec 24 14:47:26 2018	(r342390)
@@ -782,9 +782,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);


More information about the svn-src-all mailing list