Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2020 21:47:23 +0000 (UTC)
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356704 - in head/sys: dev/netmap net
Message-ID:  <202001132147.00DLlN2p037069@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Mon Jan 13 21:47:23 2020
New Revision: 356704
URL: https://svnweb.freebsd.org/changeset/base/356704

Log:
  netmap: disable passthrough with no hypervisor support
  
  The netmap passthrough subsystem requires proper support in the
  hypervisor. In particular, two PCI device ids (from the Red Hat
  PCI vendor id 0x1b36) need to be assigned to the two netmap
  virtual devices. We then disable these devices until the ids have
  not been assigned, in order to avoid conflicts with other
  virtual devices emulated by upstream QEMU.
  
  PR:	241774
  MFC after:	3 days

Modified:
  head/sys/dev/netmap/if_ptnet.c
  head/sys/dev/netmap/netmap_kern.h
  head/sys/net/netmap_virt.h

Modified: head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- head/sys/dev/netmap/if_ptnet.c	Mon Jan 13 21:26:17 2020	(r356703)
+++ head/sys/dev/netmap/if_ptnet.c	Mon Jan 13 21:47:23 2020	(r356704)
@@ -87,6 +87,8 @@
 #include <dev/netmap/netmap_mem2.h>
 #include <dev/virtio/network/virtio_net.h>
 
+#ifdef WITH_PTNETMAP
+
 #ifndef INET
 #error "INET not defined, cannot support offloadings"
 #endif
@@ -1993,3 +1995,4 @@ ptnet_poll(if_t ifp, enum poll_cmd cmd, int budget)
 	return count;
 }
 #endif /* DEVICE_POLLING */
+#endif /* WITH_PTNETMAP */

Modified: head/sys/dev/netmap/netmap_kern.h
==============================================================================
--- head/sys/dev/netmap/netmap_kern.h	Mon Jan 13 21:26:17 2020	(r356703)
+++ head/sys/dev/netmap/netmap_kern.h	Mon Jan 13 21:47:23 2020	(r356704)
@@ -76,7 +76,6 @@
 #define WITH_PIPES
 #define WITH_MONITOR
 #define WITH_GENERIC
-#define WITH_PTNETMAP	/* ptnetmap guest support */
 #define WITH_EXTMEM
 #define WITH_NMNULL
 #endif

Modified: head/sys/net/netmap_virt.h
==============================================================================
--- head/sys/net/netmap_virt.h	Mon Jan 13 21:26:17 2020	(r356703)
+++ head/sys/net/netmap_virt.h	Mon Jan 13 21:47:23 2020	(r356704)
@@ -44,8 +44,8 @@
 /* PCI identifiers and PCI BARs for ptnetmap-memdev and ptnet. */
 #define PTNETMAP_MEMDEV_NAME            "ptnetmap-memdev"
 #define PTNETMAP_PCI_VENDOR_ID          0x1b36  /* QEMU virtual devices */
-#define PTNETMAP_PCI_DEVICE_ID          0x000c  /* memory device */
-#define PTNETMAP_PCI_NETIF_ID           0x000d  /* ptnet network interface */
+#define PTNETMAP_PCI_DEVICE_ID          0xcccc  /* memory device */
+#define PTNETMAP_PCI_NETIF_ID           0xcccd  /* ptnet network interface */
 #define PTNETMAP_IO_PCI_BAR             0
 #define PTNETMAP_MEM_PCI_BAR            1
 #define PTNETMAP_MSIX_PCI_BAR           2



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