]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dpdk/i40e: fix warning with number of queues for RSS configuration
authorAndrei Shchapaniak <shchapaniak.andrei@gmail.com>
Wed, 31 Aug 2022 11:23:07 +0000 (07:23 -0400)
committerVictor Julien <vjulien@oisf.net>
Tue, 20 Sep 2022 12:55:24 +0000 (14:55 +0200)
src/util-dpdk-i40e.c

index 70e18f471078f850224668953c14bf2a9b32710e..77baf0b93cb2b17bfe06c1a75a4d1734306381ec 100644 (file)
@@ -160,8 +160,14 @@ static int i40eDeviceSetRSSFlowQueues(
     rss_action_conf.func = RTE_ETH_HASH_FUNCTION_DEFAULT;
     rss_action_conf.level = 0;
     rss_action_conf.types = 0; // queues region can not be configured with types
-    rss_action_conf.key = rss_conf.rss_key;
-    rss_action_conf.key_len = rss_conf.rss_key_len;
+    rss_action_conf.key_len = 0;
+    rss_action_conf.key = NULL;
+
+    if (nb_rx_queues < 1) {
+        FatalError(SC_ERR_DPDK_CONF, "The number of queues for RSS configuration must be "
+                                     "configured with a positive number");
+    }
+
     rss_action_conf.queue_num = nb_rx_queues;
     rss_action_conf.queue = queues;