From: Ivan Malov Date: Tue, 20 Oct 2020 09:13:19 +0000 (+0100) Subject: net/sfc: support flow action drop in transfer rules X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0839236d0391e89936eba39ec765ea4a7e614842;p=dpdk.git net/sfc: support flow action drop in transfer rules 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 Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst index da4a096ac6..1bf21ac3ce 100644 --- a/doc/guides/nics/sfc_efx.rst +++ b/doc/guides/nics/sfc_efx.rst @@ -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. diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index ff21351152..a5800ae722 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -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,