[dpdk-dev] [PATCH v2 33/62] net/sfc: support flow action MARK in MAE backend
Andrew Rybchenko
arybchenko at solarflare.com
Tue Oct 20 11:13:13 CEST 2020
From: Ivan Malov <ivan.malov at oktetlabs.ru>
The action handler will use MAE action MARK.
Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
---
doc/guides/nics/sfc_efx.rst | 2 ++
drivers/net/sfc/sfc_mae.c | 12 ++++++++++++
2 files changed, 14 insertions(+)
diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 2ddfd0c957..ff0d094068 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -206,6 +206,8 @@ Supported actions (***transfer*** rules):
- FLAG
+- MARK
+
- PHY_PORT
Validating flow rules depends on the firmware variant.
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index af961ceffe..1e7a368303 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -580,6 +580,13 @@ sfc_mae_rule_parse_action_of_set_vlan_pcp(
bundle->vlan_push_tci |= rte_cpu_to_be_16(vlan_tci_pcp);
}
+static int
+sfc_mae_rule_parse_action_mark(const struct rte_flow_action_mark *conf,
+ efx_mae_actions_t *spec)
+{
+ return efx_mae_action_set_populate_mark(spec, conf->id);
+}
+
static int
sfc_mae_rule_parse_action_phy_port(struct sfc_adapter *sa,
const struct rte_flow_action_phy_port *conf,
@@ -636,6 +643,11 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,
bundle->actions_mask);
rc = efx_mae_action_set_populate_flag(spec);
break;
+ case RTE_FLOW_ACTION_TYPE_MARK:
+ SFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_MARK,
+ bundle->actions_mask);
+ rc = sfc_mae_rule_parse_action_mark(action->conf, spec);
+ break;
case RTE_FLOW_ACTION_TYPE_PHY_PORT:
SFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_PHY_PORT,
bundle->actions_mask);
--
2.17.1
More information about the dev
mailing list