Skip to contentSkip to conversation

net/ice/base: fix wrong ptype bitmap for GRE

PATCH Superseded Qi Zhang 1 participant 1 message Nov 6, 2019 Network drivers

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH v2 1/1 net/ice/base: fix wrong ptype bitmap for GRE

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")

---

v2:
- fix coding style warning.

 drivers/net/ice/base/ice_flow.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/net/ice/base/ice_flow.c +7 -4
index d6e0556e7..847a20509 100644
@@ -573,10 +573,13 @@ 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);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_GTPC) {
+			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,
 				       src, ICE_FLOW_PTYPE_MAX);
Signature · 1 line
2.13.6