net/mlx5: fix drop flows when port is stopped
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Tue, 24 Oct 2017 15:18:14 +0000 (17:18 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
Fix the drop queue rule creation when the port is stopped.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5_flow.c

index 452fde5..6f458f4 100644 (file)
@@ -1679,9 +1679,9 @@ priv_flow_create_action_queue_drop(struct priv *priv,
        };
        ++parser->drop_q.ibv_attr->num_of_specs;
        parser->drop_q.offset += size;
+       flow->drxq.ibv_attr = parser->drop_q.ibv_attr;
        if (!priv->dev->data->dev_started)
                return 0;
-       flow->drxq.ibv_attr = parser->drop_q.ibv_attr;
        parser->drop_q.ibv_attr = NULL;
        flow->drxq.ibv_flow = ibv_create_flow(priv->flow_drop_queue->qp,
                                              flow->drxq.ibv_attr);