net/mlx5: fix all multi verification code position
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Thu, 11 Jan 2018 09:25:22 +0000 (10:25 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jan 2018 09:04:28 +0000 (10:04 +0100)
All multi code should not be handled in exit part of the code but in the
mainline of the function.

Fixes: 0a40a1363a4d ("net/mlx5: fix flow type for allmulti rules")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5_flow.c

index 13b6483..20c4185 100644 (file)
@@ -1168,16 +1168,6 @@ priv_flow_convert(struct priv *priv,
                        attr->priority +
                        hash_rxq_init[parser->layer].flow_priority;
        }
-exit_free:
-       /* Only verification is expected, all resources should be released. */
-       if (!parser->create) {
-               for (i = 0; i != hash_rxq_init_n; ++i) {
-                       if (parser->queue[i].ibv_attr) {
-                               rte_free(parser->queue[i].ibv_attr);
-                               parser->queue[i].ibv_attr = NULL;
-                       }
-               }
-       }
        if (parser->allmulti &&
            parser->layer == HASH_RXQ_ETH) {
                for (i = 0; i != hash_rxq_init_n; ++i) {
@@ -1189,6 +1179,16 @@ exit_free:
                                                IBV_FLOW_ATTR_MC_DEFAULT;
                }
        }
+exit_free:
+       /* Only verification is expected, all resources should be released. */
+       if (!parser->create) {
+               for (i = 0; i != hash_rxq_init_n; ++i) {
+                       if (parser->queue[i].ibv_attr) {
+                               rte_free(parser->queue[i].ibv_attr);
+                               parser->queue[i].ibv_attr = NULL;
+                       }
+               }
+       }
        return ret;
 exit_enomem:
        for (i = 0; i != hash_rxq_init_n; ++i) {