From: Jie Liu <[email protected]>

repr_priv_data->repr_vf_vsi_id is assigned with a ternary that falls
back to the backup (dpdk) VSI ID when the kernel VSI ID is invalid.
The V3 implementation assigns it directly from
repr_vf_primary_vsi_id.

Align with the V3 implementation by assigning repr_vf_vsi_id from
repr_vf_primary_vsi_id.

Cc: [email protected]
Cc: [email protected]
Signed-off-by: Jie Liu <[email protected]>
---
 drivers/net/sxe2/sxe2_switchdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/sxe2/sxe2_switchdev.c 
b/drivers/net/sxe2/sxe2_switchdev.c
index d0304ccc94..81ced7b855 100644
--- a/drivers/net/sxe2/sxe2_switchdev.c
+++ b/drivers/net/sxe2/sxe2_switchdev.c
@@ -323,11 +323,7 @@ int32_t sxe2_switchdev_repr_private_data_init(struct 
rte_eth_dev *dev,
        repr_priv_data->repr_vf_backup_vsi_id =
                parent_adapter->repr_ctxt.repr_vf_id[repr_id].dpdk_vsi_id;
 
-       repr_priv_data->repr_vf_vsi_id =
-               parent_adapter->repr_ctxt.repr_vf_id[repr_id].kernel_vsi_id !=
-               SXE2_INVALID_VSI_ID ?
-               parent_adapter->repr_ctxt.repr_vf_id[repr_id].kernel_vsi_id :
-               parent_adapter->repr_ctxt.repr_vf_id[repr_id].dpdk_vsi_id;
+       repr_priv_data->repr_vf_vsi_id = repr_priv_data->repr_vf_primary_vsi_id;
 
        adapter->repr_priv_data = repr_priv_data;
        goto l_end;
-- 
2.52.0

Reply via email to