From 2ec213aba4bfecb47d7439a6d4b46b88a382eaff Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Mon, 13 Jan 2020 21:47:23 +0000 Subject: 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 --- sys/dev/netmap/if_ptnet.c | 3 +++ sys/dev/netmap/netmap_kern.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/netmap') diff --git a/sys/dev/netmap/if_ptnet.c b/sys/dev/netmap/if_ptnet.c index ccf008d4451b..38149ac2650c 100644 --- a/sys/dev/netmap/if_ptnet.c +++ b/sys/dev/netmap/if_ptnet.c @@ -87,6 +87,8 @@ #include #include +#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 */ diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index 3748f81cbb5f..690d45def356 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -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 -- cgit v1.3