From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64F8643873; Tue, 9 Jan 2024 15:24:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03BF44021F; Tue, 9 Jan 2024 15:24:28 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id D925D4013F for ; Tue, 9 Jan 2024 15:24:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704810266; x=1736346266; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j0SMlVSsnuNgwa5HctSUinkJPH0DVeAVUa41Yih7dXA=; b=Kg4d1PAK9vYTC1jLzCOc/Mlw3wsv028JNbFn8nYMXSlLYuOAA8a2qrJp O89cjeyq3MPIEe9Myirmr3KLSQsSKeE6fOhgKyL62hkcGpgmYfYsGY381 lueWypo185cly6uKwpeYIGLbOIP88TKc88qtuTmGY5yLHiXjITD5+0A++ WgRftLwMEDl6ePEI2T0wC12XiSaYP8bIQ3NPSg6fR60JQk3Gbl+H4fybM unDd81DEoRGwo566/B1ii4FI15e727hwA7L3gxUaI54CtLQ1v3RgVr/Q0 88nGf3xTGzG8QOSrjbjfMh/JwO2pr7UGX0hvYXN+OLp0/llVp8Ltje27T w==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="401997611" X-IronPort-AV: E=Sophos;i="6.04,183,1695711600"; d="scan'208";a="401997611" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 06:24:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="905170752" X-IronPort-AV: E=Sophos;i="6.04,183,1695711600"; d="scan'208";a="905170752" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.148]) by orsmga004.jf.intel.com with ESMTP; 09 Jan 2024 06:24:23 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Lewis Donzis , Jochen Behrens , Yong Wang Subject: [PATCH] net/vmxnet3: fix use of interrupts on FreeBSD Date: Tue, 9 Jan 2024 14:23:43 +0000 Message-Id: <20240109142343.163814-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <12922153.12944.1704552603431.JavaMail.zimbra@donzis.com> References: <12922153.12944.1704552603431.JavaMail.zimbra@donzis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Signed-off-by: Bruce Richardson --- 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