net/mlx5: fix segfault on flow creation

When ports are stopped, the hash Rx queue should not be created.

Fixes: 8086cf08b2 ("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>
This commit is contained in:
Nélio Laranjeiro 2017-10-24 17:18:12 +02:00 committed by Ferruh Yigit
parent 59e4985a24
commit 7bb5fa069d

View File

@ -1743,6 +1743,8 @@ priv_flow_create_action_queue_rss(struct priv *priv,
flow->frxq[i].ibv_attr = parser->queue[i].ibv_attr; flow->frxq[i].ibv_attr = parser->queue[i].ibv_attr;
parser->queue[i].ibv_attr = NULL; parser->queue[i].ibv_attr = NULL;
hash_fields = hash_rxq_init[i].hash_fields; hash_fields = hash_rxq_init[i].hash_fields;
if (!priv->dev->data->dev_started)
continue;
flow->frxq[i].hrxq = flow->frxq[i].hrxq =
mlx5_priv_hrxq_get(priv, mlx5_priv_hrxq_get(priv,
parser->rss_conf.rss_key, parser->rss_conf.rss_key,