From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20108.outbound.protection.outlook.com [40.107.2.108]) by dpdk.org (Postfix) with ESMTP id B74BFD0B2; Wed, 2 Jan 2019 16:55:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1h9QOOMENzpgU4mnDKRaOAbow3pFV8gjTJscA+W33sw=; b=BhQf88daAr+v0z9dqDcEw4IBdFFiTqFiYSQJ88rpP3Try+/NKFATSPx+ydJFsKm42Gu8Abp4tK7vIJot94hL/pdiPfoM/qN68F2USAZ6XNfL5Q+nApgaW7Sa/qyUBb9AA15mL7DmCcmBDsm0Fmn0Hq9uuWzTYTB3nYbOq/zc4o0= Received: from DB6PR07CA0101.eurprd07.prod.outlook.com (2603:10a6:6:2c::15) by VI1PR0701MB2782.eurprd07.prod.outlook.com (2603:10a6:801:a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Wed, 2 Jan 2019 15:55:43 +0000 Received: from AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by DB6PR07CA0101.outlook.office365.com (2603:10a6:6:2c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.4 via Frontend Transport; Wed, 2 Jan 2019 15:55:43 +0000 Authentication-Results: spf=pass (sender IP is 131.228.2.240) smtp.mailfrom=nokia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nokia.com; Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.240 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.240; helo=fihe3nok0734.emea.nsn-net.net; Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.240) by AM5EUR03FT016.mail.protection.outlook.com (10.152.16.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.18 via Frontend Transport; Wed, 2 Jan 2019 15:55:42 +0000 Received: from lfs-up-04.localdomain ([10.157.84.234]) by fihe3nok0734.emea.nsn-net.net (GMO) with ESMTP id x02FtgWO001723; Wed, 2 Jan 2019 15:55:42 GMT Received: by lfs-up-04.localdomain (Postfix, from userid 62146483) id 448A15FA9; Wed, 2 Jan 2019 17:55:42 +0200 (EET) From: Julien Meunier To: CC: Date: Wed, 2 Jan 2019 17:55:35 +0200 Message-ID: <20190102155535.29488-1-julien.meunier@nokia.com> X-Mailer: git-send-email 2.10.2 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(376002)(346002)(136003)(39860400002)(396003)(2980300002)(199004)(189003)(2351001)(356004)(5660300001)(486006)(51416003)(50226002)(81156014)(81166006)(8936002)(8676002)(305945005)(68736007)(103686004)(97736004)(26005)(52956003)(106466001)(44832011)(6916009)(6666004)(86362001)(42186006)(16586007)(4326008)(126002)(186003)(2616005)(476003)(2906002)(316002)(6266002)(450100002)(336012)(106002)(26826003)(478600001)(47776003)(53936002)(50466002)(48376002)(1076003)(36756003)(43043002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2782; H:fihe3nok0734.emea.nsn-net.net; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT016; 1:UwLAa9I4sRaDhk09TKKVwobf2HUL5jm4E5C+3agqn29IIIE4ql65BDKvx6+24YiVmC5865kEPOgjaxEWPo5SOeZR1I39D4wXolypIj2Bj1RqrG2V+YnpPpCD4tOPGp0e MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 376983f0-e1ae-49a0-c446-08d670cac02d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4608076)(4709027)(2017052603328); SRVR:VI1PR0701MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2782; 3:rrpJq1dUHLUi6o9BgRHw4tTfPVL0bEx0CEqnTYSdQbnvtQruvKi2ItrGRhwVk0N1SnthH6jyQ9NjOzr0nm90ssKIy/Yi2nuu53AJ1aUQynmP+BDZx5rdx0CNFdVKaqnXe9pe9xAQEqpYaZwx/cxHeRVEZOqzVNbk1MTMvGAKMZhEyU5J7mwh2B44Atuakx6x0AhuydIMIxRjMVgJuhaotej2OqRZh+mXRHwaak99/HKPMwOz5AdaQXLKSQ1tqG18FAStLidXD24SAh7l6YguzLc0sKey6LbnSdd2yJiLezGBJDmTy1KgaE9wB6PndYPPBjOnaFZsU5U5oJ2z7KB5g1+9LIZkdI5+UbDLsHcy04cgSFMmf6pgDGWEGPeX8EMP; 25:7tLhPAGG1hwTItHd+gr6HkGmVao+zye+iL2Ui5MV9etKpoQdZGMt0RC9OqVhQ0i8vkCAXuK2cYdJmRpcUtpZPCKm4qHPGBHXzqcaGZDEmY3i7FtUfV84hUlA2hbbQyUISAXOETcbQPZCouTZXQ/Uq9yRYwPQUqBXFYgZII729AzAmxRWjTT21wXLC7B37cpMbB3iR5aUiZPpLU8EHSba+Sih+UtoQqjRJoUIkpK/ADZmQWXvunKpnIM8/B8M5J+IoTRPQfMOsdVXse+QGrvhfwdkZq0/P/qG3CrpvBwxc1eCoSBhvoXWMI8pqfmnhgKM+W61fYOedy8lfAa8b7/qEQ== X-MS-TrafficTypeDiagnostic: VI1PR0701MB2782: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2782; 31:H4SrW7CTxHkXtirqtZyUKlErj0h9ZNx80crDmx/jbh4GSggdndtBxIqqkwjeEG/C9YGFxY8SEibDyZ1DZVAtH00QGFKrS5sHm/mjl/WO3lKUdP7PbGrEAFqz5mIAjVUF2ZC5aFApH6yAaLTIr87odwJXYO1dk15auAhFdvMN/Fse5HEP9DOk5D1N9to16vqi/Kk2Gsan2C/sXXmesVI/VItjoz3diRbF5Aevi4tkk/Q=; 20:HV3yFjhNyWcEDMdakQuaLRo9+LwJE9EEoQ+Ol8H/JJ40uJ2XFzLifptz1eOfBVp6lKtq9oJ667l3wrgpcPa6KuDJ/sprfGqZZ79UhGdISE+ybT5yoFeKzk8S4AokUk17MfeL6LVZUq9jM+29dZNxIc/jbTZYPT4Slm/jqHJOmMGxiv2FZGCPxiYKeeohf+xVfQ9NSP+Gw7iF5aeQqc67l1tSkPuO/Ls44UVu6NID8Z2o89esL0xcqMiQrVIMcZvt8Nc9+cjyy8yaWHj0HB9/FF9ZFhNANst7yXN1tIEsGf5QHhl5EDhum4LQ3bUCXSr0KoeZ25INCKwUXlmZdM2kL0WBnZ1v95ftSqOc+KJKsVPKeTXKktM+531mYmOxG5Va2zXv/OZPG5HRqDq9Lxp9f9Blfd+n/Z0G7DguOcbQxoy51j8EOkVEfDo6zvFJqYFbuY3ke4dfMqYX7CPbkcdKyWCBk2RRZQ/anxxNOgxdVjsFiXSx/biP8MCKszgDD31JrSD7DPl+Vfoi1CtY1jOSIp66/PL0v7EsQ0jVsy0JEcYSWzvidD3iQZlyOt8Hl2R7CFeyvcVOerMnxUstwMEh95S9Dye0ADLGyUEKdoTB1jQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(11241501185)(806100)(5005026)(6040522)(8220060)(2401047)(8121501046)(10201501046)(3002001)(3231475)(944501520)(52105112)(93006095)(93004095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0701MB2782; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2782; 4:kGrRDUs0mZe9zVsZT3NwHuMd+a91WaxChjmHiG3rvYCLMKNir8sZGRGGdleyYcGZbPrqIlSO6af9lted03XERySOznLd73bLzShp3C9MZV2XuhP4sT/jQWA1C5Gdt74qwAFuCa/SSL+H+J+tG8tzkgoDY8ggtILloaPhlBED+OZnvcTX0d3gcUCRkccJOq9xWfRXlkIG6WSqVYKvmNSXgJrGLxPkRuqYcq+5xg4FdvV13lnHv23mdBWELzx0U1bs9EQqBhVk7vxF4T7wTYeyLeK/Hq6O+B+uAbectNOxeF8b+wnmAb9FRuJIxl3kn7hZ X-Forefront-PRVS: 0905A6B2C7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0701MB2782; 23:NpvoRpyXq6D1nwUsfmleihR6o+ayCCYqr4q7gme?= =?us-ascii?Q?I9RNKzNCatu/P/Jyec/YSVV38h4j50pPrX1cSZ9y6CRlMospfDC+SgGCE/HD?= =?us-ascii?Q?EkHI+2QhMf04PLrxKRcH9SxigXXhCzCmM7836lLK0oZL3QSdbEjYGq5+uTyY?= =?us-ascii?Q?cqGpM1uRGTCrIPtp+07ahhqynmYrxngAE6pNRKGM+65u1CWOFkH8avE5noja?= =?us-ascii?Q?VWagxh0BBTPF+V6ZRvUWmt3wTUoy65OaB/bDsD3DMtbKlz+QLQgbiyOqljGd?= =?us-ascii?Q?/QuttjKriWyY+cDSVZgiTLsO59F0Nq1er7C/Xv3xMZucOwk+qD8zRQialCPo?= =?us-ascii?Q?ar36PlcJaPHoN0wh4HPm4V9gPp5ysUuy9iIijXmy/kR/XuKq0MZB14u7NHj2?= =?us-ascii?Q?qgV7aQ7CZ92f+ZN1QrvBYTBy69iUSekl3YRmRoJy/uJ5btNwtjl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PM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2019 15:55:42.7714 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 376983f0-e1ae-49a0-c446-08d670cac02d X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2782 Subject: [dpdk-dev] [PATCH] test/pmd_perf: change the way to drain the port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2019 15:55:44 -0000 If the port has received less than ``pkt_per_port`` packets (for example, the port has missed some packets), the test is in an infinite loop. Instead of expecting a number of packet to receive, let the port to be drained by itself. If no more packets are received, the test can continue. Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") Cc: stable@dpdk.org Signed-off-by: Julien Meunier --- test/test/test_pmd_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c index f5095c8..286e09d 100644 --- a/test/test/test_pmd_perf.c +++ b/test/test/test_pmd_perf.c @@ -493,15 +493,15 @@ main_loop(__rte_unused void *args) for (i = 0; i < conf->nb_ports; i++) { portid = conf->portlist[i]; - int nb_free = pkt_per_port; + int nb_free = 0; do { /* dry out */ nb_rx = rte_eth_rx_burst(portid, 0, pkts_burst, MAX_PKT_BURST); nb_tx = 0; while (nb_tx < nb_rx) rte_pktmbuf_free(pkts_burst[nb_tx++]); - nb_free -= nb_rx; - } while (nb_free != 0); + nb_free += nb_rx; + } while (nb_rx != 0); printf("free %d mbuf left in port %u\n", pkt_per_port, portid); } -- 2.10.2