For GTPoGRE, When setting the prot_id of prot, it should be set to second inner.
Fixes: 34a0e7c44f2b ("net/ice/base: improve flow director masking") Cc: sta...@dpdk.org Signed-off-by: Kevin Liu <kevinx....@intel.com> Signed-off-by: Qi Zhang <qi.z.zh...@intel.com> --- drivers/net/ice/base/ice_flow.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 182fac08a9..33e97ec333 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -1404,7 +1404,10 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, case ICE_FLOW_FIELD_IDX_IPV4_TTL: case ICE_FLOW_FIELD_IDX_IPV4_PROT: prot_id = seg == 0 ? ICE_PROT_IPV4_OF_OR_S : ICE_PROT_IPV4_IL; - + if (params->prof->segs[0].hdrs & ICE_FLOW_SEG_HDR_GRE && + params->prof->segs[1].hdrs & ICE_FLOW_SEG_HDR_GTPU && + seg == 1) + prot_id = ICE_PROT_IPV4_IL_IL; /* TTL and PROT share the same extraction seq. entry. * Each is considered a sibling to the other in terms of sharing * the same extraction sequence entry. @@ -1432,7 +1435,10 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, prot_id = seg == 0 ? ICE_PROT_IPV6_NEXT_PROTO : ICE_PROT_IPV6_IL; - + if (params->prof->segs[0].hdrs & ICE_FLOW_SEG_HDR_GRE && + params->prof->segs[1].hdrs & ICE_FLOW_SEG_HDR_GTPU && + seg == 1) + prot_id = ICE_PROT_IPV6_IL_IL; /* TTL and PROT share the same extraction seq. entry. * Each is considered a sibling to the other in terms of sharing * the same extraction sequence entry. -- 2.31.1