net/sfc: support flow action drop in transfer rules
[dpdk.git] / drivers / net / sfc / sfc_flow.c
index f4d53bf..6ccefef 100644 (file)
@@ -50,8 +50,8 @@ static const struct sfc_flow_ops_by_spec sfc_flow_ops_mae = {
        .parse = sfc_flow_parse_rte_to_mae,
        .verify = sfc_mae_flow_verify,
        .cleanup = sfc_mae_flow_cleanup,
-       .insert = NULL,
-       .remove = NULL,
+       .insert = sfc_mae_flow_insert,
+       .remove = sfc_mae_flow_remove,
 };
 
 static const struct sfc_flow_ops_by_spec *
@@ -1202,6 +1202,7 @@ sfc_flow_parse_attr(struct sfc_adapter *sa,
                spec_mae->priority = attr->priority;
                spec_mae->match_spec = NULL;
                spec_mae->action_set = NULL;
+               spec_mae->rule_id.id = EFX_MAE_RSRC_ID_INVALID;
        }
 
        return 0;
@@ -1678,9 +1679,6 @@ sfc_flow_parse_actions(struct sfc_adapter *sa,
                return -rte_errno;
        }
 
-#define SFC_BUILD_SET_OVERFLOW(_action, _set) \
-       RTE_BUILD_BUG_ON(_action >= sizeof(_set) * CHAR_BIT)
-
        for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
                switch (actions->type) {
                case RTE_FLOW_ACTION_TYPE_VOID:
@@ -1776,7 +1774,6 @@ sfc_flow_parse_actions(struct sfc_adapter *sa,
 
                actions_set |= (1UL << actions->type);
        }
-#undef SFC_BUILD_SET_OVERFLOW
 
        /* When fate is unknown, drop traffic. */
        if ((actions_set & fate_actions_mask) == 0) {