[PATCH v5 22/40] net/ionic: check RSS hash algorithms
Jie Hai
haijie1 at huawei.com
Wed Oct 11 11:27:47 CEST 2023
A new field 'algorithm' has been added to rss_conf, check it
in case of ignoring unsupported values.
Signed-off-by: Jie Hai <haijie1 at huawei.com>
---
drivers/net/ionic/ionic_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 340fd0cd5923..e2e4d23c069b 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -642,6 +642,9 @@ ionic_dev_rss_hash_update(struct rte_eth_dev *eth_dev,
if (rss_conf->rss_key)
key = rss_conf->rss_key;
+ if (rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
+
if ((rss_conf->rss_hf & IONIC_ETH_RSS_OFFLOAD_ALL) == 0) {
/*
* Can't disable rss through hash flags,
@@ -826,6 +829,9 @@ ionic_dev_configure(struct rte_eth_dev *eth_dev)
IONIC_PRINT_CALL();
+ if (eth_dev->data->dev_conf.rx_adv_conf.rss_conf.algorithm !=
+ RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
ionic_lif_configure(lif);
return 0;
--
2.30.0
More information about the dev
mailing list