DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Yang, SteveX" <stevex.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix set rss hash function invalid
Date: Mon, 21 Jun 2021 07:14:00 +0000	[thread overview]
Message-ID: <MN2PR11MB3807E11771B59ADF6B89EA62F70A9@MN2PR11MB3807.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210611065457.988344-1-stevex.yang@intel.com>



> -----Original Message-----
> From: Yang, SteveX <stevex.yang@intel.com>
> Sent: Friday, June 11, 2021 2:55 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>
> Subject: [PATCH v2] net/i40e: fix set rss hash function invalid
> 
> i40e can support following rss hash function types: default/toeplitz,
> symmetric toeplitz, and simple_xor. However, when filter engine parses
> pattern action, it only supports symmetric toeplitz & default.
> 
> Add simple_xor and toeplitz hash functions support when parsing pattern
> action.
> 
> Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")
Why didn't CC stable?

> 
> Signed-off-by: Steve Yang <stevex.yang@intel.com>
> ---
> v2:
>  - add the fix line.
>  - support simple_xor and toeplitz hash functions explicitly.
> 
>  drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c
> index b1cb24f437..0cef21c88f 100644
> --- a/drivers/net/i40e/i40e_hash.c
> +++ b/drivers/net/i40e/i40e_hash.c
> @@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const struct
> rte_eth_dev *dev,
>  					  NULL,
>  					  "RSS Queues not supported when
> pattern specified");
> 
> -	if (rss_act->func ==
> RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)
> +	switch (rss_act->func) {
> +	case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
>  		rss_conf->symmetric_enable = true;
> -	else if (rss_act->func != RTE_ETH_HASH_FUNCTION_DEFAULT)
> -		return rte_flow_error_set(error, -EINVAL,
> -
> RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> -					  NULL,
> -					  "Only symmetric TOEPLITZ
> supported when pattern specified");
> +		break;
> +	case RTE_ETH_HASH_FUNCTION_DEFAULT:
> +	case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
> +	case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
> +		break;
> +	default:
> +		return rte_flow_error_set(error, EINVAL,
> +				RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> +				NULL,
> +				"RSS hash function not supported "
> +				"when pattern specified");
> +	}
> 
>  	if (!i40e_hash_validate_rss_types(rss_act->types))
>  		return rte_flow_error_set(error, EINVAL,
> --
> 2.27.0


  reply	other threads:[~2021-06-21  7:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  1:35 [dpdk-dev] [PATCH v1] " Steve Yang
2021-06-11  1:45 ` Xing, Beilei
2021-06-11  6:54 ` [dpdk-dev] [PATCH v2] " Steve Yang
2021-06-21  7:14   ` Xing, Beilei [this message]
2021-06-21  8:03   ` [dpdk-dev] [PATCH v3] " Steve Yang
2021-06-21  8:19     ` Xing, Beilei
2021-06-21  8:30       ` 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=MN2PR11MB3807E11771B59ADF6B89EA62F70A9@MN2PR11MB3807.namprd11.prod.outlook.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=stevex.yang@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).