[5/5] net/enic: allow multiple mark and flag actions

Message ID 20200415010641.5195-5-johndale@cisco.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/5] net/enic: fix action reordering |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation fail Compilation issues

Commit Message

John Daley (johndale) April 15, 2020, 1:06 a.m. UTC
  1400 series adapters support multiple MARK and FLAG action types.
  e.g.: mark id 10 / queue index 2 / mark id 11 / queue index 3

Remove the restriction in the Flow Manager implementation.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
---
 drivers/net/enic/enic_fm_flow.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
  

Patch

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index 86efeffc64..6ee0224372 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -1086,11 +1086,10 @@  enic_fm_copy_action(struct enic_flowman *fm,
 {
 	enum {
 		FATE = 1 << 0,
-		MARK = 1 << 1,
+		DECAP = 1 << 1,
 		PASSTHRU = 1 << 2,
 		COUNT = 1 << 3,
 		ENCAP = 1 << 4,
-		DECAP = 1 << 5,
 	};
 	struct fm_tcam_match_entry *fmt;
 	struct fm_action_op fm_op;
@@ -1141,9 +1140,6 @@  enic_fm_copy_action(struct enic_flowman *fm,
 			const struct rte_flow_action_mark *mark =
 				actions->conf;
 
-			if (overlap & MARK)
-				goto unsupported;
-			overlap |= MARK;
 			if (mark->id >= ENIC_MAGIC_FILTER_ID - 1)
 				return rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1157,9 +1153,6 @@  enic_fm_copy_action(struct enic_flowman *fm,
 			break;
 		}
 		case RTE_FLOW_ACTION_TYPE_FLAG: {
-			if (overlap & MARK)
-				goto unsupported;
-			overlap |= MARK;
 			/* ENIC_MAGIC_FILTER_ID is reserved for flagging */
 			memset(&fm_op, 0, sizeof(fm_op));
 			fm_op.fa_op = FMOP_MARK;