From 934bab6766e5d55fe2f719649492db9568d0d72a Mon Sep 17 00:00:00 2001 From: Tom Jones Date: Thu, 1 Feb 2024 16:05:31 +0000 Subject: dpdk: Only use vmbus on Linux Type: improvement Change-Id: Iba3e287f420c0bdc8d248695163e7dfe1acd24d8 Signed-off-by: Tom Jones --- src/plugins/dpdk/device/common.c | 2 ++ src/plugins/dpdk/device/dpdk.h | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/plugins/dpdk') diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index dc6b0c1c952..7a49c5aaef2 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -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 diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h index c22a67a07e7..88a4d9ff618 100644 --- a/src/plugins/dpdk/device/dpdk.h +++ b/src/plugins/dpdk/device/dpdk.h @@ -24,7 +24,9 @@ #include #include +#ifdef __linux__ #include +#endif /* __linux__ */ #include #include #include @@ -35,7 +37,9 @@ #include #include +#ifdef __linux__ #include +#endif /* __linux__ */ #endif #include -- cgit 1.2.3-korg