DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Lewis Donzis <lew@perftech.com>,
	Jochen Behrens <jbehrens@vmware.com>,
	Yong Wang <wang.yong19@zte.com.cn>
Subject: [PATCH] net/vmxnet3: fix use of interrupts on FreeBSD
Date: Tue,  9 Jan 2024 14:23:43 +0000	[thread overview]
Message-ID: <20240109142343.163814-1-bruce.richardson@intel.com> (raw)
In-Reply-To: <12922153.12944.1704552603431.JavaMail.zimbra@donzis.com>

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 <lew@perftech.com>
Signed-off-by: Bruce Richardson <bruce.richardson@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


  parent reply	other threads:[~2024-01-09 14:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 20:45 vmxnet3 no longer functional on DPDK 21.11 Lewis Donzis
2021-11-30  8:53 ` Ferruh Yigit
2021-11-30 13:42 ` Bruce Richardson
2021-12-06  1:52   ` Lewis Donzis
2021-12-06  9:16     ` Bruce Richardson
2021-12-06 12:08       ` Ananyev, Konstantin
2021-12-06 13:58         ` Lewis Donzis
2022-06-03 13:19         ` Lewis Donzis
2022-06-03 15:25           ` Ferruh Yigit
2024-01-06 14:50           ` Lewis Donzis
2024-01-09 10:21             ` Bruce Richardson
2024-01-09 13:46               ` Lewis Donzis
2024-01-09 14:28                 ` Bruce Richardson
2024-01-09 15:21                   ` Lewis Donzis
2024-01-09 15:35                     ` Bruce Richardson
2024-01-09 23:55               ` Stephen Hemminger
2024-01-10 13:36                 ` Lewis Donzis
2024-01-09 14:23             ` Bruce Richardson [this message]
2024-01-09 16:00               ` [PATCH] net/vmxnet3: fix use of interrupts on FreeBSD Lewis Donzis
2024-01-11 12:03                 ` Ferruh Yigit
2024-01-24 12:34                   ` Lewis Donzis
2024-01-24 13:58                     ` Ferruh Yigit
2024-01-24 14:04                       ` Lewis Donzis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109142343.163814-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jbehrens@vmware.com \
    --cc=lew@perftech.com \
    --cc=wang.yong19@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).