svn commit: r307394 - in head: share/man/man4 sys/conf sys/dev/netmap sys/modules/netmap sys/net tools/tools/netmap

Shawn Webb shawn.webb at hardenedbsd.org
Wed Oct 19 20:36:50 UTC 2016


On Wed, Oct 19, 2016 at 12:23:24PM -0400, Shawn Webb wrote:
> On Sun, Oct 16, 2016 at 02:13:32PM +0000, Luigi Rizzo wrote:
> > Author: luigi
> > Date: Sun Oct 16 14:13:32 2016
> > New Revision: 307394
> > URL: https://svnweb.freebsd.org/changeset/base/307394
> > 
> > Log:
> >   Import the current version of netmap, aligned with the one on github.
> >   
> >   This commit, long overdue, contains contributions in the last 2 years
> >   from Stefano Garzarella, Giuseppe Lettieri, Vincenzo Maffione, including:
> >   + fixes on monitor ports
> >   + the 'ptnet' virtual device driver, and ptnetmap backend, for
> >     high speed virtual passthrough on VMs (bhyve fixes in an upcoming commit)
> >   + improved emulated netmap mode
> >   + more robust error handling
> >   + removal of stale code
> >   + various fixes to code and documentation (some mixup between RX and TX
> >     parameters, and private and public variables)
> >   
> >   We also include an additional tool, nmreplay, which is functionally
> >   equivalent to tcpreplay but operating on netmap ports.
> > 
> > Added:
> >   head/tools/tools/netmap/ctrs.h   (contents, props changed)
> >   head/tools/tools/netmap/nmreplay.8   (contents, props changed)
> >   head/tools/tools/netmap/nmreplay.c   (contents, props changed)
> > Modified:
> >   head/share/man/man4/netmap.4
> >   head/sys/conf/files
> >   head/sys/dev/netmap/if_ixl_netmap.h
> >   head/sys/dev/netmap/if_lem_netmap.h
> >   head/sys/dev/netmap/ixgbe_netmap.h
> >   head/sys/dev/netmap/netmap.c
> >   head/sys/dev/netmap/netmap_freebsd.c
> >   head/sys/dev/netmap/netmap_generic.c
> >   head/sys/dev/netmap/netmap_kern.h
> >   head/sys/dev/netmap/netmap_mbq.c
> >   head/sys/dev/netmap/netmap_mbq.h
> >   head/sys/dev/netmap/netmap_mem2.c
> >   head/sys/dev/netmap/netmap_mem2.h
> >   head/sys/dev/netmap/netmap_monitor.c
> >   head/sys/dev/netmap/netmap_offloadings.c
> >   head/sys/dev/netmap/netmap_pipe.c
> >   head/sys/dev/netmap/netmap_vale.c
> >   head/sys/modules/netmap/Makefile
> >   head/sys/net/netmap.h
> >   head/sys/net/netmap_user.h
> >   head/tools/tools/netmap/Makefile
> >   head/tools/tools/netmap/bridge.c
> >   head/tools/tools/netmap/pkt-gen.c
> >   head/tools/tools/netmap/vale-ctl.c
> 
> Looks like this broke VIMAGE builds:
> 
> /usr/src/sys/dev/netmap/netmap_freebsd.c:1410:25: error: use of undeclared identifier 'rd'
>         CURVNET_SET(TD_TO_VNET(rd));
>                                ^
> /usr/src/sys/dev/netmap/netmap_freebsd.c:1410:25: error: use of undeclared identifier 'rd'
> /usr/src/sys/dev/netmap/netmap_freebsd.c:1410:25: error: use of undeclared identifier 'rd'
> /usr/src/sys/dev/netmap/netmap_freebsd.c:1410:25: error: use of undeclared identifier 'rd'
> 4 errors generated.
> --- netmap_freebsd.o ---
> *** [netmap_freebsd.o] Error code 1

The attached patch fixes the build. In case it doesn't make it to the
list, it's also posted here: http://ix.io/1xFU

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
-------------- next part --------------
diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c
index 50e2d0f..a3ad322 100644
--- a/sys/dev/netmap/netmap_freebsd.c
+++ b/sys/dev/netmap/netmap_freebsd.c
@@ -48,6 +48,7 @@
 #include <vm/uma.h>
 
 
+#include <sys/jail.h>
 #include <sys/malloc.h>
 #include <sys/socket.h> /* sockaddrs */
 #include <sys/selinfo.h>
@@ -1407,7 +1408,7 @@ freebsd_netmap_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data,
 	int error;
 	struct netmap_priv_d *priv;
 
-	CURVNET_SET(TD_TO_VNET(rd));
+	CURVNET_SET(TD_TO_VNET(td));
 	error = devfs_get_cdevpriv((void **)&priv);
 	if (error) {
 		/* XXX ENOENT should be impossible, since the priv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20161019/9e2dfde3/attachment.sig>


More information about the svn-src-all mailing list