From: Jie Liu <[email protected]> For repr_vf_vsi_id, use the primary VSI id directly instead of falling back to the DPDK VSI id when the kernel VSI id is invalid. The kernel side guarantees the primary VSI id it provides is always valid in any scenario, so the fallback ternary is unnecessary.
Cc: [email protected] Signed-off-by: Jie Liu <[email protected]> --- drivers/net/sxe2/sxe2_switchdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/sxe2/sxe2_switchdev.c b/drivers/net/sxe2/sxe2_switchdev.c index d0304ccc94..466182c55c 100644 --- a/drivers/net/sxe2/sxe2_switchdev.c +++ b/drivers/net/sxe2/sxe2_switchdev.c @@ -324,10 +324,7 @@ int32_t sxe2_switchdev_repr_private_data_init(struct rte_eth_dev *dev, 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_primary_vsi_id; adapter->repr_priv_data = repr_priv_data; goto l_end; -- 2.52.0

