patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU
@ 2020-05-13 12:11 Qi Zhang
  2020-05-13 12:17 ` Su, Simei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qi Zhang @ 2020-05-13 12:11 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, simei.su, xiaolong.ye, Qi Zhang, stable

All supported pattern for GTPU include extend header:
pattern_eth_ipv4_gtpu_eh_ipv4
pattern_eth_ipv4_gtpu_eh_ipv4_udp
pattern_eth_ipv4_gtpu_eh_ipv4_tcp

So the RSS rule should only take effect on GTPU packet that contains
extend header. The patch fix above issue and also allow inner l4 port
as input set.

Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension header")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 42 +++++++++++++++++++++++++++++------------
 drivers/net/ice/base/ice_flow.h |  1 +
 drivers/net/ice/ice_hash.c      | 10 +++++++---
 3 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index c876377ed..fbb4ae009 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -694,11 +694,41 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
+				ice_and_bitmap(params->ptypes,
+						params->ptypes, src,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       (const ice_bitmap_t *)
+					       ice_ptypes_tcp_il,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       src, ICE_FLOW_PTYPE_MAX);
+			}
 		} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
 			src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv6_ofos :
 				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
+				ice_and_bitmap(params->ptypes,
+						params->ptypes, src,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       (const ice_bitmap_t *)
+					       ice_ptypes_tcp_il,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       src, ICE_FLOW_PTYPE_MAX);
+			}
 		}
 
 		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
@@ -706,18 +736,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 				(const ice_bitmap_t *)ice_ptypes_icmp_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
-			src = (const ice_bitmap_t *)ice_ptypes_udp_il;
-			ice_and_bitmap(params->ptypes, params->ptypes, src,
-				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
-			ice_and_bitmap(params->ptypes, params->ptypes,
-				       (const ice_bitmap_t *)ice_ptypes_tcp_il,
-				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
-			src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
-			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;
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 37f1c76ae..44e4bf79a 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -160,6 +160,7 @@ enum ice_flow_seg_hdr {
  * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
  */
 #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
+			       ICE_FLOW_SEG_HDR_GTPU_EH | \
 			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
 			       ICE_FLOW_SEG_HDR_GTPU_UP)
 #define ICE_FLOW_SEG_HDR_PFCP (ICE_FLOW_SEG_HDR_PFCP_NODE | \
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 72c8ddc9a..11435cbfb 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {
 struct rss_type_match_hdr hint_8 = {
 	ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP};
 struct rss_type_match_hdr hint_9 = {
-	ICE_FLOW_SEG_HDR_GTPU_IP,	ETH_RSS_IPV4};
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4};
 struct rss_type_match_hdr hint_10 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_IPV4};
 struct rss_type_match_hdr hint_11 = {
@@ -104,6 +104,10 @@ struct rss_type_match_hdr hint_12 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_TCP};
 struct rss_type_match_hdr hint_13 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_SCTP};
+struct rss_type_match_hdr hint_14 = {
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};
+struct rss_type_match_hdr hint_15 = {
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
 
 /* Supported pattern for os default package. */
 static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
@@ -130,8 +134,8 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
 	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,  &hint_8},
 	{pattern_empty,			    ICE_INSET_NONE,  &hint_0},
 	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_14},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_15},
 	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
 	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,  &hint_11},
 	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,  &hint_12},
-- 
2.13.6


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

* Re: [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU
  2020-05-13 12:11 [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU Qi Zhang
@ 2020-05-13 12:17 ` Su, Simei
  2020-05-18  8:27 ` Yang, Qiming
  2020-05-19  1:33 ` Ye Xiaolong
  2 siblings, 0 replies; 4+ messages in thread
From: Su, Simei @ 2020-05-13 12:17 UTC (permalink / raw)
  To: Zhang, Qi Z, Yang, Qiming; +Cc: dev, Ye, Xiaolong, stable

Test-by Simei, Su <simei.su@intel.com>

> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, May 13, 2020 8:12 PM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Su, Simei <simei.su@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/ice: fix RSS for GTPU
> 
> All supported pattern for GTPU include extend header:
> pattern_eth_ipv4_gtpu_eh_ipv4
> pattern_eth_ipv4_gtpu_eh_ipv4_udp
> pattern_eth_ipv4_gtpu_eh_ipv4_tcp
> 
> So the RSS rule should only take effect on GTPU packet that contains extend
> header. The patch fix above issue and also allow inner l4 port as input set.
> 
> Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension
> header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_flow.c | 42
> +++++++++++++++++++++++++++++------------
>  drivers/net/ice/base/ice_flow.h |  1 +
>  drivers/net/ice/ice_hash.c      | 10 +++++++---
>  3 files changed, 38 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
> index c876377ed..fbb4ae009 100644
> --- a/drivers/net/ice/base/ice_flow.c
> +++ b/drivers/net/ice/base/ice_flow.c
> @@ -694,11 +694,41 @@ ice_flow_proc_seg_hdrs(struct
> ice_flow_prof_params *params)
>  				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes, src,
>  				       ICE_FLOW_PTYPE_MAX);
> +			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> +				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
> +				ice_and_bitmap(params->ptypes,
> +						params->ptypes, src,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> +				ice_and_bitmap(params->ptypes, params->ptypes,
> +					       (const ice_bitmap_t *)
> +					       ice_ptypes_tcp_il,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> +				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
> +				ice_and_bitmap(params->ptypes, params->ptypes,
> +					       src, ICE_FLOW_PTYPE_MAX);
> +			}
>  		} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
>  			src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv6_ofos :
>  				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes, src,
>  				       ICE_FLOW_PTYPE_MAX);
> +			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> +				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
> +				ice_and_bitmap(params->ptypes,
> +						params->ptypes, src,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> +				ice_and_bitmap(params->ptypes, params->ptypes,
> +					       (const ice_bitmap_t *)
> +					       ice_ptypes_tcp_il,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> +				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
> +				ice_and_bitmap(params->ptypes, params->ptypes,
> +					       src, ICE_FLOW_PTYPE_MAX);
> +			}
>  		}
> 
>  		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
> @@ -706,18 +736,6 @@ ice_flow_proc_seg_hdrs(struct
> ice_flow_prof_params *params)
>  				(const ice_bitmap_t *)ice_ptypes_icmp_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes, src,
>  				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> -			src = (const ice_bitmap_t *)ice_ptypes_udp_il;
> -			ice_and_bitmap(params->ptypes, params->ptypes, src,
> -				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> -			ice_and_bitmap(params->ptypes, params->ptypes,
> -				       (const ice_bitmap_t *)ice_ptypes_tcp_il,
> -				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> -			src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
> -			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; diff --git
> a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h index
> 37f1c76ae..44e4bf79a 100644
> --- a/drivers/net/ice/base/ice_flow.h
> +++ b/drivers/net/ice/base/ice_flow.h
> @@ -160,6 +160,7 @@ enum ice_flow_seg_hdr {
>   * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
>   */
>  #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
> +			       ICE_FLOW_SEG_HDR_GTPU_EH | \
>  			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
>  			       ICE_FLOW_SEG_HDR_GTPU_UP)
>  #define ICE_FLOW_SEG_HDR_PFCP (ICE_FLOW_SEG_HDR_PFCP_NODE | \ diff
> --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index
> 72c8ddc9a..11435cbfb 100644
> --- a/drivers/net/ice/ice_hash.c
> +++ b/drivers/net/ice/ice_hash.c
> @@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {  struct
> rss_type_match_hdr hint_8 = {
>  	ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP,
> ETH_RSS_NONFRAG_IPV6_SCTP};  struct rss_type_match_hdr hint_9 = {
> -	ICE_FLOW_SEG_HDR_GTPU_IP,	ETH_RSS_IPV4};
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4};
>  struct rss_type_match_hdr hint_10 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_IPV4};
>  struct rss_type_match_hdr hint_11 = {
> @@ -104,6 +104,10 @@ struct rss_type_match_hdr hint_12 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_TCP};
>  struct rss_type_match_hdr hint_13 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_SCTP};
> +struct rss_type_match_hdr hint_14 = {
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP}; struct
> +rss_type_match_hdr hint_15 = {
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
> 
>  /* Supported pattern for os default package. */  static struct
> ice_pattern_match_item ice_hash_pattern_list_os[] = { @@ -130,8 +134,8
> @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
>  	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,  &hint_8},
>  	{pattern_empty,			    ICE_INSET_NONE,  &hint_0},
>  	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,  &hint_9},
> -	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
> -	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
> +	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_14},
> +	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_15},
>  	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
>  	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,  &hint_11},
>  	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,  &hint_12},
> --
> 2.13.6


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

* Re: [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU
  2020-05-13 12:11 [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU Qi Zhang
  2020-05-13 12:17 ` Su, Simei
@ 2020-05-18  8:27 ` Yang, Qiming
  2020-05-19  1:33 ` Ye Xiaolong
  2 siblings, 0 replies; 4+ messages in thread
From: Yang, Qiming @ 2020-05-18  8:27 UTC (permalink / raw)
  To: Zhang, Qi Z; +Cc: dev, Su, Simei, Ye, Xiaolong, stable

Acked-by: Qiming Yang <qiming.yang@intel.com>

> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, May 13, 2020 20:12
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Su, Simei <simei.su@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/ice: fix RSS for GTPU
> 
> All supported pattern for GTPU include extend header:
> pattern_eth_ipv4_gtpu_eh_ipv4
> pattern_eth_ipv4_gtpu_eh_ipv4_udp
> pattern_eth_ipv4_gtpu_eh_ipv4_tcp
> 
> So the RSS rule should only take effect on GTPU packet that contains extend
> header. The patch fix above issue and also allow inner l4 port as input set.
> 
> Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension
> header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_flow.c | 42 +++++++++++++++++++++++++++++--
> ----------
>  drivers/net/ice/base/ice_flow.h |  1 +
>  drivers/net/ice/ice_hash.c      | 10 +++++++---
>  3 files changed, 38 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_flow.c
> b/drivers/net/ice/base/ice_flow.c index c876377ed..fbb4ae009 100644
> --- a/drivers/net/ice/base/ice_flow.c
> +++ b/drivers/net/ice/base/ice_flow.c
> @@ -694,11 +694,41 @@ ice_flow_proc_seg_hdrs(struct
> ice_flow_prof_params *params)
>  				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes,
> src,
>  				       ICE_FLOW_PTYPE_MAX);
> +			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> +				src = (const ice_bitmap_t
> *)ice_ptypes_udp_il;
> +				ice_and_bitmap(params->ptypes,
> +						params->ptypes, src,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> +				ice_and_bitmap(params->ptypes, params-
> >ptypes,
> +					       (const ice_bitmap_t *)
> +					       ice_ptypes_tcp_il,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> +				src = (const ice_bitmap_t
> *)ice_ptypes_sctp_il;
> +				ice_and_bitmap(params->ptypes, params-
> >ptypes,
> +					       src, ICE_FLOW_PTYPE_MAX);
> +			}
>  		} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
>  			src = !i ? (const ice_bitmap_t
> *)ice_ptypes_ipv6_ofos :
>  				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes,
> src,
>  				       ICE_FLOW_PTYPE_MAX);
> +			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> +				src = (const ice_bitmap_t
> *)ice_ptypes_udp_il;
> +				ice_and_bitmap(params->ptypes,
> +						params->ptypes, src,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> +				ice_and_bitmap(params->ptypes, params-
> >ptypes,
> +					       (const ice_bitmap_t *)
> +					       ice_ptypes_tcp_il,
> +					       ICE_FLOW_PTYPE_MAX);
> +			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> +				src = (const ice_bitmap_t
> *)ice_ptypes_sctp_il;
> +				ice_and_bitmap(params->ptypes, params-
> >ptypes,
> +					       src, ICE_FLOW_PTYPE_MAX);
> +			}
>  		}
> 
>  		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
> @@ -706,18 +736,6 @@ ice_flow_proc_seg_hdrs(struct
> ice_flow_prof_params *params)
>  				(const ice_bitmap_t *)ice_ptypes_icmp_il;
>  			ice_and_bitmap(params->ptypes, params->ptypes,
> src,
>  				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
> -			src = (const ice_bitmap_t *)ice_ptypes_udp_il;
> -			ice_and_bitmap(params->ptypes, params->ptypes,
> src,
> -				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
> -			ice_and_bitmap(params->ptypes, params->ptypes,
> -				       (const ice_bitmap_t *)ice_ptypes_tcp_il,
> -				       ICE_FLOW_PTYPE_MAX);
> -		} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
> -			src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
> -			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; diff --git a/drivers/net/ice/base/ice_flow.h
> b/drivers/net/ice/base/ice_flow.h index 37f1c76ae..44e4bf79a 100644
> --- a/drivers/net/ice/base/ice_flow.h
> +++ b/drivers/net/ice/base/ice_flow.h
> @@ -160,6 +160,7 @@ enum ice_flow_seg_hdr {
>   * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
>   */
>  #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
> +			       ICE_FLOW_SEG_HDR_GTPU_EH | \
>  			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
>  			       ICE_FLOW_SEG_HDR_GTPU_UP)
>  #define ICE_FLOW_SEG_HDR_PFCP (ICE_FLOW_SEG_HDR_PFCP_NODE | \
> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index
> 72c8ddc9a..11435cbfb 100644
> --- a/drivers/net/ice/ice_hash.c
> +++ b/drivers/net/ice/ice_hash.c
> @@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {  struct
> rss_type_match_hdr hint_8 = {
>  	ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP,
> ETH_RSS_NONFRAG_IPV6_SCTP};  struct rss_type_match_hdr hint_9 = {
> -	ICE_FLOW_SEG_HDR_GTPU_IP,	ETH_RSS_IPV4};
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4};
>  struct rss_type_match_hdr hint_10 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_IPV4};
>  struct rss_type_match_hdr hint_11 = {
> @@ -104,6 +104,10 @@ struct rss_type_match_hdr hint_12 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_TCP};
>  struct rss_type_match_hdr hint_13 = {
>  	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_SCTP};
> +struct rss_type_match_hdr hint_14 = {
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};
> struct
> +rss_type_match_hdr hint_15 = {
> +	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
> 
>  /* Supported pattern for os default package. */  static struct
> ice_pattern_match_item ice_hash_pattern_list_os[] = { @@ -130,8 +134,8
> @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] =
> {
>  	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,
> &hint_8},
>  	{pattern_empty,			    ICE_INSET_NONE,
> &hint_0},
>  	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,
> &hint_9},
> -	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
> -	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
> +	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,
> &hint_14},
> +	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_15},
>  	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
>  	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,
> &hint_11},
>  	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,
> &hint_12},
> --
> 2.13.6


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

* Re: [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU
  2020-05-13 12:11 [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU Qi Zhang
  2020-05-13 12:17 ` Su, Simei
  2020-05-18  8:27 ` Yang, Qiming
@ 2020-05-19  1:33 ` Ye Xiaolong
  2 siblings, 0 replies; 4+ messages in thread
From: Ye Xiaolong @ 2020-05-19  1:33 UTC (permalink / raw)
  To: Qi Zhang; +Cc: qiming.yang, dev, simei.su, stable

On 05/13, Qi Zhang wrote:
>All supported pattern for GTPU include extend header:
>pattern_eth_ipv4_gtpu_eh_ipv4
>pattern_eth_ipv4_gtpu_eh_ipv4_udp
>pattern_eth_ipv4_gtpu_eh_ipv4_tcp
>
>So the RSS rule should only take effect on GTPU packet that contains
>extend header. The patch fix above issue and also allow inner l4 port
>as input set.
>
>Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension header")
>Cc: stable@dpdk.org
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> drivers/net/ice/base/ice_flow.c | 42 +++++++++++++++++++++++++++++------------
> drivers/net/ice/base/ice_flow.h |  1 +
> drivers/net/ice/ice_hash.c      | 10 +++++++---
> 3 files changed, 38 insertions(+), 15 deletions(-)
>
>diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
>index c876377ed..fbb4ae009 100644
>--- a/drivers/net/ice/base/ice_flow.c
>+++ b/drivers/net/ice/base/ice_flow.c
>@@ -694,11 +694,41 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
> 				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
> 			ice_and_bitmap(params->ptypes, params->ptypes, src,
> 				       ICE_FLOW_PTYPE_MAX);
>+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
>+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
>+				ice_and_bitmap(params->ptypes,
>+						params->ptypes, src,
>+					       ICE_FLOW_PTYPE_MAX);
>+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
>+				ice_and_bitmap(params->ptypes, params->ptypes,
>+					       (const ice_bitmap_t *)
>+					       ice_ptypes_tcp_il,
>+					       ICE_FLOW_PTYPE_MAX);
>+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
>+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
>+				ice_and_bitmap(params->ptypes, params->ptypes,
>+					       src, ICE_FLOW_PTYPE_MAX);
>+			}
> 		} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
> 			src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv6_ofos :
> 				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
> 			ice_and_bitmap(params->ptypes, params->ptypes, src,
> 				       ICE_FLOW_PTYPE_MAX);
>+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
>+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
>+				ice_and_bitmap(params->ptypes,
>+						params->ptypes, src,
>+					       ICE_FLOW_PTYPE_MAX);
>+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
>+				ice_and_bitmap(params->ptypes, params->ptypes,
>+					       (const ice_bitmap_t *)
>+					       ice_ptypes_tcp_il,
>+					       ICE_FLOW_PTYPE_MAX);
>+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
>+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
>+				ice_and_bitmap(params->ptypes, params->ptypes,
>+					       src, ICE_FLOW_PTYPE_MAX);
>+			}
> 		}
> 
> 		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
>@@ -706,18 +736,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
> 				(const ice_bitmap_t *)ice_ptypes_icmp_il;
> 			ice_and_bitmap(params->ptypes, params->ptypes, src,
> 				       ICE_FLOW_PTYPE_MAX);
>-		} else if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
>-			src = (const ice_bitmap_t *)ice_ptypes_udp_il;
>-			ice_and_bitmap(params->ptypes, params->ptypes, src,
>-				       ICE_FLOW_PTYPE_MAX);
>-		} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
>-			ice_and_bitmap(params->ptypes, params->ptypes,
>-				       (const ice_bitmap_t *)ice_ptypes_tcp_il,
>-				       ICE_FLOW_PTYPE_MAX);
>-		} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
>-			src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
>-			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;
>diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
>index 37f1c76ae..44e4bf79a 100644
>--- a/drivers/net/ice/base/ice_flow.h
>+++ b/drivers/net/ice/base/ice_flow.h
>@@ -160,6 +160,7 @@ enum ice_flow_seg_hdr {
>  * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
>  */
> #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
>+			       ICE_FLOW_SEG_HDR_GTPU_EH | \
> 			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
> 			       ICE_FLOW_SEG_HDR_GTPU_UP)
> #define ICE_FLOW_SEG_HDR_PFCP (ICE_FLOW_SEG_HDR_PFCP_NODE | \
>diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
>index 72c8ddc9a..11435cbfb 100644
>--- a/drivers/net/ice/ice_hash.c
>+++ b/drivers/net/ice/ice_hash.c
>@@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {
> struct rss_type_match_hdr hint_8 = {
> 	ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP};
> struct rss_type_match_hdr hint_9 = {
>-	ICE_FLOW_SEG_HDR_GTPU_IP,	ETH_RSS_IPV4};
>+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4};
> struct rss_type_match_hdr hint_10 = {
> 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_IPV4};
> struct rss_type_match_hdr hint_11 = {
>@@ -104,6 +104,10 @@ struct rss_type_match_hdr hint_12 = {
> 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_TCP};
> struct rss_type_match_hdr hint_13 = {
> 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_SCTP};
>+struct rss_type_match_hdr hint_14 = {
>+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};
>+struct rss_type_match_hdr hint_15 = {
>+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
> 
> /* Supported pattern for os default package. */
> static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
>@@ -130,8 +134,8 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
> 	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,  &hint_8},
> 	{pattern_empty,			    ICE_INSET_NONE,  &hint_0},
> 	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,  &hint_9},
>-	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
>-	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
>+	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_14},
>+	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_15},
> 	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
> 	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,  &hint_11},
> 	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,  &hint_12},
>-- 
>2.13.6
>

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

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

end of thread, other threads:[~2020-05-19  1:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 12:11 [dpdk-stable] [PATCH] net/ice: fix RSS for GTPU Qi Zhang
2020-05-13 12:17 ` Su, Simei
2020-05-18  8:27 ` Yang, Qiming
2020-05-19  1:33 ` Ye Xiaolong

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git