[PATCH v5 05/40] net/bnx2x: check RSS hash algorithms
Jie Hai
haijie1 at huawei.com
Wed Oct 11 11:27:30 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/bnx2x/bnx2x_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 4448cf2de2d7..078d6db75d1b 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -196,6 +196,10 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
PMD_DRV_LOG(DEBUG, sc, "num_queues=%d, mtu=%d",
sc->num_queues, sc->mtu);
+ if (dev->data->dev_conf.rx_adv_conf.rss_conf.algorithm !=
+ RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
+
/* allocate ilt */
if (bnx2x_alloc_ilt_mem(sc) != 0) {
PMD_DRV_LOG(ERR, sc, "bnx2x_alloc_ilt_mem was failed");
--
2.30.0
More information about the dev
mailing list