From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7F82DA034F;
	Fri, 12 Nov 2021 12:33:41 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 40B4B410E3;
	Fri, 12 Nov 2021 12:33:41 +0100 (CET)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id E7F7940692;
 Fri, 12 Nov 2021 12:33:39 +0100 (CET)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 0E4505C02A5;
 Fri, 12 Nov 2021 06:33:37 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Fri, 12 Nov 2021 06:33:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm2; bh=
 IoBYqeL6stmeOPs5dqr//gGrUzL1DD0NAhXuzShpCFI=; b=Rg/tziPKK298Qw+/
 s3SZs8c6+EMkE7mZ6uWseJVw7orZvY/1CThhwGGt1+crCLVrp3VwxbOFTYxV1v0u
 BSZbTTGV3zdnTx8vqCY9IV2yShq4DjxBW3u/ZHP5O+Yuf4oDvJE+8cn5TrIYeKR0
 ntwK1I9MtLqQqQM9iycBTAGFlwpAu/lLiUQrHIJDF9BKwkTC7mbfPqi0dfunySLk
 RpuDYfH+7Hbk9zJqCITLh4N6SvG4okNJawO5W2edMG7RTmd6PtHOjDlsHkYUxVn7
 7kMb/0D6ulwFNrpV9LYAcbeRSM6ZMkLzPwIYEJWKNhDKFZF5cRWTJEVM94Ue6Iz1
 K0+sYA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=IoBYqeL6stmeOPs5dqr//gGrUzL1DD0NAhXuzShpC
 FI=; b=gA5tXxVgABBIwmt5KZTZDJWyEmP8y64xUXmRZdyzegO63NsLA7cJfgMpa
 UVMbeDH1wwZcvVO3XTJFZyAm1rgXF5Y+1Q8FDcZnnIyPh2fqRWh4qUTXqnGD7XVb
 WkEabXeYGsbG1nJSjZq+ph2271ENLKO4Q9ZTR16lgYxcgeAwUKzVHfxbET0evEzh
 iEDffQtKddl65OvHzV0+DOOtmJs8MVVAbjD+lYIWrLDuMThRpUXC4HCRGJVmy4aq
 b5MEegNQAuSHD3zx4lb5cQyYgNL5dwGHyfSYgDhGfk9+lkm7M76NmFFDMR7DcFiD
 hVXTT+YCHroVdEJ5o9Jf5dP1k7pAw==
X-ME-Sender: <xms:EFGOYef-YsURIqhy0tZlu4XVKUo-egHytcFqy3h7xFy0BrUotz5K6Q>
 <xme:EFGOYYMuFJNpv9SYENQfL9Nk9t6Y5LEqfvtmZpWdVIUHLjjZdSbHcYPvb4KifTWu6
 jIHp6DTlviZ90ZMQg>
X-ME-Received: <xmr:EFGOYfjXhTNpffvEi94dbWsi6g2OF4AtluASjjkLhRBrJR603XB6DXCCWc_lSvCguydqeJPgCIQZnmz6PcOg498>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrvdefgddviecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf
 frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei
 iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
 hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:EFGOYb8wiZ3rgocIVUjjsaMUrR40jcYw872-hxmIAgpSBs-tBKje9A>
 <xmx:EFGOYasfjSODvrfXdbmOhINJI5KGa_IDXfNBSr_iBWgDCpqPEHe0dg>
 <xmx:EFGOYSG6FOpmlo7sntxla2apbZWGZoVxETjLEc0UyKBx-VzKTcdRfg>
 <xmx:EVGOYejrObDTjY4gH1awz5_ptteH5ieM564zkjtJVDIBPNrVgNBp_w>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 12 Nov 2021 06:33:34 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Cc: stable@dpdk.org, dev@dpdk.org, david.marchand@redhat.com,
 ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru,
 ajit.khaparde@broadcom.com, jerinj@marvell.com
Subject: Re: [dpdk-stable] [PATCH v2] test: avoid hang if queues are full and
 Tx fails
Date: Fri, 12 Nov 2021 12:32:00 +0100
Message-ID: <2935187.TuyvbHr83s@thomas>
In-Reply-To: <20210720165052.606038-1-rkudurumalla@marvell.com>
References: <20210720124713.603674-1-rkudurumalla@marvell.com>
 <20210720165052.606038-1-rkudurumalla@marvell.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

20/07/2021 18:50, Rakesh Kudurumalla:
> 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 though rx+tx desc count can fit it.

Which driver is failing to do so?
Why it cannot enqueue 32 packets?

> 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.

[...]
> @@ -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;
> +			}