DPDK does not support interrupts on FreeBSD, so the vmxnet3 driver returns error when enabling interrupts as it initializes. We can fix this by #ifdef'ing out the interrupt calls when building for FreeBSD, allowing the driver to initialize correctly.
Fixes: 046f11619567 ("net/vmxnet3: support MSI-X interrupt") Reported-by: Lewis Donzis <l...@perftech.com> Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index e49191718a..7032f0e324 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -257,6 +257,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw) vmxnet3_disable_intr(hw, i); } +#ifndef RTE_EXEC_ENV_FREEBSD /* * Enable all intrs used by the device */ @@ -280,6 +281,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw) vmxnet3_enable_intr(hw, i); } } +#endif /* * Gets tx data ring descriptor size. @@ -1129,6 +1131,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev) /* Setting proper Rx Mode and issue Rx Mode Update command */ vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_UCAST | VMXNET3_RXM_BCAST, 1); +#ifndef RTE_EXEC_ENV_FREEBSD /* Setup interrupt callback */ rte_intr_callback_register(dev->intr_handle, vmxnet3_interrupt_handler, dev); @@ -1140,6 +1143,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev) /* enable all intrs */ vmxnet3_enable_all_intrs(hw); +#endif vmxnet3_process_events(dev); -- 2.42.0