From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Su, Simei" <simei.su@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Guo, Jia" <jia.guo@intel.com>,
"Guo, Junfeng" <junfeng.guo@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix invalid RSS type
Date: Fri, 30 Oct 2020 09:41:19 +0000 [thread overview]
Message-ID: <466af3c9e05d44cfa39a8b80ac834ff9@intel.com> (raw)
In-Reply-To: <20201030031638.370766-1-simei.su@intel.com>
> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Friday, October 30, 2020 11:17 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH] net/iavf: fix invalid RSS type
>
> When a RSS rule with symmetric hash function, the RSS type shouldn't carry
> with SRC/DST_ONLY. This patch adds invalid RSS type check for the case.
>
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
> drivers/net/iavf/iavf_hash.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> be821b6..6d0360a 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -917,6 +917,22 @@ iavf_hash_parse_action(struct
> iavf_pattern_match_item *match_item,
> */
> rss_type = rte_eth_rss_hf_refine(rss_type);
>
> + /**
> + * Check if SRC/DST_ONLY is set for SYMMETRIC_TOEPLITZ
> + * hash function.
> + */
> + if (rss->func ==
> + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) {
> + if (rss_type & ((VALID_RSS_ATTR &
> + ~RTE_ETH_RSS_L3_PRE64) |
> + ~(VALID_RSS_IPV4 | VALID_RSS_IPV6)))
> + return rte_flow_error_set(error,
> + ENOTSUP,
> + RTE_FLOW_ERROR_TYPE_ACTION,
> + action,
> + "invalid rss types");
> + }
Better to move above check into the below "iavf_any_invalid_rss_type"
> +
> if (iavf_any_invalid_rss_type(rss_type,
> match_item->input_set_mask))
> return rte_flow_error_set(error, ENOTSUP,
> --
> 2.9.5
next prev parent reply other threads:[~2020-10-30 9:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 3:16 Simei Su
2020-10-30 9:41 ` Zhang, Qi Z [this message]
2020-11-02 2:11 ` Su, Simei
2020-11-02 2:04 ` [dpdk-dev] [PATCH v2] " Simei Su
2020-11-02 11:39 ` [dpdk-dev] [PATCH v3] " Simei Su
2020-11-02 11:55 ` [dpdk-dev] [PATCH v4] " Simei Su
2020-11-02 12:18 ` 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=466af3c9e05d44cfa39a8b80ac834ff9@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=junfeng.guo@intel.com \
--cc=simei.su@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).