From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20125.outbound.protection.outlook.com [40.107.2.125]) by dpdk.org (Postfix) with ESMTP id D8AD15911; Sun, 3 Feb 2019 20:42:33 +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=3mXshkMeAHNzrOrplbFfOh7HHIzqo/fqeW9yzBjvPo4=; b=OGISiK4vtlvlF2Mk70YpCQx7jjOhxsXVut7f0NxOef1x/x8Jakjnr6uO0/4subkfmgnJZcckdp/O0g387DAqgavUdqPOLGI+yEKw1R463C2G1Uanq7ze2fcWg5skMGOlBpKK4uy/SkKNzvQkqN3LhzmOdizv6zMGzUkkR/aQWIE= Received: from VI1PR07CA0203.eurprd07.prod.outlook.com (2603:10a6:802:3f::27) by DB6PR0701MB2837.eurprd07.prod.outlook.com (2603:10a6:4:71::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.8; Sun, 3 Feb 2019 19:42:32 +0000 Received: from DB5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::202) by VI1PR07CA0203.outlook.office365.com (2603:10a6:802:3f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.11 via Frontend Transport; Sun, 3 Feb 2019 19:42:32 +0000 Authentication-Results: spf=pass (sender IP is 131.228.2.241) smtp.mailfrom=nokia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nokia.com; Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.241 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.241; helo=fihe3nok0735.emea.nsn-net.net; Received: from fihe3nok0735.emea.nsn-net.net (131.228.2.241) by DB5EUR03FT009.mail.protection.outlook.com (10.152.20.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.17 via Frontend Transport; Sun, 3 Feb 2019 19:42:32 +0000 Received: from lfs-up-04.localdomain ([10.157.84.234]) by fihe3nok0735.emea.nsn-net.net (GMO) with ESMTP id x13JgUSK027495; Sun, 3 Feb 2019 19:42:31 GMT Received: by lfs-up-04.localdomain (Postfix, from userid 62146483) id 3F76735A4; Sun, 3 Feb 2019 21:42:30 +0200 (EET) From: Julien Meunier To: CC: , , Date: Sun, 3 Feb 2019 21:42:18 +0200 Message-ID: <20190203194218.46480-1-julien.meunier@nokia.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20190102155535.29488-1-julien.meunier@nokia.com> References: <20190102155535.29488-1-julien.meunier@nokia.com> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:CAL; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(136003)(376002)(346002)(396003)(39860400002)(2980300002)(3190300001)(189003)(199004)(446003)(126002)(44832011)(50226002)(2616005)(11346002)(316002)(486006)(476003)(36756003)(1076003)(186003)(26005)(68736007)(47776003)(2906002)(81156014)(305945005)(81166006)(8936002)(86362001)(8676002)(4326008)(6916009)(50466002)(6666004)(103686004)(356004)(76176011)(48376002)(54906003)(6266002)(16586007)(51416003)(42186006)(336012)(52956003)(106002)(26826003)(106466001)(53936002)(97736004)(478600001)(2351001)(43043002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0701MB2837; H:fihe3nok0735.emea.nsn-net.net; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT009; 1:a5YIl2e7a9Qnq3nkmUsN/smKYFZLf7PuvCOwlX1viDdUt8YwyP8JH2vKxHwnXdGo795+CGhcRiSa9eCgUxjhnkGztNmdWTzr5nmXek62qZq2g35UI80IhrqZkzEmTSYSpEbtWy0ytgUqlLq8Z6JaVQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 071e99ff-71be-4a1b-5db8-08d68a0fbd2e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4608076)(4709027)(2017052603328); SRVR:DB6PR0701MB2837; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2837; 3:ke7aYiPjcSnEC9jFxjrduArvgQVP83mG5IZ/2veo2Wm0kSycmT3dZBZYYl1PxxLPQPnYhxL3vwa2MwTeIZZiktU04Xt6Xs/2sFDFPiWt6nxEYeVOEdWqFli7rtzxxuOft53gQ2I1p1PWAqEYejDcEm42olvxukdcuFfRiaYD3XaBwEMlJEkD/xTdz97gYsgtE6CSrbE0MtL/FY1RPZAs51BbxdU21c4bLrcmf4sl9sHLTJYuuRAonPStmzJkMB4cxdACkVcuyGmgd7Yxjk/eHcPN+f78pgVwvriiBTJvrUVT7NZIYZZ4e57w2hKKYAgb/+XA7iXD332PfKzEUtEoFpUI1IybnEWNghn0Cd5hQLw834Vl0krgm39Utb1NtqOr; 25:npVi8aIzZ3Gz0Ej3wXTPQwDksN6VSjtunvn68HgA9scCw5X48ivb2G15Dp/AXeNlbFxy118Vhhg9fIvh7HPaIOze2RNKAq9c7i8apRQ3ZErFZu//unNjjZ4I40i3AkWis38VXjQYajh1HRf/9uBaH8poK/r91/XVeYO2YeBDLV3boAHgJi5mjQWwstFSwyksJKW5Md781XwnkwBH571YlHqMV3rndrWT2fBhvYEL9D0tfL1vENBvb0CqMQFiEOroEWg++KIzgdfFfg8nnvtp3yIl2BZCElNsO9FAxZghisLGSJljWmFWOWyeJQwTX72S2Cj8kH0iXehN3NNcGS0Qcw== X-MS-TrafficTypeDiagnostic: DB6PR0701MB2837: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2837; 31:bhcCBhjhStMxIM2MGBHpZR2FdyV8+as3yahuVFhz/DqA5IyVFunP+VXQ9VGtO4QT9+O5LkJpEBo7mBRW+R9gUlLJPC4SRbRKPsjM1J6GbU0ejwGoRvlZszHoeURimZUYG72gB1VoC/uZFaAjZkoh5cEmK7dlnO21LaQxOxxI7ZhklvsvRHPmWZtGYCUB4NtJlBdRyqzzoumKIoFoIAvE5na6V2Zup24nmBjPQoAtRBY=; 20:HF5cRijAcjVnG64JbE4/1Aw0btYspPXOKLlpGTuVTrS5qKnygx9Af0o6UPggFM8KC1YSVRKDUhp19KBZYoNPjepxK5xjaynTGw4/1rfqW/0sQADTvTowgdjJCDJJTw0Gm2Xnm+sX5do/pAvXedeo896CHLhNCcRCWldBGefEOzfAPR2H1wIOTSAWWrketRzKDfgOfsokdWacFh+fWy2KJs2k+f+5nJ4kLxsve8PZuLBUsnXQJqjA1zY1mo8cM9IrH8Biv0qmlNa7oLTf066fJj5TnT2HxQAkVW26LxRtsJjNMypHHoOZY/fklIsuuvN9U7KGpVgx5ry1kHgylYe9Q/5KuYUYYIOkKFdB9+10YzJKnJyiFGoWVA8ZCdL+BHyBR4DKt6Z6tIrYpFFQrPjTLoRljbjeeoTsmeoAK6IkDn43Tkn4rOFB0CpAOey4a5tvk7bXl/l6etOOI5YPeUnPAIwrI40VVov1RTG4uSMmEgKGVaxlS6duKlvk+a8qAC21MmAAFrNgNL0gR8qGj63+q+H1XO/T3ooVX5fFWlYn+9gChgaIy6u3pptZv2krchLk+6NdDYD9xVZucBwQfbT3twUE4UX+FV5uBBxecoTq7O0= X-Microsoft-Antispam-PRVS: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2837; 4:S/ainPxPtaLXvkqUV3zz+TXEJ/4ehkkLNYsPm25wcz9zrxsMmBRYcYy4cX1U0+NmloVG7jPV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oNA/rTM8PSAFmuhWWQE89qmShymrBBlMQkEojy5N9aF5wHlNuIm3d3xPgMEBBHTl7o4cXUm8tXCAUygs//TXG5EVMMKsZqAWNpT2HAIIaOyxTgdY1bDKH2cBJVd8ZSs= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2837; 6:0fDX15IRrlgDeB11+cg6RYI0wKKON5VZUmLqH0y8pAEBAcsyqWsVDTw7uDHuk4TMQC56MOKLt1jqXsBMH5soaOYWZtNDD4hSFV1OQVAISTjfbVivTHtpr/X6Y9j7lzQUZaz4CHISzrzj00coGp68omwDeJ0Xv9K6a7P0//KsIpvtQoYw68gFW72I3s9PnnLb/9p+th6agJYDof0xGZBghLcNqAPvdMLcOi7RQvjQ+nreYleprvLdmAvfyRDSAgd8JV5s4EsDaSrn/UeTGeqIsCGIttH6MKuoCAeBAui++3f+HyboTJq40TizsOjbwxfpoYnLiGJvY97Bg8FcUARGeFvo+/NgdotFGqqsFbWglW1P5AyNx6Lp8q73whdq8pXNFXtSNJHC1C//bCuGM0miDmhK7v3RKzXVU54AQfFa50PIX9fs14sWAstap1FVJzopESS/bYk06XTiduyaKTtz6A==; 5:j5r83R1c/LOX6O8SZMsGW+P6Vrb25qpkxDSe3WIurY9IvDXKjY58HFWbP9l7Mk90ZKkQHQ+Roz6WW9iYQlUv7qmrFygoa2/iuCFLiigZdaeui4be1YM1EcmZKukhrrO/Xs8DiO4cGr6PflposMOhxJ/gR0d1PGnvjOQf08qmTHoT10p34qoSdEOHak8lX+8kSTPFkv8dAYlCQ09uJPYVRw==; 7:Mj4QXCtuTDRldY07nJFtO6NQ+11ni9ZzhfqK9PfcxBGREECwS1ls0RIz/Yyls95h3KJmHxvqfeqtGTk2EyzvStSqHSH3eNTeqnu2Jj8iLm6qhFjQw/4QA9Ydikc72hgcUrc7Kem45l8nMH/+DLHWcQ== X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2019 19:42:32.0801 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 071e99ff-71be-4a1b-5db8-08d68a0fbd2e 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.241]; Helo=[fihe3nok0735.emea.nsn-net.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0701MB2837 Subject: [dpdk-dev] [PATCH v2] test/pmd_perf: fix 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: Sun, 03 Feb 2019 19:42:34 -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 --- v2: * rename commit title * fix nb_free display --- test/test/test_pmd_perf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c index f5095c8..c7e2df3 100644 --- a/test/test/test_pmd_perf.c +++ b/test/test/test_pmd_perf.c @@ -493,16 +493,16 @@ 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); - printf("free %d mbuf left in port %u\n", pkt_per_port, portid); + nb_free += nb_rx; + } while (nb_rx != 0); + printf("free %d mbuf left in port %u\n", nb_free, portid); } if (count == 0) -- 2.10.2