* [dpdk-stable] [DPDK] net/ice: support mark only action for FDIR
@ 2020-04-02 6:26 Simei Su
0 siblings, 0 replies; only message in thread
From: Simei Su @ 2020-04-02 6:26 UTC (permalink / raw)
To: qabuild; +Cc: Simei Su, stable
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 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index a082a13..8acdb1a 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1469,6 +1469,10 @@
uint32_t counter_num = 0;
int ret;
+ /* set default action to PASSTHRU mode, in the case of MARK only. */
+ filter->input.dest_ctl =
+ ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER;
+
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
switch (actions->type) {
case RTE_FLOW_ACTION_TYPE_VOID:
@@ -1533,7 +1537,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");
@@ -1554,6 +1558,13 @@
return -rte_errno;
}
+ if (dest_num + mark_num == 0) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, actions,
+ "Emtpy action");
+ return -rte_errno;
+ }
+
return 0;
}
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-02 6:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 6:26 [dpdk-stable] [DPDK] net/ice: support mark only action for FDIR Simei Su
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).