Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2016 14:20:33 GMT
From:      vincenzo@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r307245 - soc2016/vincenzo/head/usr.sbin/bhyve
Message-ID:  <201608051420.u75EKXSU027230@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vincenzo
Date: Fri Aug  5 14:20:32 2016
New Revision: 307245
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=307245

Log:
   bhyve: include netmap_virt.h from the netmap public headers

Modified:
  soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.c
  soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.h
  soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_memdev.c
  soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c

Modified: soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.c
==============================================================================
--- soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.c	Fri Aug  5 14:19:28 2016	(r307244)
+++ soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.c	Fri Aug  5 14:20:32 2016	(r307245)
@@ -487,7 +487,7 @@
 	struct nmreq req;
 	int err;
 
-	if (!(ptn->acked_features & NET_PTN_FEATURES_BASE)) {
+	if (!(ptn->acked_features & PTNETMAP_F_BASE)) {
 		fprintf(stderr, "%s: ptnetmap features not acked\n",
 			__func__);
 		return EINVAL;
@@ -585,12 +585,12 @@
 	be->priv = priv;
 
 	priv->ptnetmap.netmap_priv = priv;
-	priv->ptnetmap.features = NET_PTN_FEATURES_BASE;
+	priv->ptnetmap.features = PTNETMAP_F_BASE;
 	priv->ptnetmap.acked_features = 0;
 	priv->ptnetmap.running = 0;
 	if (ptnetmap) {
 		if (netmap_has_vnet_hdr_len(be, VNET_HDR_LEN)) {
-			priv->ptnetmap.features |= NET_PTN_FEATURES_VNET_HDR;
+			priv->ptnetmap.features |= PTNETMAP_F_VNET_HDR;
 		}
 		/* XXX Call ptn_memdev_attach() here or in get_ptnetmap ? */
 		ptn_memdev_attach(priv->nmd->mem, priv->nmd->memsize,

Modified: soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.h
==============================================================================
--- soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.h	Fri Aug  5 14:19:28 2016	(r307244)
+++ soc2016/vincenzo/head/usr.sbin/bhyve/net_backends.h	Fri Aug  5 14:20:32 2016	(r307245)
@@ -29,7 +29,7 @@
 
 #include <stdint.h>
 #include <net/netmap.h>
-#include <dev/netmap/netmap_virt.h>
+#include <net/netmap_virt.h>
 #include "mevent.h"
 
 extern int netmap_ioctl_counter;

Modified: soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_memdev.c
==============================================================================
--- soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_memdev.c	Fri Aug  5 14:19:28 2016	(r307244)
+++ soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_memdev.c	Fri Aug  5 14:20:32 2016	(r307245)
@@ -34,7 +34,7 @@
 
 #include <net/if.h>	/* IFNAMSIZ */
 #include <net/netmap.h>
-#include <dev/netmap/netmap_virt.h>
+#include <net/netmap_virt.h>
 
 #include <machine/vmm.h>
 #include <vmmapi.h>
@@ -311,7 +311,7 @@
 }
 
 struct pci_devemu pci_de_ptnetmap = {
-	.pe_emu = 	PTN_MEMDEV_NAME,
+	.pe_emu = 	PTNETMAP_MEMDEV_NAME,
 	.pe_init =	ptn_memdev_init,
 	.pe_barwrite =	ptn_pci_write,
 	.pe_barread =	ptn_pci_read

Modified: soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c
==============================================================================
--- soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c	Fri Aug  5 14:19:28 2016	(r307244)
+++ soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c	Fri Aug  5 14:20:32 2016	(r307245)
@@ -35,7 +35,7 @@
 
 #include <net/if.h>	/* IFNAMSIZ */
 #include <net/netmap.h>
-#include <dev/netmap/netmap_virt.h>
+#include <net/netmap_virt.h>
 
 #include <sys/ioctl.h>
 #include <sys/param.h>
@@ -173,21 +173,21 @@
 	int ret = EINVAL;
 
 	switch (cmd) {
-	case NET_PARAVIRT_PTCTL_CONFIG:
+	case PTNETMAP_PTCTL_CONFIG:
 		fprintf(stderr, "Ignoring deprecated CONFIG PTCTL\n");
 		break;
 
-	case NET_PARAVIRT_PTCTL_REGIF:
+	case PTNETMAP_PTCTL_REGIF:
 		/* Emulate a REGIF for the guest. */
 		ret = ptnet_regif(sc);
 		break;
 
-	case NET_PARAVIRT_PTCTL_UNREGIF:
+	case PTNETMAP_PTCTL_UNREGIF:
 		/* Emulate an UNREGIF for the guest. */
 		ret = ptnet_unregif(sc);
 		break;
 
-	case NET_PARAVIRT_PTCTL_HOSTMEMID:
+	case PTNETMAP_PTCTL_HOSTMEMID:
 		ret = ptnetmap_get_hostmemid(sc->ptbe);
 		break;
 



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