DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix completion metadata format type for Thor
@ 2026-10-05 23:51 Manish Kurup
  0 siblings, 0 replies; only message in thread
From: Manish Kurup @ 2026-10-05 23:51 UTC (permalink / raw)
  To: dev; +Cc: kishore.padmanabha, Shuanglin Wang, stable

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

For Thor, the default RX completion record metadata format should
be set to Type 1 instead of Type 3. Using the wrong type causes the
driver to misinterpret completion records.

Fixes: 0c036a1485b9 ("net/bnxt/tf_ulp: optimize with inline and prediction")
Cc: stable@dpdk.org

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Manish Kurup <manish.kurup@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index a75da8aa19..70e5700833 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -480,10 +480,13 @@ bnxt_ulp_port_init(struct bnxt *bp)
 	/* Make sure that custom header data is selected */
 	if (dev_id > BNXT_ULP_DEVICE_ID_WH_PLUS) {
 		struct bnxt_vnic_info *vnic = bp->vnic_info;
-		vnic->metadata_format = HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3;
+		if (dev_id == BNXT_ULP_DEVICE_ID_THOR2)
+			vnic->metadata_format = HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3;
+		else
+			vnic->metadata_format = HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_1;
 		rc = bnxt_hwrm_vnic_update(bp,
-					vnic,
-					HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID);
+				vnic,
+				HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID);
 		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to set metadata format\n");
 			goto jump_to_error;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-05 23:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 23:51 [PATCH] net/bnxt: fix completion metadata format type for Thor Manish Kurup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox