net/dpaa: fix event queue detach
[dpdk.git] / drivers / net / sfc / sfc_flow_tunnel.c
index 374510a..af5941c 100644 (file)
@@ -21,7 +21,7 @@ sfc_flow_tunnel_is_supported(struct sfc_adapter *sa)
        SFC_ASSERT(sfc_adapter_is_locked(sa));
 
        return ((sa->priv.dp_rx->features & SFC_DP_RX_FEAT_FLOW_MARK) != 0 &&
-               sa->mae.status == SFC_MAE_STATUS_SUPPORTED);
+               sa->mae.status == SFC_MAE_STATUS_ADMIN);
 }
 
 bool
@@ -88,6 +88,8 @@ sfc_flow_tunnel_detect_jump_rule(struct sfc_adapter *sa,
                }
 
                switch (actions->type) {
+               case RTE_FLOW_ACTION_TYPE_COUNT:
+                       break;
                case RTE_FLOW_ACTION_TYPE_MARK:
                        if (action_mark == NULL) {
                                action_mark = actions->conf;
@@ -431,7 +433,7 @@ sfc_flow_tunnel_get_restore_info(struct rte_eth_dev *dev,
        ft = &sa->flow_tunnels[ft_id];
 
        if (ft->refcnt == 0) {
-               sfc_err(sa, "tunnel offload: get_restore_info: tunnel=%u does not exist",
+               sfc_dbg(sa, "tunnel offload: get_restore_info: tunnel=%u does not exist",
                        ft_id);
                rc = ENOENT;
                goto fail;
@@ -460,3 +462,19 @@ fail:
                                  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
                                  "tunnel offload: get_restore_info failed");
 }
+
+void
+sfc_flow_tunnel_reset_hit_counters(struct sfc_adapter *sa)
+{
+       unsigned int i;
+
+       SFC_ASSERT(sfc_adapter_is_locked(sa));
+       SFC_ASSERT(sa->state != SFC_ETHDEV_STARTED);
+
+       for (i = 0; i < RTE_DIM(sa->flow_tunnels); ++i) {
+               struct sfc_flow_tunnel *ft = &sa->flow_tunnels[i];
+
+               ft->reset_jump_hit_counter = 0;
+               ft->group_hit_counter = 0;
+       }
+}