From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710049.outbound.protection.outlook.com [40.107.71.49]) by dpdk.org (Postfix) with ESMTP id C3F061B4CE for ; Thu, 29 Nov 2018 16:09:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s+2ChFHHcceUxcej/H7asFPEgUqglm4zRIdJ/79tl7k=; b=AaBGamsC0Lea55njxOwmPdRdSvi+2nhXyJX4k7PzFn41sXT5bhedrTHXQfjSfZoLKKG6yQbc/YOq/E6X9c4Frh2MUSmc/3JhwWqpCHwCLIAfrPCjjcksUkbEvBXf0GAmlb/BA9nmu9sZgvy8haBTt4DHn3EHkrlu+E2in7O7CHk= Received: from SN6PR07MB5023.namprd07.prod.outlook.com (52.135.121.77) by SN6PR07MB5040.namprd07.prod.outlook.com (52.135.121.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.18; Thu, 29 Nov 2018 15:09:11 +0000 Received: from SN6PR07MB5023.namprd07.prod.outlook.com ([fe80::394d:a08e:f006:7c23]) by SN6PR07MB5023.namprd07.prod.outlook.com ([fe80::394d:a08e:f006:7c23%3]) with mapi id 15.20.1382.017; Thu, 29 Nov 2018 15:09:11 +0000 From: Harman Kalra To: "bruce.richardson@intel.com" , "david.hunt@intel.com" CC: "dev@dpdk.org" , "Jacob, Jerin" , "Kalra, Harman" Thread-Topic: [PATCH 1/2] test/distributor: flush with worker shutdown test fails Thread-Index: AQHUh/V7tk0iP6kPV0uRty7WIXZY6Q== Date: Thu, 29 Nov 2018 15:09:10 +0000 Message-ID: <1543504135-137867-1-git-send-email-harman.kalra@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR0101CA0044.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::30) To SN6PR07MB5023.namprd07.prod.outlook.com (2603:10b6:805:ad::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Harman.Kalra@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5040; 6:oXc7Y5pqbyn8WKB3fK0VI33Qx63unH24+3aHJwr+MQlMo3tb4Ru6u4YkD3svM6env15uVVFQV27/p4fE8D1OSIS98q1Dmr15ez5dHqF7lKxNRkksSCIEPGypeSD6dnR3KXfgQ6bv0PQlF9lhYJE8nJckE0SvgxgLgnPWXqbTJKtnJbsBurhp5PBYVmjmXkL6bdzAIoX5vwgyY0A3sn1//uqCcGGS+G4fZtCNANFFflhlTZYCagpop6y1DL28TcsB8PVPJ25zVAYPtRUwbdVR5DvqhjzW1qiDn3diX8tSFzcoh2gx4H/5eFbF8hfBTWiHQidXIXqJTDJVPZwr3lSCO0X/lDwZh2+/7hU5IIU2a19RYBOaHLSqlrKvEb+UPfJqwajONc6MMWoVXtJTm+HyU8g+5t6Sn2pXfstJt/d18So6i4lEtlEWP6LXKOlYKz8QPAAVjPICu1TcjA9WaB6k7Q==; 5:XkvTsB+6G+g1ng4foXJIGtwJOlXZtD/hVGwXdyeuf3voqNoHtM/d6V9CTbzpTSZisffRqinP/dTtgbLViHU280wZueuFIpUQET9b1zMGIbOuUMG7kOF6WSccI6bJIa3nSo2nNUIfhUV+3Sqpl6wYn5RTLuPp7EDe9CH217zwKJM=; 7:++ojT4oITjd6Lio6e16PUOUfYpDfLv2k5g5SHP2ZSh0Sem64nZ4ydGo3o6tIkCMm6ngYgoIHjWuaqqymO/uJ4QZqiN1js+88M85wBF7tyurLc4U+ihtoFk8JnzsCvJ65t1RA8LIdNc76JDOk8m9slg== x-ms-office365-filtering-correlation-id: f6f7aa7a-5fea-47fe-c922-08d6560c9d98 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5040; x-ms-traffictypediagnostic: SN6PR07MB5040: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3231453)(999002)(944501410)(52105112)(10201501046)(3002001)(148016)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5040; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5040; x-forefront-prvs: 0871917CDA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(136003)(376002)(346002)(366004)(199004)(189003)(256004)(486006)(14444005)(6116002)(5660300001)(26005)(386003)(6486002)(66066001)(25786009)(2501003)(6506007)(14454004)(478600001)(3846002)(72206003)(4326008)(42882007)(2906002)(7736002)(99286004)(476003)(2616005)(6436002)(186003)(55236004)(102836004)(71200400001)(71190400001)(305945005)(68736007)(52116002)(97736004)(6512007)(8676002)(81156014)(53936002)(81166006)(8936002)(107886003)(316002)(54906003)(110136005)(36756003)(105586002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5040; H:SN6PR07MB5023.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: oTREIkgr06HrNYyM75aXZ46HMeTTBrnpVBSy+Ia2QbBwegjWfdLcqUbSHoN9kankYvZP+JpWlLC+/GKuv6pBWogO3QgrtfZzCkfE42ODfIBVanUounT+/NfLVRFi7Z5AZvJyt9ysCFNIhy1TupNYQkMHMmj4dO/Oj4svCe8MsFMUuXBxPxiEJ7xSlZMbm7AZPEjq4H9dIE0U9qzkooFFu5Yj3Kl7l+cbDF15+9lEnWFW+xilULtRaK931/F2qWW3taWXUnar6fn6ZWTvKoZtevyI3timG2TT+B+ZODzfQvOUXvXDRW5GzwTiKXHfFY6WPtR5Fv2WlFCNXBs8BmLnhCIigLKQtN+Cjx3yPpa0lyU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6f7aa7a-5fea-47fe-c922-08d6560c9d98 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2018 15:09:10.8917 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5040 Subject: [dpdk-dev] [PATCH 1/2] test/distributor: flush with worker shutdown test fails 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: Thu, 29 Nov 2018 15:09:13 -0000 From: Harman Kalra On restarting worker 0 after shutdown, packets handled by worker 0 must be incremented only when a packet is received by it. Signed-off-by: Harman Kalra --- test/test/test_distributor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git test/test/test_distributor.c test/test/test_distributor.c index 98919ec..a723254 100644 --- test/test/test_distributor.c +++ test/test/test_distributor.c @@ -373,7 +373,8 @@ struct worker_stats { id, buf, buf, num); =20 while (!quit) { - worker_stats[id].handled_packets++, count++; + worker_stats[id].handled_packets +=3D num; + count +=3D num; rte_pktmbuf_free(pkt); num =3D rte_distributor_get_pkt(d, id, buf, buf, num); } --=20 1.8.3.1