From: Shahaf Shuler Date: Tue, 26 Dec 2017 07:40:41 +0000 (+0200) Subject: net/mlx5: fix RSS key configuration X-Git-Tag: spdx-start~550 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=21e3a9747fd67f0581842d4070b4e34a4885cbbe;p=dpdk.git net/mlx5: fix RSS key configuration The trigger for PMD to use the application RSS configuration should be based on the validity of rss_key and not the rss_key_len. Otherwise segmentation fault can occur if application provide valid RSS key length but without any RSS key. Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index ca9ad0fefc..282ef241e7 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -550,7 +550,7 @@ dev_configure(struct rte_eth_dev *dev) unsigned int j; unsigned int reta_idx_n; const uint8_t use_app_rss_key = - !!dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len; + !!dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key; if (use_app_rss_key && (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len !=