DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice/base: fix ptype mapping polution from gtp flow
@ 2019-10-30  1:14 Qi Zhang
  2019-10-30  5:05 ` Ye Xiaolong
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2019-10-30  1:14 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang

A new gtp flow's profile will capture other profile's non-gtp ptypes
which is unexpected. For example, an RSS flow for inner IP / UDP on
regular tunnel packet's behaviour will changed by a following GTP RSS
rule when inner IP is the only inputset, since all tunnel ptypes has
been shifted from the first profile to the second one.

The patch fix the issue by correcting the ptype mapping that prevent
the ptype shift.

Fixes: d1c2f76b440a ("net/ice/base: support GTP and PPPoE protocols")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 40 +++++++++++++++-------------------------
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index d2dbb1177..88e548938 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -573,35 +573,25 @@ 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) {
-			if (!i) {
-				src = (const ice_bitmap_t *)ice_ptypes_gre_of;
-				ice_and_bitmap(params->ptypes, params->ptypes,
-					       src, ICE_FLOW_PTYPE_MAX);
-			}
+			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_gtpc;
-				ice_and_bitmap(params->ptypes, params->ptypes,
-					       src, ICE_FLOW_PTYPE_MAX);
-			}
+			src = (const ice_bitmap_t *)ice_ptypes_gtpc;
+			ice_and_bitmap(params->ptypes, params->ptypes,
+				       src, ICE_FLOW_PTYPE_MAX);
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GTPC_TEID) {
-			if (!i) {
-				src = (const ice_bitmap_t *)ice_ptypes_gtpc_tid;
-				ice_and_bitmap(params->ptypes, params->ptypes,
-					       src, ICE_FLOW_PTYPE_MAX);
-			}
+			src = (const ice_bitmap_t *)ice_ptypes_gtpc_tid;
+			ice_and_bitmap(params->ptypes, params->ptypes,
+				       src, ICE_FLOW_PTYPE_MAX);
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GTPU) {
-			if (!i) {
-				src = (const ice_bitmap_t *)ice_ptypes_gtpu;
-				ice_and_bitmap(params->ptypes, params->ptypes,
-					       src, ICE_FLOW_PTYPE_MAX);
-			}
+			src = (const ice_bitmap_t *)ice_ptypes_gtpu;
+			ice_and_bitmap(params->ptypes, params->ptypes,
+				       src, ICE_FLOW_PTYPE_MAX);
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GTPU_EH) {
-			if (!i) {
-				src = (const ice_bitmap_t *)ice_ptypes_gtpu;
-				ice_and_bitmap(params->ptypes, params->ptypes,
-					       src, ICE_FLOW_PTYPE_MAX);
-			}
+			src = (const ice_bitmap_t *)ice_ptypes_gtpu;
+			ice_and_bitmap(params->ptypes, params->ptypes,
+				       src, ICE_FLOW_PTYPE_MAX);
 
 			/* Attributes for GTP packet with Extension Header */
 			params->attr = ice_attr_gtpu_eh;
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice/base: fix ptype mapping polution from gtp flow
  2019-10-30  1:14 [dpdk-dev] [PATCH] net/ice/base: fix ptype mapping polution from gtp flow Qi Zhang
@ 2019-10-30  5:05 ` Ye Xiaolong
  0 siblings, 0 replies; 2+ messages in thread
From: Ye Xiaolong @ 2019-10-30  5:05 UTC (permalink / raw)
  To: Qi Zhang; +Cc: qiming.yang, dev

On 10/30, Qi Zhang wrote:
>A new gtp flow's profile will capture other profile's non-gtp ptypes
>which is unexpected. For example, an RSS flow for inner IP / UDP on
>regular tunnel packet's behaviour will changed by a following GTP RSS
>rule when inner IP is the only inputset, since all tunnel ptypes has
>been shifted from the first profile to the second one.
>
>The patch fix the issue by correcting the ptype mapping that prevent
>the ptype shift.
>
>Fixes: d1c2f76b440a ("net/ice/base: support GTP and PPPoE protocols")
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>Tested-by: Simei Su <simei.su@intel.com>
>---

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-30  5:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  1:14 [dpdk-dev] [PATCH] net/ice/base: fix ptype mapping polution from gtp flow Qi Zhang
2019-10-30  5:05 ` Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).