[dpdk-dev] [PATCH v2] net/ice/base: fix wrong ptype bitmap for GRE

Qi Zhang qi.z.zhang at intel.com
Wed Nov 6 07:01:07 CET 2019


The ptype bitmap calculation for GRE packet is modified by misktake due to
commit: fc845a9d78ce ("net/ice/base: fix ptype mapping pollution from GTP flow")
which is target for GTP packet. The patch rollback that part of code.

Fixes: fc845a9d78ce ("net/ice/base: fix ptype mapping pollution from GTP flow")

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/ice/base/ice_flow.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index d6e0556e7..eaa7a3b96 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -573,9 +573,11 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GRE) {
-			src = (const ice_bitmap_t *)ice_ptypes_gre_of;
-			ice_and_bitmap(params->ptypes, params->ptypes,
-				       src, ICE_FLOW_PTYPE_MAX);
+			if (!i) {
+				src = (const ice_bitmap_t *)ice_ptypes_gre_of;
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       src, ICE_FLOW_PTYPE_MAX);
+			}
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GTPC) {
 			src = (const ice_bitmap_t *)ice_ptypes_gtpc;
 			ice_and_bitmap(params->ptypes, params->ptypes,
-- 
2.13.6



More information about the dev mailing list