From: Wenjun Wu <wenjun1.wu@intel.com>
To: dev@dpdk.org, qi.z.zhang@intel.com
Cc: Yuying Zhang <yuying.zhang@intel.com>
Subject: [dpdk-dev] [PATCH 20.11 1/7] net/ice: add priority check for flow filters
Date: Fri, 10 Sep 2021 16:08:15 +0800 [thread overview]
Message-ID: <20210910080821.18718-2-wenjun1.wu@intel.com> (raw)
In-Reply-To: <20210910080821.18718-1-wenjun1.wu@intel.com>
From: Yuying Zhang <yuying.zhang@intel.com>
This patch is not for LTS upstream, just for users to cherry-pick.
Priority 0 and 1 were supported in switch filter. However,
FDIR, ACL and RSS don't support priority 1. Add priority check
in FDIR, ACL and RSS filter parse functions.
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
---
drivers/net/ice/ice_acl_filter.c | 5 ++++-
drivers/net/ice/ice_fdir_filter.c | 5 ++++-
drivers/net/ice/ice_hash.c | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index 14e36aa9f6..201c9fb382 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -904,7 +904,7 @@ ice_acl_parse(struct ice_adapter *ad,
uint32_t array_len,
const struct rte_flow_item pattern[],
const struct rte_flow_action actions[],
- uint32_t priority __rte_unused,
+ uint32_t priority,
void **meta,
struct rte_flow_error *error)
{
@@ -914,6 +914,9 @@ ice_acl_parse(struct ice_adapter *ad,
uint64_t input_set;
int ret;
+ if (priority >= 1)
+ return -rte_errno;
+
memset(filter, 0, sizeof(*filter));
item = ice_search_pattern_match_item(pattern, array, array_len, error);
if (!item)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index be04fcb8f3..1a9280a2eb 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -2029,7 +2029,7 @@ ice_fdir_parse(struct ice_adapter *ad,
uint32_t array_len,
const struct rte_flow_item pattern[],
const struct rte_flow_action actions[],
- uint32_t priority __rte_unused,
+ uint32_t priority,
void **meta,
struct rte_flow_error *error)
{
@@ -2039,6 +2039,9 @@ ice_fdir_parse(struct ice_adapter *ad,
uint64_t input_set;
int ret;
+ if (priority >= 1)
+ return -rte_errno;
+
memset(filter, 0, sizeof(*filter));
item = ice_search_pattern_match_item(pattern, array, array_len, error);
if (!item)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index ae095eb3cf..b8a87ea1dd 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1238,7 +1238,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
uint32_t array_len,
const struct rte_flow_item pattern[],
const struct rte_flow_action actions[],
- uint32_t priority __rte_unused,
+ uint32_t priority,
void **meta,
struct rte_flow_error *error)
{
@@ -1246,6 +1246,9 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
struct ice_pattern_match_item *pattern_match_item;
struct rss_meta *rss_meta_ptr;
+ if (priority >= 1)
+ return -rte_errno;
+
rss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0);
if (!rss_meta_ptr) {
rte_flow_error_set(error, EINVAL,
--
2.25.1
next prev parent reply other threads:[~2021-09-10 8:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 8:08 [dpdk-dev] [PATCH 20.11 0/7] backport feature support to DPDK 20.11 Wenjun Wu
2021-09-10 8:08 ` Wenjun Wu [this message]
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 2/7] net/ice: refine flow priority usage Wenjun Wu
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 3/7] net/ice: support 256 queues Wenjun Wu
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 4/7] net/ice: fix error set of queue number Wenjun Wu
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 5/7] net/ice: support 6-tuple RSS Wenjun Wu
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 6/7] net/ice: add L4 support for QinQ switch filter Wenjun Wu
2021-09-10 8:08 ` [dpdk-dev] [PATCH 20.11 7/7] net/ice/base: support L4 " Wenjun Wu
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=20210910080821.18718-2-wenjun1.wu@intel.com \
--to=wenjun1.wu@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=yuying.zhang@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).