[v2,26/62] net/sfc: support flow action OF POP VLAN in MAE backend

Message ID 1603185222-14831-27-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/sfc: support flow API transfer rules |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 20, 2020, 9:13 a.m. UTC
  From: Ivan Malov <ivan.malov@oktetlabs.ru>

This action is supported only for rules which have transfer attribute,
and can be requested once or twice per a rule.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 doc/guides/nics/sfc_efx.rst | 2 ++
 drivers/net/sfc/sfc_mae.c   | 3 +++
 2 files changed, 5 insertions(+)
  

Patch

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index e367ddd6e6..ed9fc9d845 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -196,6 +196,8 @@  Supported pattern items (***transfer*** rules):
 
 Supported actions (***transfer*** rules):
 
+- OF_POP_VLAN
+
 - 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 ea15ccaedb..a86a22ad8f 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -475,6 +475,9 @@  sfc_mae_rule_parse_action(struct sfc_adapter *sa,
 	int rc;
 
 	switch (action->type) {
+	case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
+		rc = efx_mae_action_set_populate_vlan_pop(spec);
+		break;
 	case RTE_FLOW_ACTION_TYPE_PHY_PORT:
 		rc = sfc_mae_rule_parse_action_phy_port(sa, action->conf, spec);
 		break;