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 ED192A0C43; Tue, 19 Oct 2021 12:19:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F05F40683; Tue, 19 Oct 2021 12:19:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 4DEC84003E; Tue, 19 Oct 2021 12:19:39 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J87jnt030323; Tue, 19 Oct 2021 03:19:38 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2103.outbound.protection.outlook.com [104.47.70.103]) by mx0b-0016f401.pphosted.com with ESMTP id 3bsfk4b69w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 03:19:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nmmRNJaBeaFW0dQiwymK7B0gqndDlIsozaed0bW9KTMFZxfJtFn+472POoI+XUCn7/EpKaqKv65jpqBu/ry/nLRvbkt6C4h0dXfQ6Um/w02p47hWFNXsz4iUqIQu0dMKmJ/WzEI/EmoKp6yFWy2QppkphmaD9+kVH4f7ZeLY6mD044EyJGl+y3EMadbYm7uiIjPi9sUrWznvMUuhOUWPu4EieG2JjOEhSLKaOccdaVi+lTbr/uOk2DcAR/GQTUUMYLqa55oJ4L4GEyohX8A2QyDM6cP2Bkz5EmTddnCeqZXd/ckR0LbLWwo2dIiOxTssgry0CKj/45KBn0U+DFMVbw== 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=XTQwNvPIhxe3BGsDQent3ACUcFUWbVrmD1ty/rd3KQc=; b=jBJjq1ALmpk2cyhwjF12VcpyVJIuW9+Vxr5jj2DYK10NxYWCRB0L/5Jkoj1w4JUtg0LcB107EBXTcpJVj9vG65GfOrndF4fHU2oPpWJcGuBB4HO5Qv2hciOhi4XbX40EEyke4f6LX0VqTP3C00UP0oYMJtI29rbL/jr5J/g8WvjpXyvjesKo7/UWA14PDl2EC9cdMCVJnsusIuHAy1e8l4mNjMcxqgwcX9Dveej6g0/ubwgZIrHcw+5EmJdgQ+HHO+lqa7Y60qIQKZZkdby1qaqGwpEurWmTdGeOhmeRQAxUBOBJGqcGt8OI+tzUB1zXBeX0d28z97TLgWOeg80c6g== 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=XTQwNvPIhxe3BGsDQent3ACUcFUWbVrmD1ty/rd3KQc=; b=dXmjFVPy7Ys6wwE13gdjoNN2cCz6Ncf1Uzg4WH+k9VTUpxb1ZDQnnO+HQ8cdn2nflL+TJwJsNGNujNkFPrEzsvmS4hB5lUt2e66i50fPz+o7zrKGbQs4njmTueW0SCaQ7RuXdGYbLJpC3mU/5C3DLKVEzrx00M13mrU1FMnvtCM= Received: from BN8PR18MB2482.namprd18.prod.outlook.com (2603:10b6:408:9b::23) by BN8PR18MB2881.namprd18.prod.outlook.com (2603:10b6:408:a7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 10:19:36 +0000 Received: from BN8PR18MB2482.namprd18.prod.outlook.com ([fe80::bd01:a119:9bbd:1940]) by BN8PR18MB2482.namprd18.prod.outlook.com ([fe80::bd01:a119:9bbd:1940%5]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 10:19:35 +0000 From: Rakesh Kudurumalla To: "david.marchand@redhat.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , Rakesh Kudurumalla Thread-Topic: [PATCH v2] test: avoid hang if queues are full and Tx fails Thread-Index: AQHXfYd7L4dTcIZ+J0yRnIum/STvbqvaqhow Date: Tue, 19 Oct 2021 10:19:35 +0000 Message-ID: References: <20210720124713.603674-1-rkudurumalla@marvell.com> <20210720165052.606038-1-rkudurumalla@marvell.com> In-Reply-To: <20210720165052.606038-1-rkudurumalla@marvell.com> 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: d7145329-c42d-4472-6030-08d992e9f362 x-ms-traffictypediagnostic: BN8PR18MB2881: x-ms-exchange-transport-forked: True 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: sDkw0EjZ0Q3dN+DQsv0MyeP+zgpSkIYs0b1AcUjdTdcMgtAR3857qPa5NKQ/vPS1kCP3yUGeMOyL/u2KHCgaCB80IwIQCbOhf73zriTGbut1ve6OlokU65HESpC4SK8XlYVg0j3RO6MSGuQPgVWYF8jQyAfsQIXIH3umaizkiX8Pby23rWGJOty/EuBrwh7YZ00iIOUPZDASIRLFv81xx0pagSeEi38PgS46tWYxnk6DLl31086YKKvlVTMrIRAIj4CM2JUBdFxKqAQjMl0abDs6nscNf+0lFtcX0VFCNOVy/SpmJHIGbCAvGXIynrMVDQkwHa8m3z0249MaS3QK+k8e9yXE09Qi2lsau8ItsASyWuqb8xBCu7Xye1nsppp5PPJE+jl/7rSXRXKY3sdMm2LHTELgqez42n6se3GC58Rz6vR/IX7rAG9PjTT4C5psxde20kYQJhuGFH0iLs4FD2MT7Zu8NagSlcxGncU/BrAVtMnJMSo6mpDHMBfFvaMXu1EbRIZfZQalRZTMjm98XG9zsyDeDPxw7WARRxNm6tcIJipwJdOsHepY0XjtZx7povfjTvPYxhTNAmnWwLCaka3uMlxuFJ7Q2onK+bzcZIHAbZhnwYz+MCy6qJ003A+Ha0pd6XNKLOxs2F7KDFM8zdqQqmwJZ/2gGEK0tygDEL5B2a7dSvTP85N6TA3xtBswzraIZp/svUFKWNvbelyXfg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR18MB2482.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6916009)(66556008)(66946007)(66476007)(54906003)(76116006)(64756008)(66446008)(26005)(33656002)(4326008)(86362001)(2906002)(52536014)(71200400001)(8676002)(107886003)(7696005)(38100700002)(38070700005)(9686003)(6506007)(316002)(122000001)(8936002)(55016002)(83380400001)(5660300002)(508600001)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+tsBAyXjODARHg6XRzYasjFdg5/smpDtgeBCag9eftbayt6ID1FHBxtMnrs4?= =?us-ascii?Q?avG0i1i7yMPms/0KnfWlO1x4luTmo3NlqWYuRhOdOlKf0R4zhlmDl8vUbtJ+?= =?us-ascii?Q?+fxdufh8FjdU2X1BYwXe6x6IKJd4CI6mHq3T7KiDn4ghvNTxHonYG//4PS1u?= =?us-ascii?Q?VqaMLXdXZmy+YAyKUaBAEjafJD6I4mujzBz60ERGKjPrvURbqdY1pYBWF7dl?= =?us-ascii?Q?b1Zm+kbNPdxiZuBHXxgQ/iHt9Ukkeh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?Q?ltwBnYzAt0CQNLp1aYQs2dxNDm8VyBXpDgfRDxMhwA2PScuwc2WMWuJNrno7?= =?us-ascii?Q?ACeXshXERid3aEzQfCc4lNbOFeR9yYO2onEB2Pg4aQcEofHSw7yQFq9Uce3Q?= =?us-ascii?Q?VapZUGxKLm1zDUQ79LTBVFEV214mw7tBSOEo9nIhY0a15fyuTGtUfrkNM7fQ?= =?us-ascii?Q?wfo=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: BN8PR18MB2482.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7145329-c42d-4472-6030-08d992e9f362 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 10:19:35.5043 (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: rkudurumalla@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR18MB2881 X-Proofpoint-ORIG-GUID: FtLoOZNU0qX5xQ3xQFOlUwNq3n5EHnBj X-Proofpoint-GUID: FtLoOZNU0qX5xQ3xQFOlUwNq3n5EHnBj 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-18_10,2021-10-19_01,2020-04-07_01 Subject: Re: [dpdk-dev] [PATCH v2] test: avoid hang if queues are full and Tx fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ping > -----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 >=20 > 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. >=20 > Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") > Cc: stable@dpdk.org >=20 > Signed-off-by: Rakesh Kudurumalla > --- > v2: > - Fixed commit message errors >=20 > app/test/test_pmd_perf.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > 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; >=20 > 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); >=20 > packets_per_second =3D (link_mbps * 1000 * 1000) / > -- > 2.25.1