aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-02-02 14:28:38 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-04-24 11:43:32 +0000
commit1dcb24c347a37a944af397851f29e4681fbc7a18 (patch)
treefa26534285a718f9a4ccb2802ed5ad826196df65 /src/plugins
parentda03d6b3f541f46b5198e1819e4dde5a0d33b243 (diff)
dpdk: Use FreeBSD specific values for network interface classes
The PCI class values used to identify devices are different between platforms. Add a selector for the values used on FreeBSD. Type: improvement Change-Id: I981f0dc24954457068fc94bcc4681b120ee253db Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 07e52251333..1076b938dfc 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -570,8 +570,18 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
continue;
}
+#ifdef __FreeBSD__
+ /*
+ * The defines for the PCI_CLASS_* types are platform specific and differ
+ * on FreeBSD.
+ */
+ if (d->device_class != PCI_CLASS_NETWORK &&
+ d->device_class != PCI_CLASS_PROCESSOR_CO)
+ continue;
+#else
if (d->device_class != PCI_CLASS_NETWORK_ETHERNET && d->device_class != PCI_CLASS_PROCESSOR_CO)
continue;
+#endif /* __FreeBSD__ */
if (num_whitelisted)
{