net/sfc: support flow action drop in transfer rules
authorIvan Malov <ivan.malov@oktetlabs.ru>
Tue, 20 Oct 2020 09:13:19 +0000 (10:13 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:25 +0000 (23:24 +0100)
Effectively, the resulting action will be of type DELIVER, and
destination MPORT will be a properly constructed NULL value.
This will achieve the requested behaviour (no delivery).

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
drivers/net/sfc/sfc_mae.c

index da4a096..1bf21ac 100644 (file)
@@ -218,6 +218,8 @@ Supported actions (***transfer*** rules):
 
 - VF
 
+- DROP
+
 Validating flow rules depends on the firmware variant.
 
 The :ref:`flow_isolated_mode` is supported.
index ff21351..a5800ae 100644 (file)
@@ -813,6 +813,11 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,
                                       bundle->actions_mask);
                rc = sfc_mae_rule_parse_action_pf_vf(sa, action->conf, spec);
                break;
+       case RTE_FLOW_ACTION_TYPE_DROP:
+               SFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_DROP,
+                                      bundle->actions_mask);
+               rc = efx_mae_action_set_populate_drop(spec);
+               break;
        default:
                return rte_flow_error_set(error, ENOTSUP,
                                RTE_FLOW_ERROR_TYPE_ACTION, NULL,