patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ting Xu <ting.xu@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v1] net/ice: fix invalid symmetric RSS rule created
Date: Wed,  8 Jul 2020 17:07:08 +0800	[thread overview]
Message-ID: <20200708090708.27182-1-ting.xu@intel.com> (raw)

The flow rule with symmetric toeplitz hash function and SRC_ONLY
or DST_ONLY RSS type together should not be created successfully.
Fix the RSS action parse function to stop the rule creation in
this situation.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/ice/ice_hash.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 3433cab28c..3c84a6a73f 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1044,6 +1044,19 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
 					ETH_RSS_L4_SRC_ONLY |
 					ETH_RSS_L4_DST_ONLY;
 
+			/**
+			 * Check if SRC_ONLY or DST_ONLY is set for
+			 * SYMMETRIC_TOEPLITZ hash function.
+			 */
+			if (rss->func ==
+				RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) {
+				if (rss_type & combine_type)
+					return rte_flow_error_set(error,
+					ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
+					action, "Not supported RSS types for "
+					"symmetric toeplitz hash");
+			}
+
 			/* Check if rss types match pattern. */
 			if (rss_type & ~combine_type & ~m->eth_rss_hint) {
 				return rte_flow_error_set(error,
-- 
2.17.1


                 reply	other threads:[~2020-07-08  9:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200708090708.27182-1-ting.xu@intel.com \
    --to=ting.xu@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    /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).