From patchwork Tue Oct 9 15:47:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 46390 X-Patchwork-Delegate: cristian.dumitrescu@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F68D1B5B3; Tue, 9 Oct 2018 17:48:55 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id B73AB1B596 for ; Tue, 9 Oct 2018 17:48:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 08:48:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,360,1534834800"; d="scan'208";a="79776729" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga007.jf.intel.com with ESMTP; 09 Oct 2018 08:47:41 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 9 Oct 2018 16:47:21 +0100 Message-Id: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 1/4] pipeline: add table action for packet tag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch introduces the packet tag table action which attaches a 32-bit value (the tag) to the current input packet. The tag is read from the current table entry. The tag is written into the mbuf->hash.fdir.hi and the flags PKT_RX_FDIR and PKT_RX_FDIR_ID are set into mbuf->ol_flags. Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_table_action.c | 78 ++++++++++++++++++++++++++++++++++ lib/librte_pipeline/rte_table_action.h | 10 +++++ 2 files changed, 88 insertions(+) diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c index edb3340..fb7eaf9 100644 --- a/lib/librte_pipeline/rte_table_action.c +++ b/lib/librte_pipeline/rte_table_action.c @@ -2012,6 +2012,50 @@ pkt_work_sym_crypto(struct rte_mbuf *mbuf, struct sym_crypto_data *data, } /** + * RTE_TABLE_ACTION_TAG + */ +struct tag_data { + uint32_t tag; +} __attribute__((__packed__)); + +static int +tag_apply(struct tag_data *data, + struct rte_table_action_tag_params *p) +{ + data->tag = p->tag; + return 0; +} + +static __rte_always_inline void +pkt_work_tag(struct rte_mbuf *mbuf, + struct tag_data *data) +{ + mbuf->hash.fdir.hi = data->tag; + mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; +} + +static __rte_always_inline void +pkt4_work_tag(struct rte_mbuf *mbuf0, + struct rte_mbuf *mbuf1, + struct rte_mbuf *mbuf2, + struct rte_mbuf *mbuf3, + struct tag_data *data0, + struct tag_data *data1, + struct tag_data *data2, + struct tag_data *data3) +{ + mbuf0->hash.fdir.hi = data0->tag; + mbuf1->hash.fdir.hi = data1->tag; + mbuf2->hash.fdir.hi = data2->tag; + mbuf3->hash.fdir.hi = data3->tag; + + mbuf0->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; + mbuf1->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; + mbuf2->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; + mbuf3->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; +} + +/** * Action profile */ static int @@ -2028,6 +2072,7 @@ action_valid(enum rte_table_action_type action) case RTE_TABLE_ACTION_STATS: case RTE_TABLE_ACTION_TIME: case RTE_TABLE_ACTION_SYM_CRYPTO: + case RTE_TABLE_ACTION_TAG: return 1; default: return 0; @@ -2162,6 +2207,9 @@ action_data_size(enum rte_table_action_type action, case RTE_TABLE_ACTION_SYM_CRYPTO: return (sizeof(struct sym_crypto_data)); + case RTE_TABLE_ACTION_TAG: + return sizeof(struct tag_data); + default: return 0; } @@ -2419,6 +2467,10 @@ rte_table_action_apply(struct rte_table_action *action, &action->cfg.sym_crypto, action_params); + case RTE_TABLE_ACTION_TAG: + return tag_apply(action_data, + action_params); + default: return -EINVAL; } @@ -2803,6 +2855,14 @@ pkt_work(struct rte_mbuf *mbuf, ip_offset); } + if (cfg->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + void *data = action_data_get(table_entry, + action, + RTE_TABLE_ACTION_TAG); + + pkt_work_tag(mbuf, data); + } + return drop_mask; } @@ -3111,6 +3171,24 @@ pkt4_work(struct rte_mbuf **mbufs, ip_offset); } + if (cfg->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + void *data0 = action_data_get(table_entry0, + action, + RTE_TABLE_ACTION_TAG); + void *data1 = action_data_get(table_entry1, + action, + RTE_TABLE_ACTION_TAG); + void *data2 = action_data_get(table_entry2, + action, + RTE_TABLE_ACTION_TAG); + void *data3 = action_data_get(table_entry3, + action, + RTE_TABLE_ACTION_TAG); + + pkt4_work_tag(mbuf0, mbuf1, mbuf2, mbuf3, + data0, data1, data2, data3); + } + return drop_mask0 | (drop_mask1 << 1) | (drop_mask2 << 2) | diff --git a/lib/librte_pipeline/rte_table_action.h b/lib/librte_pipeline/rte_table_action.h index e8a7b66..d700ebf 100644 --- a/lib/librte_pipeline/rte_table_action.h +++ b/lib/librte_pipeline/rte_table_action.h @@ -96,6 +96,9 @@ enum rte_table_action_type { /** Crypto. */ RTE_TABLE_ACTION_SYM_CRYPTO, + + /** Tag. */ + RTE_TABLE_ACTION_TAG, }; /** Common action configuration (per table action profile). */ @@ -771,6 +774,13 @@ struct rte_table_action_sym_crypto_params { }; /** + * RTE_TABLE_ACTION_TAG + */ +struct rte_table_action_tag_params { + uint32_t tag; +}; + +/** * Table action profile. */ struct rte_table_action_profile; From patchwork Tue Oct 9 15:47:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 46391 X-Patchwork-Delegate: cristian.dumitrescu@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DEA201B5BC; Tue, 9 Oct 2018 17:48:57 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7FC4D1B596 for ; Tue, 9 Oct 2018 17:48:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 08:48:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,360,1534834800"; d="scan'208";a="79776735" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga007.jf.intel.com with ESMTP; 09 Oct 2018 08:47:42 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 9 Oct 2018 16:47:22 +0100 Message-Id: <1539100044-224533-2-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> References: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 2/4] examples/ip_pipeline: add support for packet tag table action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add support for the packet tag table action. Signed-off-by: Cristian Dumitrescu --- examples/ip_pipeline/action.c | 11 +++++++++++ examples/ip_pipeline/cli.c | 38 +++++++++++++++++++++++++++++++++++++- examples/ip_pipeline/pipeline.h | 1 + examples/ip_pipeline/thread.c | 10 ++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/examples/ip_pipeline/action.c b/examples/ip_pipeline/action.c index a0f97be..3f825a0 100644 --- a/examples/ip_pipeline/action.c +++ b/examples/ip_pipeline/action.c @@ -344,6 +344,17 @@ table_action_profile_create(const char *name, } } + if (params->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + status = rte_table_action_profile_action_register(ap, + RTE_TABLE_ACTION_TAG, + NULL); + + if (status) { + rte_table_action_profile_free(ap); + return NULL; + } + } + status = rte_table_action_profile_freeze(ap); if (status) { rte_table_action_profile_free(ap); diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index 3ff7caa..a85d04c 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -1032,7 +1032,8 @@ static const char cmd_table_action_profile_help[] = " [time]\n" " [sym_crypto dev offset " " mempool_create \n" -" mempool_init ]\n"; +" mempool_init ]\n" +" [tag]\n"; static void cmd_table_action_profile(char **tokens, @@ -1451,6 +1452,11 @@ cmd_table_action_profile(char **tokens, t0 += 9; } /* sym_crypto */ + if ((t0 < n_tokens) && (strcmp(tokens[t0], "tag") == 0)) { + p.action_mask |= 1LLU << RTE_TABLE_ACTION_TAG; + t0 += 1; + } /* tag */ + if (t0 < n_tokens) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); return; @@ -3107,6 +3113,7 @@ parse_match(char **tokens, * aead_algo aead_key aead_iv aead_aad * digest_size * data_offset ] + * [tag ] * * where: * ::= g | y | r | drop @@ -4068,6 +4075,22 @@ parse_table_action_sym_crypto(char **tokens, } static uint32_t +parse_table_action_tag(char **tokens, + uint32_t n_tokens, + struct table_rule_action *a) +{ + if ((n_tokens < 2) || + strcmp(tokens[0], "tag")) + return 0; + + if (parser_read_uint32(&a->tag.tag, tokens[1])) + return 0; + + a->action_mask |= 1 << RTE_TABLE_ACTION_TAG; + return 2; +} + +static uint32_t parse_table_action(char **tokens, uint32_t n_tokens, char *out, @@ -4218,6 +4241,19 @@ parse_table_action(char **tokens, if (n == 0) { snprintf(out, out_size, MSG_ARG_INVALID, "action sym_crypto"); + } + + tokens += n; + n_tokens -= n; + } + + if (n_tokens && (strcmp(tokens[0], "tag") == 0)) { + uint32_t n; + + n = parse_table_action_tag(tokens, n_tokens, a); + if (n == 0) { + snprintf(out, out_size, MSG_ARG_INVALID, + "action tag"); return 0; } diff --git a/examples/ip_pipeline/pipeline.h b/examples/ip_pipeline/pipeline.h index b6b9dc0..73485f6 100644 --- a/examples/ip_pipeline/pipeline.h +++ b/examples/ip_pipeline/pipeline.h @@ -282,6 +282,7 @@ struct table_rule_action { struct rte_table_action_stats_params stats; struct rte_table_action_time_params time; struct rte_table_action_sym_crypto_params sym_crypto; + struct rte_table_action_tag_params tag; }; int diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index 3ec44c9..41891f4 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -2494,6 +2494,16 @@ action_convert(struct rte_table_action *a, return status; } + if (action->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + status = rte_table_action_apply(a, + data, + RTE_TABLE_ACTION_TAG, + &action->tag); + + if (status) + return status; + } + return 0; } From patchwork Tue Oct 9 15:47:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 46392 X-Patchwork-Delegate: cristian.dumitrescu@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59C731B5C9; Tue, 9 Oct 2018 17:49:00 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 03A501B596 for ; Tue, 9 Oct 2018 17:48:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 08:48:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,360,1534834800"; d="scan'208";a="79776739" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga007.jf.intel.com with ESMTP; 09 Oct 2018 08:47:43 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 9 Oct 2018 16:47:23 +0100 Message-Id: <1539100044-224533-3-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> References: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 3/4] net/softnic: add support for packet tag table action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add support for packet tag table action. Signed-off-by: Cristian Dumitrescu --- drivers/net/softnic/rte_eth_softnic_action.c | 11 +++++++ drivers/net/softnic/rte_eth_softnic_cli.c | 38 +++++++++++++++++++++++++ drivers/net/softnic/rte_eth_softnic_internals.h | 1 + drivers/net/softnic/rte_eth_softnic_thread.c | 10 +++++++ 4 files changed, 60 insertions(+) diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c index c542688..133dd06 100644 --- a/drivers/net/softnic/rte_eth_softnic_action.c +++ b/drivers/net/softnic/rte_eth_softnic_action.c @@ -364,6 +364,17 @@ softnic_table_action_profile_create(struct pmd_internals *p, } } + if (params->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + status = rte_table_action_profile_action_register(ap, + RTE_TABLE_ACTION_TAG, + NULL); + + if (status) { + rte_table_action_profile_free(ap); + return NULL; + } + } + status = rte_table_action_profile_freeze(ap); if (status) { rte_table_action_profile_free(ap); diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c index dc8ccdc..2bb48da 100644 --- a/drivers/net/softnic/rte_eth_softnic_cli.c +++ b/drivers/net/softnic/rte_eth_softnic_cli.c @@ -1279,6 +1279,7 @@ cmd_port_in_action_profile(struct pmd_internals *softnic, * stats none | pkts] * [stats pkts | bytes | both] * [time] + * [tag] */ static void cmd_table_action_profile(struct pmd_internals *softnic, @@ -1610,6 +1611,12 @@ cmd_table_action_profile(struct pmd_internals *softnic, t0 += 1; } /* time */ + if (t0 < n_tokens && + (strcmp(tokens[t0], "tag") == 0)) { + p.action_mask |= 1LLU << RTE_TABLE_ACTION_TAG; + t0 += 1; + } /* tag */ + if (t0 < n_tokens) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); return; @@ -3176,6 +3183,7 @@ parse_match(char **tokens, * [ttl dec | keep] * [stats] * [time] + * [tag] * * where: * ::= g | y | r | drop @@ -3666,6 +3674,22 @@ parse_table_action_time(char **tokens, } static uint32_t +parse_table_action_tag(char **tokens, + uint32_t n_tokens, + struct softnic_table_rule_action *a) +{ + if (n_tokens < 1 || + strcmp(tokens[0], "tag")) + return 0; + + if (softnic_parser_read_uint32(&a->tag.tag, tokens[1])) + return 0; + + a->action_mask |= 1 << RTE_TABLE_ACTION_TAG; + return 2; +} + +static uint32_t parse_table_action(char **tokens, uint32_t n_tokens, char *out, @@ -3809,6 +3833,20 @@ parse_table_action(char **tokens, n_tokens -= n; } + if (n_tokens && (strcmp(tokens[0], "tag") == 0)) { + uint32_t n; + + n = parse_table_action_tag(tokens, n_tokens, a); + if (n == 0) { + snprintf(out, out_size, MSG_ARG_INVALID, + "action tag"); + return 0; + } + + tokens += n; + n_tokens -= n; + } + if (n_tokens0 - n_tokens == 1) { snprintf(out, out_size, MSG_ARG_INVALID, "action"); return 0; diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 78864e7..1623ff8 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -897,6 +897,7 @@ struct softnic_table_rule_action { struct rte_table_action_ttl_params ttl; struct rte_table_action_stats_params stats; struct rte_table_action_time_params time; + struct rte_table_action_tag_params tag; }; struct rte_flow { diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index 87b5592..e1d002e 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -2478,6 +2478,16 @@ action_convert(struct rte_table_action *a, return status; } + if (action->action_mask & (1LLU << RTE_TABLE_ACTION_TAG)) { + status = rte_table_action_apply(a, + data, + RTE_TABLE_ACTION_TAG, + &action->tag); + + if (status) + return status; + } + return 0; } From patchwork Tue Oct 9 15:47:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 46393 X-Patchwork-Delegate: cristian.dumitrescu@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A17D51B5D1; Tue, 9 Oct 2018 17:49:01 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 274751B5A9 for ; Tue, 9 Oct 2018 17:48:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 08:48:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,360,1534834800"; d="scan'208";a="79776745" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga007.jf.intel.com with ESMTP; 09 Oct 2018 08:47:43 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 9 Oct 2018 16:47:24 +0100 Message-Id: <1539100044-224533-4-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> References: <1539100044-224533-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 4/4] net/softnic: add support for flow api mark action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add support for ethdev flow API mark action. Signed-off-by: Cristian Dumitrescu --- drivers/net/softnic/rte_eth_softnic_flow.c | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softnic/rte_eth_softnic_flow.c index 30aa6af..b7b0b6d 100644 --- a/drivers/net/softnic/rte_eth_softnic_flow.c +++ b/drivers/net/softnic/rte_eth_softnic_flow.c @@ -1168,6 +1168,7 @@ flow_rule_action_get(struct pmd_internals *softnic, struct softnic_table_action_profile_params *params; int n_jump_queue_rss_drop = 0; int n_count = 0; + int n_mark = 0; profile = softnic_table_action_profile_find(softnic, table->params.action_profile_name); @@ -1475,6 +1476,40 @@ flow_rule_action_get(struct pmd_internals *softnic, break; } /* RTE_FLOW_ACTION_TYPE_COUNT */ + case RTE_FLOW_ACTION_TYPE_MARK: + { + const struct rte_flow_action_mark *conf = action->conf; + + if (conf == NULL) + return rte_flow_error_set(error, + EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + action, + "MARK: Null configuration"); + + if (n_mark) + return rte_flow_error_set(error, + ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, + action, + "Only one MARK action per flow"); + + if ((params->action_mask & + (1LLU << RTE_TABLE_ACTION_TAG)) == 0) + return rte_flow_error_set(error, + ENOTSUP, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, + "MARK action not supported by this table"); + + n_mark = 1; + + /* RTE_TABLE_ACTION_STATS */ + rule_action->tag.tag = conf->id; + rule_action->action_mask |= 1 << RTE_TABLE_ACTION_TAG; + break; + } /* RTE_FLOW_ACTION_TYPE_MARK */ + case RTE_FLOW_ACTION_TYPE_METER: { const struct rte_flow_action_meter *conf = action->conf;