diff options
author | Tom Jones <thj@freebsd.org> | 2024-02-02 14:28:09 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2024-04-24 11:38:01 +0000 |
commit | da03d6b3f541f46b5198e1819e4dde5a0d33b243 (patch) | |
tree | 8d5df3475d271f726de583665f345a73d88831df | |
parent | 2535bdea47c46d6d475b8dbf6527374d2358b1ef (diff) |
dpdk: Only use vmbus on Linux
Type: improvement
Change-Id: If181c4bfd7fc93583a608d478bd070930c853f52
Signed-off-by: Tom Jones <thj@freebsd.org>
-rw-r--r-- | src/plugins/dpdk/device/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index d15cfd7233a..07e52251333 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -187,9 +187,11 @@ dpdk_find_startup_config (struct rte_eth_dev_info *di) { dpdk_main_t *dm = &dpdk_main; struct rte_pci_device *pci_dev; - struct rte_vmbus_device *vmbus_dev; vlib_pci_addr_t pci_addr; +#ifdef __linux__ + struct rte_vmbus_device *vmbus_dev; vlib_vmbus_addr_t vmbus_addr; +#endif /* __linux__ */ uword *p = 0; if ((pci_dev = dpdk_get_pci_device (di))) @@ -202,6 +204,7 @@ dpdk_find_startup_config (struct rte_eth_dev_info *di) hash_get (dm->conf->device_config_index_by_pci_addr, pci_addr.as_u32); } +#ifdef __linux__ if ((vmbus_dev = dpdk_get_vmbus_device (di))) { unformat_input_t input_vmbus; @@ -216,6 +219,7 @@ dpdk_find_startup_config (struct rte_eth_dev_info *di) &vmbus_addr); unformat_free (&input_vmbus); } +#endif /* __linux__ */ if (p) return pool_elt_at_index (dm->conf->dev_confs, p[0]); |