From: Shuanglin Wang <[email protected]>
For Thor, the default RX completion record metadata format
should be set to Type 1 instead of Type 3. Using the incorrect
type causes the driver to misinterpret the completion records.
Thor2 continues to use Type 3.
Fixes: dd0191d5e70d ("net/bnxt/tf_ulp: support Thor2 ULP layer")
Cc: [email protected]
Signed-off-by: Shuanglin Wang <[email protected]>
Signed-off-by: Manish Kurup <[email protected]>
---
v2:
* Fix the Fixes: tag to point to the commit that introduced the
issue (dd0191d5e70d).
* Restore original indentation of the unrelated bnxt_hwrm_vnic_update()
arguments.
* Mention that Thor2 keeps Type 3 in the commit message.
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index a75da8aa19..99061f5c5e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -480,7 +480,10 @@ 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);
--
2.31.1