From: "Ding, Xuan" <xuan.ding@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "Guo, Jia" <jia.guo@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Yang, Qiming" <qiming.yang@intel.com>,
"Noonan, Gordon" <gordon.noonan@intel.com>,
"Varshney, Shashank1" <shashank1.varshney@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/ice: refine RSS configure
Date: Tue, 30 Mar 2021 03:00:19 +0000 [thread overview]
Message-ID: <SJ0PR11MB5216471A4F92165DF968B089E77D9@SJ0PR11MB5216.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210325124241.2357850-1-qi.z.zhang@intel.com>
Hi Qi,
Replies inline.
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Thursday, March 25, 2021 8:43 PM
> To: Guo, Jia <jia.guo@intel.com>; Ding, Xuan <xuan.ding@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Noonan, Gordon
> <gordon.noonan@intel.com>; Varshney, Shashank1
> <shashank1.varshney@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice: refine RSS configure
>
> The ICE_RSS_ANY_HEADERS will try to enable outer RSS for
> non-tunnel case and inner RSS for tunnel case. This confuse
> user.
>
> As we already have ICE_RSS_INNER_HEADER for tunnel case,
> So, replace ICE_RSS_ANY_HEADERS with ICE_RSS_OUTER_HEADERS
> for all exist flow which only specified the outer pattern.
>
> To enable inner RSS for any tunnel cases, a separated rule
> should be enabled.
>
> The patch also remove some unncessary condition check for GTPU
Here ' unncessary ' is a typo, should be 'unnecessary'.
> in base code, as we already can support outer RSS for GTPU.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/net/ice/base/ice_flow.c | 14 ------------
> drivers/net/ice/ice_ethdev.c | 4 ++--
> drivers/net/ice/ice_hash.c | 38 ++++++++++++++++-----------------
> 3 files changed, 21 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
> index d123206fc6..bceb257d61 100644
> --- a/drivers/net/ice/base/ice_flow.c
> +++ b/drivers/net/ice/base/ice_flow.c
> @@ -3678,13 +3678,6 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16
> vsi_handle,
> if (status)
> goto exit;
>
> - /* Don't do RSS for GTPU Outer */
> - if (segs_cnt == ICE_FLOW_SEG_SINGLE &&
> - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
> - status = ICE_SUCCESS;
> - goto exit;
> - }
> -
> /* Search for a flow profile that has matching headers, hash fields
> * and has the input VSI associated to it. If found, no further
> * operations required and exit.
> @@ -3847,13 +3840,6 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16
> vsi_handle,
> if (status)
> goto out;
>
> - /* Don't do RSS for GTPU Outer */
> - if (segs_cnt == ICE_FLOW_SEG_SINGLE &&
> - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
> - status = ICE_SUCCESS;
> - goto out;
> - }
> -
> prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
> vsi_handle,
> ICE_FLOW_FIND_PROF_CHK_FLDS);
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index 3e85e5f629..4ccf31cb41 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -2348,7 +2348,7 @@ hash_cfg_reset(struct ice_rss_hash_cfg *cfg)
> cfg->hash_flds = 0;
> cfg->addl_hdrs = 0;
> cfg->symm = 0;
> - cfg->hdr_type = ICE_RSS_ANY_HEADERS;
> + cfg->hdr_type = ICE_RSS_OUTER_HEADERS;
> }
>
> static int
> @@ -2833,7 +2833,7 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)
> __func__, ret);
>
> cfg.symm = 0;
> - cfg.hdr_type = ICE_RSS_ANY_HEADERS;
> + cfg.hdr_type = ICE_RSS_OUTER_HEADERS;
> /* Configure RSS for IPv4 with src/dst addr as input set */
> if (rss_hf & ETH_RSS_IPV4) {
> cfg.addl_hdrs = ICE_FLOW_SEG_HDR_IPV4 |
> ICE_FLOW_SEG_HDR_IPV_OTHER;
> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
> index 58a0c18d09..7d7e7052da 100644
> --- a/drivers/net/ice/ice_hash.c
> +++ b/drivers/net/ice/ice_hash.c
> @@ -110,7 +110,7 @@ struct ice_rss_hash_cfg ipv4_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 |
> ICE_FLOW_SEG_HDR_IPV_OTHER,
> ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_IPV4,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -118,7 +118,7 @@ struct ice_rss_hash_cfg ipv4_udp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP,
> ICE_FLOW_HASH_ETH | ICE_HASH_UDP_IPV4 | ICE_IPV4_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -126,7 +126,7 @@ struct ice_rss_hash_cfg ipv4_tcp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP,
> ICE_FLOW_HASH_ETH | ICE_HASH_TCP_IPV4 | ICE_IPV4_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -134,7 +134,7 @@ struct ice_rss_hash_cfg ipv4_sctp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP,
> ICE_FLOW_HASH_ETH | ICE_HASH_SCTP_IPV4 | ICE_IPV4_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -142,7 +142,7 @@ struct ice_rss_hash_cfg ipv6_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 |
> ICE_FLOW_SEG_HDR_IPV_OTHER,
> ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_IPV6,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -150,7 +150,7 @@ struct ice_rss_hash_cfg ipv6_udp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP,
> ICE_FLOW_HASH_ETH | ICE_HASH_UDP_IPV6 | ICE_IPV6_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -158,7 +158,7 @@ struct ice_rss_hash_cfg ipv6_tcp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP,
> ICE_FLOW_HASH_ETH | ICE_HASH_TCP_IPV6 | ICE_IPV6_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -166,7 +166,7 @@ struct ice_rss_hash_cfg ipv6_sctp_tmplt = {
> ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 |
> ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP,
> ICE_FLOW_HASH_ETH | ICE_HASH_SCTP_IPV6 | ICE_IPV6_PROT,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -262,7 +262,7 @@ struct ice_rss_hash_cfg eth_ipv4_esp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_ESP,
> ICE_FLOW_HASH_ESP_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -270,7 +270,7 @@ struct ice_rss_hash_cfg eth_ipv4_udp_esp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_NAT_T_ESP,
> ICE_FLOW_HASH_NAT_T_ESP_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -278,7 +278,7 @@ struct ice_rss_hash_cfg eth_ipv4_ah_tmplt = {
> ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_AH,
> ICE_FLOW_HASH_AH_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -286,7 +286,7 @@ struct ice_rss_hash_cfg eth_ipv4_l2tpv3_tmplt = {
> ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_L2TPV3,
> ICE_FLOW_HASH_L2TPV3_SESS_ID,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -294,7 +294,7 @@ struct ice_rss_hash_cfg eth_ipv4_pfcp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_PFCP_SESSION,
> ICE_FLOW_HASH_PFCP_SEID,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -302,7 +302,7 @@ struct ice_rss_hash_cfg eth_ipv6_esp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_ESP,
> ICE_FLOW_HASH_ESP_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -310,7 +310,7 @@ struct ice_rss_hash_cfg eth_ipv6_udp_esp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_NAT_T_ESP,
> ICE_FLOW_HASH_NAT_T_ESP_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -318,7 +318,7 @@ struct ice_rss_hash_cfg eth_ipv6_ah_tmplt = {
> ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_AH,
> ICE_FLOW_HASH_AH_SPI,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -326,7 +326,7 @@ struct ice_rss_hash_cfg eth_ipv6_l2tpv3_tmplt = {
> ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_L2TPV3,
> ICE_FLOW_HASH_L2TPV3_SESS_ID,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> @@ -334,14 +334,14 @@ struct ice_rss_hash_cfg eth_ipv6_pfcp_tmplt = {
> ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER |
> ICE_FLOW_SEG_HDR_PFCP_SESSION,
> ICE_FLOW_HASH_PFCP_SEID,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> struct ice_rss_hash_cfg pppoe_tmplt = {
> ICE_FLOW_SEG_HDR_ETH,
> ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_PPPOE_SESS_ID,
> - ICE_RSS_ANY_HEADERS,
> + ICE_RSS_OUTER_HEADERS,
> 0
> };
>
> --
> 2.26.2
Since PPPOE protocol is a encapsulating network protocol.
For IP/UDP or IP/TCP cases, is it right to treat it as outer cases?
Here are some doubts.
Thanks,
Xuan
next prev parent reply other threads:[~2021-03-30 3:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 12:42 Qi Zhang
2021-03-30 3:00 ` Ding, Xuan [this message]
2021-03-30 3:29 ` Zhang, Qi Z
2021-03-30 4:31 ` Ding, Xuan
2021-03-30 5:19 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR11MB5216471A4F92165DF968B089E77D9@SJ0PR11MB5216.namprd11.prod.outlook.com \
--to=xuan.ding@intel.com \
--cc=dev@dpdk.org \
--cc=gordon.noonan@intel.com \
--cc=jia.guo@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=shashank1.varshney@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).