[dpdk-dev] [PATCH 13/13] net/bnxt: remove parent fid validation in vnic change event processing

Somnath Kotur somnath.kotur at broadcom.com
Fri Oct 9 13:11:30 CEST 2020


From: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>

Currently, when default vnic change async event is received, the async
event handler will try to validate whether the parent fid that is coming
as part of the event data is of the control channel's fid.
This validation will fail in case of SR device because the parent
function of the vnic and the control channel function (Foster parent)
are different.

This patch fixes the problem by removing this parent fid validation as
it is not really needed in case of Wh+ also.

Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable at dpdk.org

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 5492394..91d1ffe 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -50,7 +50,7 @@ static void
 bnxt_process_default_vnic_change(struct bnxt *bp,
 				 struct hwrm_async_event_cmpl *async_cmp)
 {
-	uint16_t fid, vnic_state, parent_id, vf_fid, vf_id;
+	uint16_t vnic_state, vf_fid, vf_id;
 	struct bnxt_representor *vf_rep_bp;
 	struct rte_eth_dev *eth_dev;
 	bool vfr_found = false;
@@ -67,10 +67,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
 	if (vnic_state != BNXT_DEFAULT_VNIC_ALLOC)
 		return;
 
-	parent_id = (event_data & BNXT_DEFAULT_VNIC_CHANGE_PF_ID_MASK) >>
-			BNXT_DEFAULT_VNIC_CHANGE_PF_ID_SFT;
-	fid = BNXT_PF(bp) ? bp->fw_fid : bp->parent->fid;
-	if (parent_id != fid || !bp->rep_info)
+	if (!bp->rep_info)
 		return;
 
 	vf_fid = (event_data & BNXT_DEFAULT_VNIC_CHANGE_VF_ID_MASK) >>
-- 
2.7.4



More information about the dev mailing list