From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7C8EA0547 for ; Fri, 29 Oct 2021 09:18:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8402E41124; Fri, 29 Oct 2021 09:18:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 13CE740395; Fri, 29 Oct 2021 09:18:14 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19T1jLp3024666; Fri, 29 Oct 2021 00:18:14 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by mx0a-0016f401.pphosted.com with ESMTP id 3c07jrh3xw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Oct 2021 00:18:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HVPnjqTXPhTI39S83/oS0w4wo2Y0CCQQLOLw0uqyC4fMFv5lVWTrGMZzUZrIkkhOxtbZ1ZCbQq3Fl+/WePYXeYVn20YTrffrqGeq8+wrTJCyIwrIxuwkgSaWhoaXTFFa71fW1Khh5wuxaQRRiyBHh3NoTxRznxaNJbbSFgq+y2aTR7/LTN/bcyWhOrcPzzqwM4CXTjWIRbq+YSv6CxI2zs+yCe4tmFxfVD5mpigqsWgbfwL+yUoT39+iYoc0LnNd3oyC8mNh6PI8fuigBIyHOsGbEeH+dWIo7J4ABLA7hXRyRiXKmn4kyWRD/9abiXVHzYqJM7qab+D3ilYZTM69mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BhWQi7A2t+/p6SBLY8a/qN/CWbcxfkOu+pnxTMlsCPc=; b=BLh6vJAhcJB2yAYXdUE+QDhyskqUsij6upRkcZwsZ26rTPF+Gs34WkFL17C22qtlqIi/XlUcNN9msDxRrcaNCzJgwuhs6PzQroOZbV6rREHJTR4T5zN+m1h43BolF/PWjYr9igGSCVXAvXx477wlaJpJeusx/kZxcYPtF8bGdia+F3ebdaxdswArSEIMRJPOr9SlD9KxS+Mw8ZRIV3q1uxcP6MuVfRQdgx/HredekwDYGZJDVuntB/95gZaQ+U790Vgpn69X2B3VL3lGeuEL78FQEIcefdZtZIDJzO7lGJnOQ1dzN/Ne+ro4k9rn+ddVgbYVszvBj6+xH/nK9flgQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BhWQi7A2t+/p6SBLY8a/qN/CWbcxfkOu+pnxTMlsCPc=; b=WZNfoxfV7db1FSXLU5L5RyDE8+qMfb8EzKurjHUTRrxBN7ioS73ngqPQ6TPJHKU0awIlh5IYklGjUrUnNiICalb7aYhudg60c9Y6e2I/TOFG1FgjyXqg0MIcUBqP4UiwOkubxH4PnLBauYR2utmcpe+1bBMWO5G8EFpkh7EtHZY= Received: from BYAPR18MB2488.namprd18.prod.outlook.com (2603:10b6:a03:12c::28) by BY5PR18MB3122.namprd18.prod.outlook.com (2603:10b6:a03:1af::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13; Fri, 29 Oct 2021 07:18:11 +0000 Received: from BYAPR18MB2488.namprd18.prod.outlook.com ([fe80::bd99:d277:33ee:d08b]) by BYAPR18MB2488.namprd18.prod.outlook.com ([fe80::bd99:d277:33ee:d08b%6]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 07:18:11 +0000 From: Rakesh Kudurumalla To: "david.marchand@redhat.com" , "thomas@monjalon.net" , "ferruh.yigit@intel.com" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v2] test: avoid hang if queues are full and Tx fails Thread-Index: AQHXfYd7L4dTcIZ+J0yRnIum/STvbqvaqhowgA+EqgA= Date: Fri, 29 Oct 2021 07:18:11 +0000 Message-ID: References: <20210720124713.603674-1-rkudurumalla@marvell.com> <20210720165052.606038-1-rkudurumalla@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e60bc3a7-9be4-41b9-6dd6-08d99aac440e x-ms-traffictypediagnostic: BY5PR18MB3122: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:127; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JKTyU31FTAc8MIg7bEE8hY5jZz23UkQO3Ohi2Ww2NY1fvaVc6HkOURW44mikc0Pcvrxwf1JctAv+XyLm8B3pzGfg+aHGFbZHKVZgkMPYD+0a+r6Wzb/bFvS+f59fD139aJBb6DwbWp5x39faQ98o/YzspvIZniM7nnlCU+zXlS/JxfHEF0kEn+jguH1gGn+6jg17DfJeLtXw7XvbxiQbAnxvkre0eoU3EA6ZIlsNx3Z8q0nmEnB/9u09T1e41Qel+tMNclVmpfNZEQ6mBU551LEwKTSPUtPJpwMtkMIt747bsDYnLFTNvQasZZARokMUloQaUuaSd1l0qEoWHnSkX9oTc8dzDzCSHTc4dNbrIPhuB1/jJAjujJ3ib9IvqcGzSlgTW5nBkSiTYdngjbeaP3rK6aHxSLXEfA3b7N8aPV91IKpqycUKdt4Cv9HIftTNg7+dr5qvqiXXM0AAynUkprFBs1cLpfsJ485+ak4egEP5GcfYqj59WVDeI7ceY0qZI4iSubvKhF6J1fVhzthIdDgZGhEJUTJ9YSebndi4pWl5HPhK91EF53EYwRf4wjk0OtBCmWBRXMIp35ZYb96PvreG5UcdS1D1Xlx9D2znTh8U45q/351htfygmJRD8ff8iIuxc8sXIWwSvnmZJV5iu7Z24HyVIf0/nXK2PPh5uU7yeSBPJ7KTyv1Az1BJhRaZ8Zp1noJaI5tRhAXj/2Y5Tw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2488.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(2906002)(4326008)(110136005)(9686003)(5660300002)(8936002)(76116006)(316002)(26005)(186003)(33656002)(38100700002)(122000001)(71200400001)(508600001)(6506007)(66446008)(38070700005)(66476007)(53546011)(66946007)(8676002)(83380400001)(54906003)(55016002)(7696005)(6636002)(64756008)(86362001)(66556008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wdqDw7+fcwRBHEjPCToItjbHNK/1v382sXsKLob9GVp/40i3hfjzqOMoeFdn?= =?us-ascii?Q?0sHE0znQAfcldP8QfCu9XAJ0wKN/4XLk+DZRf2Y8XicKrX+RnORvWwY57xnF?= =?us-ascii?Q?7h1dnMHwtntjGNChHV9BTJJuU9Sy+9UTwuLbUP2eHBWtksT6uvDyvsdHvhwl?= =?us-ascii?Q?Hj+CNnNu5zlafBd9DAIr5fp0+GMfa9EHpLaZGZqN7gzexk0JeV9CCKv2gV+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BafzSgAx4Rm5hA7yHPNoxv0atfWTwSYws0S8?= =?us-ascii?Q?UmuDT3VVBGerRs+ltpPzTkxGklHvczGt2/W2zZ3HKvFa0NE0HCH+VVlti91N?= =?us-ascii?Q?uL7iHcwlx8j6IunhOTYhZiSVjZ1g8Ms1BcbzwsrNSZZKgJg9BGw3lItwTX10?= =?us-ascii?Q?z0t9UFO+6e/JDQeSafrUOETMe5FHAR94Z+iN4wwOYs3Ff1aAPxU484AtGQ3U?= =?us-ascii?Q?LqcOiIiAF/E3EP0ct4zxStr9w2CNaaFzpPMyfrwkLISCteav4M8eyvf2NuAH?= =?us-ascii?Q?QLtXmHCqjVOeJ2tlI/rsbGO18Bq4HoCv0MHhNQx8wVcfvmpbqkGz6fRj0pMp?= =?us-ascii?Q?PLEVzLwt9KdPQFviwueK2dNlfVILIO7HaLWVecpiEOKh4qhWjU5j2fsQl+nK?= =?us-ascii?Q?KZHk9zIE77RD/gUL9ShSsg2rmChvqPExKuodZZAheSEELWQXYfIuJOQ7K1rN?= =?us-ascii?Q?ZYPhRA9x1SinBQRK97iZdYycWWJciz+0oj+fzty07B+NhIbn044MOQIo0IMo?= =?us-ascii?Q?OJdORJdHXI8Jmz8KzxuQ2h18ko7su481U/tuSiaBlyotYU4BhBYGhAZ6/+Bk?= =?us-ascii?Q?7KQR0w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR18MB2488.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e60bc3a7-9be4-41b9-6dd6-08d99aac440e X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2021 07:18:11.5255 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6X9PhGsu0lKvQXdMQwHFSlEeK2dL25knxYjcTAhylc61e7NuP19AHFvhTFBOiraxgq1Bgmm8+kVr1385+7YGpiUiqJ2t6rdCUeCmF19njYM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3122 X-Proofpoint-ORIG-GUID: xSGTrkiP1hRQLQyRnuBNNCINBYs9xMBR X-Proofpoint-GUID: xSGTrkiP1hRQLQyRnuBNNCINBYs9xMBR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-29_01,2021-10-26_01,2020-04-07_01 Subject: Re: [dpdk-stable] [PATCH v2] test: avoid hang if queues are full and Tx fails X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" ping > -----Original Message----- > From: Rakesh Kudurumalla > Sent: Tuesday, October 19, 2021 3:50 PM > To: david.marchand@redhat.com > Cc: dev@dpdk.org; stable@dpdk.org; Rakesh Kudurumalla > > Subject: RE: [PATCH v2] test: avoid hang if queues are full and Tx fails >=20 > ping >=20 > > -----Original Message----- > > From: Rakesh Kudurumalla > > Sent: Tuesday, July 20, 2021 10:21 PM > > Cc: dev@dpdk.org; Rakesh Kudurumalla ; > > stable@dpdk.org > > Subject: [PATCH v2] test: avoid hang if queues are full and Tx fails > > > > 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. > > This patch changes behaviour to stop enqueuing after few retries. > > > > Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") > > Cc: stable@dpdk.org > > > > Signed-off-by: Rakesh Kudurumalla > > --- > > v2: > > - Fixed commit message errors > > > > app/test/test_pmd_perf.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index > > 3a248d512c..0a95b408e8 100644 > > --- a/app/test/test_pmd_perf.c > > +++ b/app/test/test_pmd_perf.c > > @@ -456,6 +456,7 @@ main_loop(__rte_unused void *args) #define > > PACKET_SIZE 64 #define FRAME_GAP 12 #define MAC_PREAMBLE 8 > > +#define MAX_RETRY_COUNT 5 > > struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; > > unsigned lcore_id; > > unsigned i, portid, nb_rx =3D 0, nb_tx =3D 0; @@ -463,6 +464,8 @@ > > main_loop(__rte_unused void *args) > > int pkt_per_port; > > uint64_t diff_tsc; > > uint64_t packets_per_second, total_packets; > > + int retry_cnt =3D 0; > > + int free_pkt =3D 0; > > > > lcore_id =3D rte_lcore_id(); > > conf =3D &lcore_conf[lcore_id]; > > @@ -480,10 +483,19 @@ main_loop(__rte_unused void *args) > > nb_tx =3D RTE_MIN(MAX_PKT_BURST, num); > > nb_tx =3D rte_eth_tx_burst(portid, 0, > > &tx_burst[idx], nb_tx); > > + if (nb_tx =3D=3D 0) > > + retry_cnt++; > > num -=3D nb_tx; > > idx +=3D nb_tx; > > + if (retry_cnt =3D=3D MAX_RETRY_COUNT) { > > + retry_cnt =3D 0; > > + break; > > + } > > } > > } > > + for (free_pkt =3D idx; free_pkt < (MAX_TRAFFIC_BURST*conf- > > >nb_ports) > > + ; free_pkt++) > > + rte_pktmbuf_free(tx_burst[free_pkt]); > > printf("Total packets inject to prime ports =3D %u\n", idx); > > > > packets_per_second =3D (link_mbps * 1000 * 1000) / > > -- > > 2.25.1