From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 4/8] net/softnic: add support for flow api mark action
Date: Thu, 11 Oct 2018 12:28:51 +0100 [thread overview]
Message-ID: <1539257335-59106-4-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1539257335-59106-1-git-send-email-cristian.dumitrescu@intel.com>
Add support for ethdev flow API mark action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
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..9bb0d56 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_TAG */
+ 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;
--
2.7.4
next prev parent reply other threads:[~2018-10-11 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 11:28 [dpdk-dev] [PATCH v3 1/8] pipeline: add table action for packet tag Cristian Dumitrescu
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 2/8] examples/ip_pipeline: add support for packet tag table action Cristian Dumitrescu
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 3/8] net/softnic: " Cristian Dumitrescu
2018-10-11 11:28 ` Cristian Dumitrescu [this message]
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 5/8] pipeline: add table action for packet decap Cristian Dumitrescu
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 6/8] examples/ip_pipeline: add support for packet decap table action Cristian Dumitrescu
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 7/8] net/softnic: " Cristian Dumitrescu
2018-10-11 11:28 ` [dpdk-dev] [PATCH v3 8/8] net/softnic: add support for flow api vxlan decap action Cristian Dumitrescu
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=1539257335-59106-4-git-send-email-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/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).