From: Tom Jones Date: Fri, 2 Feb 2024 14:28:38 +0000 (+0000) Subject: dpdk: Use FreeBSD specific values for network interface classes X-Git-Tag: v24.10-rc0~72 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=1dcb24c347a37a944af397851f29e4681fbc7a18 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 --- 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) {