examples/l3fwd: disable multi-queue for single queue
authorChaoyong He <chaoyong.he@corigine.com>
Mon, 10 May 2021 16:53:19 +0000 (18:53 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 30 Jul 2021 16:56:01 +0000 (18:56 +0200)
Set the Rx multi-queue mode to NONE when configuring a port that is
associated with hardware that only supports a single Rx queue.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/l3fwd/main.c

index 4cb800a..00ac267 100644 (file)
@@ -1041,6 +1041,10 @@ l3fwd_poll_resource_setup(void)
 
                local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
                        dev_info.flow_type_rss_offloads;
+
+               if (dev_info.max_rx_queues == 1)
+                       local_port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
+
                if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
                                port_conf.rx_adv_conf.rss_conf.rss_hf) {
                        printf("Port %u modified RSS hash function based on hardware support,"