From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com, xiaolong.ye@intel.com
Cc: dev@dpdk.org, yahui.cao@intel.com, simei.su@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/ice: support mark only action for FDIR
Date: Tue, 14 Apr 2020 23:11:13 +0800 [thread overview]
Message-ID: <1586877073-450369-1-git-send-email-simei.su@intel.com> (raw)
In-Reply-To: <1585810557-21150-1-git-send-email-simei.su@intel.com>
This patch fixes issue that doesn't support mark only case.
Mark only action is equal to mark + passthru action.
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Cc: stable@dpdk.org
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 1a85d6c..77c6ebb 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1539,7 +1539,7 @@
}
}
- if (dest_num == 0 || dest_num >= 2) {
+ if (dest_num >= 2) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, actions,
"Unsupported action combination");
@@ -1560,6 +1560,18 @@
return -rte_errno;
}
+ if (dest_num + mark_num + counter_num == 0) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, actions,
+ "Emtpy action");
+ return -rte_errno;
+ }
+
+ /* set default action to PASSTHRU mode, in "mark/count only" case. */
+ if (dest_num == 0)
+ filter->input.dest_ctl =
+ ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER;
+
return 0;
}
--
1.8.3.1
next prev parent reply other threads:[~2020-04-14 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 6:55 [dpdk-dev] [PATCH] " Simei Su
2020-04-14 7:49 ` Zhang, Qi Z
2020-04-14 9:12 ` Su, Simei
2020-04-14 12:50 ` Zhang, Qi Z
2020-04-14 14:30 ` Su, Simei
2020-04-14 15:11 ` Simei Su [this message]
2020-04-30 9:19 ` [dpdk-dev] [PATCH v2] " Zhang, Qi Z
2020-05-06 5:27 ` Ye Xiaolong
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=1586877073-450369-1-git-send-email-simei.su@intel.com \
--to=simei.su@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=xiaolong.ye@intel.com \
--cc=yahui.cao@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).