dpdk: Only use vmbus on Linux 42/40642/2
authorTom Jones <thj@freebsd.org>
Thu, 1 Feb 2024 16:05:31 +0000 (16:05 +0000)
committerDamjan Marion <dmarion@0xa5.net>
Wed, 24 Apr 2024 11:33:19 +0000 (11:33 +0000)
Type: improvement
Change-Id: Iba3e287f420c0bdc8d248695163e7dfe1acd24d8
Signed-off-by: Tom Jones <thj@freebsd.org>
src/plugins/dpdk/device/common.c
src/plugins/dpdk/device/dpdk.h

index dc6b0c1..7a49c5a 100644 (file)
@@ -491,6 +491,7 @@ dpdk_get_pci_device (const struct rte_eth_dev_info *info)
     return NULL;
 }
 
+#ifdef __linux__
 /* If this device is VMBUS return pointer to info, otherwise NULL */
 struct rte_vmbus_device *
 dpdk_get_vmbus_device (const struct rte_eth_dev_info *info)
@@ -507,6 +508,7 @@ dpdk_get_vmbus_device (const struct rte_eth_dev_info *info)
   else
     return NULL;
 }
+#endif /* __linux__ */
 
 /*
  * fd.io coding-style-patch-verification: ON
index c22a67a..88a4d9f 100644 (file)
@@ -24,7 +24,9 @@
 
 #include <rte_eal.h>
 #include <rte_bus_pci.h>
+#ifdef __linux__
 #include <rte_bus_vmbus.h>
+#endif /* __linux__ */
 #include <rte_ethdev.h>
 #include <rte_version.h>
 #include <rte_net.h>
@@ -35,7 +37,9 @@
 
 #include <bus_driver.h>
 #include <bus_pci_driver.h>
+#ifdef __linux__
 #include <bus_vmbus_driver.h>
+#endif /* __linux__ */
 #endif
 
 #include <vnet/devices/devices.h>