A new field 'algorithm' has been added to rss_conf, check it
in case of ignoring unsupported values.
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/qede/qede_ethdev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -1272,8 +1272,12 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE(edev);
- if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)
+ if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+ if (eth_dev->data->dev_conf.rx_adv_conf.rss_conf.algorithm !=
+ RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
rxmode->offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ }
/* We need to have min 1 RX queue.There is no min check in
* rte_eth_dev_configure(), so we are checking it here.
@@ -2119,6 +2123,9 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
DP_INFO(edev, "RSS hf = 0x%lx len = %u key = %p\n",
(unsigned long)hf, len, key);
+ if (rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
+
if (hf != 0) {
/* Enabling RSS */
DP_INFO(edev, "Enabling rss\n");