RE: [EXT] Re: [dpdk-stable] [PATCH v2] test: avoid hang if queues are full and Tx fails
From: Rakesh Kudurumalla <hidden>
Date: 2021-11-29 08:52:41
-----Original Message----- From: Thomas Monjalon <redacted> Sent: Monday, November 22, 2021 2:28 PM To: Rakesh Kudurumalla <redacted> Cc: stable@dpdk.org; dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com; andrew.rybchenko@oktetlabs.ru; ajit.khaparde@broadcom.com; Jerin Jacob Kollanukkaran [off-list ref] Subject: Re: [EXT] Re: [dpdk-stable] [PATCH v2] test: avoid hang if queues are full and Tx fails 22/11/2021 08:59, Rakesh Kudurumalla:quoted
From: Thomas Monjalon <redacted>quoted
20/07/2021 18:50, Rakesh Kudurumalla:quoted
Current pmd_perf_autotest() in continuous mode tries to enqueue MAX_TRAFFIC_BURST completely before starting the test. Some drivers cannot accept complete MAX_TRAFFIC_BURST even thoughrx+txquoted
quoted
quoted
desccountquoted
can fit it.Which driver is failing to do so? Why it cannot enqueue 32 packets?Octeontx2 driver is failing to enqueue because hardware buffers are fullbefore test. Why hardware buffers are full?
Hardware buffers are full because number of number of descriptors in continuous mode Is less than MAX_TRAFFIC_BURST, so if enque fails , there is no way hardware can drop the Packets . pmd_per_autotest application evaluates performance after enqueueing packets Initially.
quoted
pmd_perf_autotest() in continuous mode tries to enqueue MAX_TRAFFIC_BURST (2048) before starting the test.quoted
quoted
This patch changes behaviour to stop enqueuing after few retries.If there is a real limitation, there will be issues in more places than this test program. I feel it should be addressed either in the driver or at ethdev level. [...]quoted
@@ -480,10 +483,19 @@ main_loop(__rte_unused void *args) nb_tx = RTE_MIN(MAX_PKT_BURST, num); nb_tx = rte_eth_tx_burst(portid, 0, &tx_burst[idx], nb_tx); + if (nb_tx == 0) + retry_cnt++; num -= nb_tx; idx += nb_tx; + if (retry_cnt == MAX_RETRY_COUNT) { + retry_cnt = 0; + break; + }