From 7bb5fa069d50b283ccb0096da6778d4af772f10d Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Tue, 24 Oct 2017 17:18:12 +0200 Subject: [PATCH] net/mlx5: fix segfault on flow creation When ports are stopped, the hash Rx queue should not be created. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 440bda9a12..452fde5889 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1743,6 +1743,8 @@ priv_flow_create_action_queue_rss(struct priv *priv, flow->frxq[i].ibv_attr = parser->queue[i].ibv_attr; parser->queue[i].ibv_attr = NULL; hash_fields = hash_rxq_init[i].hash_fields; + if (!priv->dev->data->dev_started) + continue; flow->frxq[i].hrxq = mlx5_priv_hrxq_get(priv, parser->rss_conf.rss_key, -- 2.20.1