[PATCH v5 13/40] net/ena: check RSS hash algorithms
Jie Hai
haijie1 at huawei.com
Wed Oct 11 11:27:38 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/ena/ena_rss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ena/ena_rss.c b/drivers/net/ena/ena_rss.c
index d0ba9d5c0a14..06aff9f3bd49 100644
--- a/drivers/net/ena/ena_rss.c
+++ b/drivers/net/ena/ena_rss.c
@@ -398,6 +398,9 @@ static int ena_rss_hash_set(struct ena_com_dev *ena_dev,
uint8_t *rss_key;
int rc;
+ if (rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT)
+ return -EINVAL;
+
if (rss_conf->rss_key != NULL) {
/* Reorder the RSS key bytes for the hardware requirements. */
ena_reorder_rss_hash_key(hw_rss_key, rss_conf->rss_key,
--
2.30.0
More information about the dev
mailing list