net/sfc: support flow action mark in MAE backend

The action handler will use MAE action MARK.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
This commit is contained in:
Ivan Malov 2020-10-20 10:13:13 +01:00 committed by Ferruh Yigit
parent 83352289e1
commit e7de2bcbe8
2 changed files with 14 additions and 0 deletions

View File

@ -206,6 +206,8 @@ Supported actions (***transfer*** rules):
- FLAG
- MARK
- PHY_PORT
Validating flow rules depends on the firmware variant.

View File

@ -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);