Skip to contentSkip to conversation

bnxt patches

PATCH Superseded Ajit Khaparde 2 participants 12 messages Nov 19, 2019 – Nov 21, 2019 Network drivers

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover bnxt patches

Couple of bug fixes and an update to the release notes. Please apply.

Ajit Khaparde (2):
net/bnxt: fix to ignore resource qcaps error with older FW
doc: update release notes for Broadcom PMD

Rahul Gupta (1):
net/bnxt: fix jumbo frame configuration in firmware

 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 drivers/net/bnxt/bnxt_ethdev.c         |  4 ----
 drivers/net/bnxt/bnxt_hwrm.c           | 12 ++++++++----
 3 files changed, 18 insertions(+), 8 deletions(-)
Signature · 1 line
2.21.0 (Apple Git-122.2)
#1 lore raw

PATCH 1/3 net/bnxt: fix to ignore resource qcaps error with older FW

On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an error. This is because the command was not implemented completely in FW till the subsequent version. Ignore the error and continue with the driver initialization.

Fixes edafb57ba4a1 ("net/bnxt: fix VF resource allocation")
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +7 -2
index 2cba007ea..1d3732eee 100644
@@ -692,7 +692,12 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 			bp->flags |= BNXT_FLAG_NEW_RM;
 	}
 
-	return rc;
+	/* On older FW,
+	 * bnxt_hwrm_func_resc_qcaps can fail and cause init failure.
+	 * But the error can be ignored. Return success.
+	 */
+
+	return 0;
 }
 
 /* VNIC cap covers capability of all VNICs. So no need to pass vnic_id */
@@ -901,7 +906,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-	HWRM_CHECK_RESULT();
+	HWRM_CHECK_RESULT_SILENT();
 
 	if (BNXT_VF(bp)) {
 		bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
Signature · 1 line
2.21.0 (Apple Git-122.2)
#2 lore raw

PATCH 2/3 net/bnxt: fix jumbo frame configuration in firmware

In reply to Ajit Khaparde

From: Rahul Gupta <[email protected]>

In order to prevent reconfiguration of firmware resources for every MTU change, configure FW with max MTU value using hwrm_func_cfg to support all frame sizes. There is no need to overwrite the driver level MTU variable data->mtu with the FW MTU.

Fixes 905cd45ce30e ("net/bnxt: use configured MTU during load")
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ----
 drivers/net/bnxt/bnxt_hwrm.c   | 3 +--
 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +0 -4
index 06033e3b8..b1e831b87 100644
@@ -4582,10 +4582,6 @@ static int bnxt_init_fw(struct bnxt *bp)
 	if (rc)
 		bp->flags &= ~BNXT_FLAG_FW_CAP_ERROR_RECOVERY;
 
-	if (mtu >= RTE_ETHER_MIN_MTU && mtu <= BNXT_MAX_MTU &&
-	    mtu != bp->eth_dev->data->mtu)
-		bp->eth_dev->data->mtu = mtu;
-
 	bnxt_hwrm_port_led_qcaps(bp);
 
 	return 0;
drivers/net/bnxt/bnxt_hwrm.c +1 -2
index 1d3732eee..41730089b 100644
@@ -2978,8 +2978,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
 	}
 
 	req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);
-	req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu,
-					   BNXT_MAX_MTU)); //FW adds hdr sizes
+	req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU);
 	req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));
 	req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
 	req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx);
Signature · 1 line
2.21.0 (Apple Git-122.2)
#3 lore raw

PATCH 3/3 doc: update release notes for Broadcom PMD

In reply to Ajit Khaparde

Update release doc briefly describing updates to bnxt PMD for 19.11 release.

---
 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
doc/guides/rel_notes/release_19_11.rst +10 -0
index 21be600ab..5d70e213e 100644
@@ -201,6 +201,16 @@ New Features
   * Enabled zero copy between application mempools and UMEM by enabling the
     XDP_UMEM_UNALIGNED_CHUNKS UMEM flag.
 
+* **Updated Broadcom bnxt driver.**
+
+  Updated Broadcom bnxt driver with new features and improvements, including:
+
+  * Added support for hot firmware upgrade.
+  * Added support for error recovery.
+  * Added support for querying and using COS classification in hardware.
+  * Added LRO support Thor devices.
+  * Update HWRM API to version 1.10.1.6
+
 * **Added Marvell NITROX symmetric crypto PMD.**
 
   Added a symmetric crypto PMD for Marvell NITROX V security processor.
Signature · 1 line
2.21.0 (Apple Git-122.2)
#4 lore raw

Re: [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD

Quoted 16 lines · Ajit Khaparde

Update release doc briefly describing updates to bnxt PMD for 19.11 release.

---
 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
doc/guides/rel_notes/release_19_11.rst +0 -0
index 21be600ab..5d70e213e 100644
@@ -201,6 +201,16 @@ New Features
   * Enabled zero copy between application mempools and UMEM by enabling the
     XDP_UMEM_UNALIGNED_CHUNKS UMEM flag.
 

doc/guides/rel_notes/release_19_11.rst New Features · line 213

Quoted 10 lines
doc/guides/rel_notes/release_19_11.rst +10 -0
+* **Updated Broadcom bnxt driver.**
+
+  Updated Broadcom bnxt driver with new features and improvements, including:
+
+  * Added support for hot firmware upgrade.
+  * Added support for error recovery.
+  * Added support for querying and using COS classification in hardware.
+  * Added LRO support Thor devices.
+  * Update HWRM API to version 1.10.1.6
+

Hi Ajit,

For next time, it is better to do the release notes / doc update in the patch that adds the feature, that helps documenting features better.

Thanks,
ferruh

#5 lore raw

Re: [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD

Quoted 30 lines · Ferruh Yigit
Quoted 16 lines · Ajit Khaparde

Update release doc briefly describing updates to bnxt PMD for 19.11 release.

---
 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
doc/guides/rel_notes/release_19_11.rst +0 -0
index 21be600ab..5d70e213e 100644
@@ -201,6 +201,16 @@ New Features
   * Enabled zero copy between application mempools and UMEM by enabling the
     XDP_UMEM_UNALIGNED_CHUNKS UMEM flag.
 

doc/guides/rel_notes/release_19_11.rst New Features · line 213

Quoted 10 lines
doc/guides/rel_notes/release_19_11.rst +10 -0
+* **Updated Broadcom bnxt driver.**
+
+  Updated Broadcom bnxt driver with new features and improvements, including:
+
+  * Added support for hot firmware upgrade.
+  * Added support for error recovery.
+  * Added support for querying and using COS classification in hardware.
+  * Added LRO support Thor devices.
+  * Update HWRM API to version 1.10.1.6
+

Hi Ajit,

Quoted 3 lines

For next time, it is better to do the release notes / doc update in the patch that adds the feature, that helps documenting features better.

Indeed, similar to .ini file change request, can you please add commits ids adding these features to the commit log as back reference? I am dropping this patch while merging for now.

#6 lore raw

Re: [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD

Quoted 36 lines · Ferruh Yigit
Quoted 10 lines · Ferruh Yigit

Review

Quoted 9 lines · Ajit Khaparde

Update release doc briefly describing updates to bnxt PMD for 19.11 release.

---
 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
(quoted diff) +0 -0

b/doc/guides/rel_notes/release_19_11.rst

Quoted 5 lines

doc/guides/rel_notes/release_19_11.rst New Features · line 201

Quoted 5 lines

index 21be600ab..5d70e213e 100644

doc/guides/rel_notes/release_19_11.rst +0 -0
@@ -201,6 +201,16 @@ New Features
   * Enabled zero copy between application mempools and UMEM by

enabling the

Quoted 5 lines

doc/guides/rel_notes/release_19_11.rst New Features

Quoted 5 lines
doc/guides/rel_notes/release_19_11.rst +3 -0
     XDP_UMEM_UNALIGNED_CHUNKS UMEM flag.
 
+* **Updated Broadcom bnxt driver.**
+
+  Updated Broadcom bnxt driver with new features and improvements,

including:

Quoted 4 lines

doc/guides/rel_notes/release_19_11.rst New Features

Quoted 4 lines
doc/guides/rel_notes/release_19_11.rst +4 -0
+
+  * Added support for hot firmware upgrade.
+  * Added support for error recovery.
+  * Added support for querying and using COS classification in

hardware.

Quoted 7 lines

doc/guides/rel_notes/release_19_11.rst New Features · line 213

Quoted 3 lines
doc/guides/rel_notes/release_19_11.rst +3 -0
+  * Added LRO support Thor devices.
+  * Update HWRM API to version 1.10.1.6
+

Hi Ajit,

For next time, it is better to do the release notes / doc update in the

Quoted 9 lines

patch

Quoted 2 lines

that adds the feature, that helps documenting features better.

Indeed, similar to .ini file change request, can you please add commits ids adding these features to the commit log as back reference? I am dropping this
patch while merging for now.

Will do. Thanks

#7 lore raw

PATCH v2 1/3 doc: update bnxt feature list

In reply to Ferruh Yigit

Updating bnxt.ini file.
These features were added earlier under the following commits.
1) 94d4afd2d167 ("net/bnxt: advertise scatter Rx offload capability")
2) 57d5e5bc86e4 ("net/bnxt: add statistics")
3) 88920136688c ("net/bnxt: support xstats get by id")

---
 doc/guides/nics/features/bnxt.ini | 3 +++
 1 file changed, 3 insertions(+)
doc/guides/nics/features/bnxt.ini +3 -0
index 9721dd61d..37a99e336 100644
@@ -11,6 +11,7 @@ Rx interrupt         = Y
 Queue start/stop     = Y
 MTU update           = Y
 Jumbo frame          = Y
+Scattered Rx         = Y
 LRO                  = Y
 TSO                  = Y
 Promiscuous mode     = Y
@@ -37,9 +38,11 @@ Rx descriptor status = Y
 Tx descriptor status = Y
 Basic stats          = Y
 Extended stats       = Y
+Stats per queue      = Y
 FW version           = Y
 EEPROM dump          = Y
 LED                  = Y
+Multiprocess aware   = Y
 Linux UIO            = Y
 Linux VFIO           = Y
 ARMv8                = Y
Signature · 1 line
2.21.0 (Apple Git-122.2)
#8 lore raw

PATCH v2 2/3 doc: update release notes for Broadcom PMD

Update release doc briefly describing updates to bnxt PMD for 19.11 release.

The support for these was added in the following commits:
1) b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
2) be14720def9c ("net/bnxt: support FW reset")
3) df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
4) 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
5) 04102f2ffc8c ("net/bnxt: update HWRM API to version 1.10.1.6")

---
 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
doc/guides/rel_notes/release_19_11.rst +10 -0
index 48c80e5da..53856399d 100644
@@ -201,6 +201,16 @@ New Features
   * Enabled zero copy between application mempools and UMEM by enabling the
     XDP_UMEM_UNALIGNED_CHUNKS UMEM flag.
 
+* **Updated Broadcom bnxt driver.**
+
+  Updated Broadcom bnxt driver with new features and improvements, including:
+
+  * Added support for hot firmware upgrade.
+  * Added support for error recovery.
+  * Added support for querying and using COS classification in hardware.
+  * Added LRO support Thor devices.
+  * Update HWRM API to version 1.10.1.6
+
 * **Added Marvell NITROX symmetric crypto PMD.**
 
   Added a symmetric crypto PMD for Marvell NITROX V security processor.
Signature · 1 line
2.21.0 (Apple Git-122.2)
#9 lore raw

PATCH v2 3/3 net/bnxt: fix to free all the vnics during port stop

In reply to Ajit Khaparde

From: Somnath Kotur <[email protected]>

Now that vnics are created only as part of the flow creation cmds and not during init, we cannot rely on iterating only through 'nr_vnics'. We need to sweep all the vnics by using 'max_vnics' otherwise a vnic with a stale 'rx_queue_cnt' might be left lingering post a port stop/start operation. This could lead to a segfault. This change is required because of the recent fix made by commit to "fix flow creation with non-consecutive group ids".

Fixes bab0a1f2ed4b ("net/bnxt: fix flow creation with non-consecutive group ids")
---
 drivers/net/bnxt/bnxt_vnic.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/bnxt/bnxt_vnic.c +5 -4
index 52a4badfc..104342e13 100644
@@ -75,12 +75,13 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp)
 
 void bnxt_free_all_vnics(struct bnxt *bp)
 {
-	struct bnxt_vnic_info *temp;
+	struct bnxt_vnic_info *vnic;
 	unsigned int i;
 
-	for (i = 0; i < bp->nr_vnics; i++) {
-		temp = &bp->vnic_info[i];
-		STAILQ_INSERT_TAIL(&bp->free_vnic_list, temp, next);
+	for (i = 0; i < bp->max_vnics; i++) {
+		vnic = &bp->vnic_info[i];
+		STAILQ_INSERT_TAIL(&bp->free_vnic_list, vnic, next);
+		vnic->rx_queue_cnt = 0;
 	}
 }
 
Signature · 1 line
2.21.0 (Apple Git-122.2)
author Applied
#10 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix to free all the vnics during port stop

Quoted 10 lines · Ajit Khaparde

From: Somnath Kotur <[email protected]>

Now that vnics are created only as part of the flow creation cmds and not during init, we cannot rely on iterating only through 'nr_vnics'. We need to sweep all the vnics by using 'max_vnics' otherwise a vnic with a stale 'rx_queue_cnt' might be left lingering post a port stop/start operation. This could lead to a segfault. This change is required because of the recent fix made by commit to "fix flow creation with non-consecutive group ids".

Quoted 6 lines
Fixes bab0a1f2ed4b ("net/bnxt: fix flow creation with non-consecutive

group ids")

Applied to dpdk-next-net-brcm.

Quoted 30 lines
---
 drivers/net/bnxt/bnxt_vnic.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/bnxt/bnxt_vnic.c +5 -5
index 52a4badfc..104342e13 100644
@@ -75,12 +75,13 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp)
 
 void bnxt_free_all_vnics(struct bnxt *bp)
 {
-       struct bnxt_vnic_info *temp;
+       struct bnxt_vnic_info *vnic;
        unsigned int i;
 
-       for (i = 0; i < bp->nr_vnics; i++) {
-               temp = &bp->vnic_info[i];
-               STAILQ_INSERT_TAIL(&bp->free_vnic_list, temp, next);
+       for (i = 0; i < bp->max_vnics; i++) {
+               vnic = &bp->vnic_info[i];
+               STAILQ_INSERT_TAIL(&bp->free_vnic_list, vnic, next);
+               vnic->rx_queue_cnt = 0;
        }
 }
 
--

2.21.0 (Apple Git-122.2)

#11 lore raw
In reply to Ajit Khaparde
Quoted 7 lines · Ajit Khaparde

Couple of bug fixes and an update to the release notes. Please apply.

Ajit Khaparde (2):
net/bnxt: fix to ignore resource qcaps error with older FW
doc: update release notes for Broadcom PMD

Quoted 8 lines

Rahul Gupta (1):
net/bnxt: fix jumbo frame configuration in firmware

 doc/guides/rel_notes/release_19_11.rst | 10 ++++++++++
 drivers/net/bnxt/bnxt_ethdev.c         |  4 ----
 drivers/net/bnxt/bnxt_hwrm.c           | 12 ++++++++----
 3 files changed, 18 insertions(+), 8 deletions(-)

Patches applied to dpdk-next-net-brcm. Thanks

Quoted 5 lines

--
2.21.0 (Apple Git-122.2)