[dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:21:17 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Thu, 16 Jan 2020 18:34:47 +0530
Subject: [PATCH] net/bnxt: fix probe in FreeBSD

[ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ]

In FreeBSD environment, nic_uio driver does not support interrupts
and rte_intr_callback_register() will fail to register interrupts
which in turn causes bnxt driver probe failure.

Fixed driver to ignore interrupt callback failures in FreeBSD.
Also fixed to not use a dedicated completion ring for async events
from FW and process these events on RXQ0 in FreeBSD.

Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 8 ++++++++
 drivers/net/bnxt/bnxt_ethdev.c | 3 +++
 drivers/net/bnxt/bnxt_irq.c    | 8 ++++++++
 3 files changed, 19 insertions(+)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index d00186f79e..c818bede80 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -117,6 +117,14 @@
 #define BNXT_NUM_ASYNC_CPR(bp) 1
 #endif
 
+/* In FreeBSD OS, nic_uio driver does not support interrupts */
+#ifdef RTE_EXEC_ENV_FREEBSD
+#ifdef BNXT_NUM_ASYNC_CPR
+#undef BNXT_NUM_ASYNC_CPR
+#endif
+#define BNXT_NUM_ASYNC_CPR(bp)	0
+#endif
+
 #define BNXT_MISC_VEC_ID               RTE_INTR_VEC_ZERO_OFFSET
 #define BNXT_RX_VEC_START              RTE_INTR_VEC_RXTX_OFFSET
 
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3e7bc61325..c3fec1561d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -439,8 +439,11 @@ skip_cosq_cfg:
 
 	/* enable uio/vfio intr/eventfd mapping */
 	rc = rte_intr_enable(intr_handle);
+#ifndef RTE_EXEC_ENV_FREEBSD
+	/* In FreeBSD OS, nic_uio driver does not support interrupts */
 	if (rc)
 		goto err_free;
+#endif
 
 	rc = bnxt_get_hwrm_link_config(bp, &new);
 	if (rc) {
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 846325ea96..40e1b0c980 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -181,5 +181,13 @@ int bnxt_request_int(struct bnxt *bp)
 			irq->requested = 1;
 	}
 
+#ifdef RTE_EXEC_ENV_FREEBSD
+	/**
+	 * In FreeBSD OS, nic_uio does not support interrupts and
+	 * interrupt register callback will fail.
+	 */
+	rc = 0;
+#endif
+
 	return rc;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:43.255973266 +0000
+++ 0131-net-bnxt-fix-probe-in-FreeBSD.patch	2020-02-11 11:17:38.628005610 +0000
@@ -1,8 +1,10 @@
-From d9fc6a0d07559cfa718efe971a51620c23ba211e Mon Sep 17 00:00:00 2001
+From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Date: Thu, 16 Jan 2020 18:34:47 +0530
 Subject: [PATCH] net/bnxt: fix probe in FreeBSD
 
+[ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ]
+
 In FreeBSD environment, nic_uio driver does not support interrupts
 and rte_intr_callback_register() will fail to register interrupts
 which in turn causes bnxt driver probe failure.
@@ -13,7 +15,6 @@
 
 Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start")
 Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
@@ -26,7 +27,7 @@
  3 files changed, 19 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 21ca059b8a..3487b917ed 100644
+index d00186f79e..c818bede80 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
 @@ -117,6 +117,14 @@
@@ -45,7 +46,7 @@
  #define BNXT_RX_VEC_START              RTE_INTR_VEC_RXTX_OFFSET
  
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 7b5df9ac12..879ea580fe 100644
+index 3e7bc61325..c3fec1561d 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
 @@ -439,8 +439,11 @@ skip_cosq_cfg:


More information about the stable mailing list