MMG PF vports use the VCPF function-type namespace. MEV uses
CPCHNL2_FTYPE_LAN_PF (2), while MMG uses VCPF_CPCHNL2_FTYPE_LAN_PF (0).
cpfl_get_vsi_id() currently uses the MEV function type for every PF.
On MMG, this creates a vport-map key that does not match the key received
from the control plane. The lookup fails, and flow validation cannot
obtain the VSI needed to build flow metadata.
Select the function type based on the device ID.
Fixes: 5a329d2844a9 ("net/cpfl: make device checks more generic")
Signed-off-by: Shaiq Wani <[email protected]>
---
drivers/net/intel/cpfl/cpfl_ethdev.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.h
b/drivers/net/intel/cpfl/cpfl_ethdev.h
index 49a0979f2c..966647c8d9 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.h
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.h
@@ -354,7 +354,10 @@ cpfl_get_vsi_id(struct cpfl_itf *itf)
if (!idpf_is_vf_device(&itf->adapter->base.hw)) {
vport_id = ((struct cpfl_vport *)itf)->base.vport_id;
- vport_identity.func_type = CPCHNL2_FTYPE_LAN_PF;
+ if (itf->adapter->base.hw.device_id == CPFL_DEV_ID_MEV)
+ vport_identity.func_type = CPCHNL2_FTYPE_LAN_PF;
+ else
+ vport_identity.func_type =
VCPF_CPCHNL2_FTYPE_LAN_PF;
/* host: CPFL_HOST0_CPF_ID, acc: CPFL_ACC_CPF_ID */
vport_identity.pf_id = (itf->adapter->host_id ==
CPFL_HOST_ID_ACC) ?
CPFL_ACC_CPF_ID :
CPFL_HOST0_CPF_ID;
--
2.34.1