Skip to contentSkip to conversation

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

PATCH Applied Qi Zhang 4 participants 4 messages Nov 6, 2019 – Nov 7, 2019 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

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

---
v3:
- fix commit log format.
v2:
- fix coding style issue

 drivers/net/ice/base/ice_flow.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ice/base/ice_flow.c +5 -3
index d6e0556e7..eaa7a3b96 100644
@@ -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,
Signature · 1 line
2.13.6
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Qi Zhang
Sent: Tuesday, November 5, 2019 10:07 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: [dpdk-dev] [PATCH v3] net/ice/base: fix wrong ptype bitmap for GRE

The ptype bitmap calculation for GRE packet is modified by misktake due to

Minor nit (if not already fixed in subsequent patch): misktake => mistake

Quoted 39 lines

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

---
v3:
- fix commit log format.
v2:
- fix coding style issue

 drivers/net/ice/base/ice_flow.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ice/base/ice_flow.c +5 -3
index d6e0556e7..eaa7a3b96 100644
@@ -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) {
drivers/net/ice/base/ice_flow.c +0 -1
 			src = (const ice_bitmap_t *)ice_ptypes_gtpc;
 			ice_and_bitmap(params->ptypes, params->ptypes,
--

2.13.6

Acked-by on v3 1/1 Applied
#2 lore raw
In reply to Qi Zhang
Quoted 39 lines · Qi Zhang

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

---
v3:
- fix commit log format.
v2:
- fix coding style issue

drivers/net/ice/base/ice_flow.c | 8 +++++---

1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ice/base/ice_flow.c +5 -3
index d6e0556e7..eaa7a3b96 100644
@@ -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,
Signature · 1 line
2.13.6

Applied to dpdk-next-net-intel with some typo fixes. Thanks.

#3 lore raw
Quoted 43 lines · Ye Xiaolong
Quoted 39 lines · Qi Zhang

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

---
v3:
- fix commit log format.
v2:
- fix coding style issue

drivers/net/ice/base/ice_flow.c | 8 +++++---

1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ice/base/ice_flow.c +5 -3
index d6e0556e7..eaa7a3b96 100644
@@ -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,
Signature · 1 line
2.13.6
Quoted 2 lines

Applied to dpdk-next-net-intel with some typo fixes. Thanks.

Squashed into relevant commit in next-net, thanks.