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 9EF7DA052A for ; Mon, 25 Jan 2021 18:51:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83C74141173; Mon, 25 Jan 2021 18:51:00 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D54D2141168; Mon, 25 Jan 2021 18:50:56 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10PHo3F0028358; Mon, 25 Jan 2021 09:50:52 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=Zk6vhJQ3cs+xQw6SsrOq0u4eCYRLbS1bSOVN3BkYXeI=; b=XS4wj7vcz1DpuM0wIqYNOwqTW5bZ5cVWQJP5HvNUUs0D8/YpvpRH0JVSC4AdyXmHqhMq OwTMHSFFvTlOC1G8X6ITXpxKQFA+pK4ZqgR66iw7AAc6WrSUYgMc13NitfcXuOEyNZyW ezmwl+TuHUFdTkr1ryykqkqE2yCTNreJnGQ+zYXDdJ4ZytW19yWrzr8eMo1GfE8EX+pB gVsHeYIXKFiW8g1bQpdhU4eXqX8oLF5c8j4Ly4DfyHbFJXAizBpwkK6wQ4HgzZIA5oyJ smgY6vJx8a7OXsJxUEFA0VN1VIKUjBp2OCgS86xDITAzNqgUsaRcDDsa8r03pknG5S8o ag== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 368m6ud7rs-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 25 Jan 2021 09:50:52 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 25 Jan 2021 09:50:49 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 25 Jan 2021 09:50:48 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 25 Jan 2021 09:50:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SATbYL2lmmJ4X+ErMRgrdSCWIV8vJgqGsj+GWsU0G20OHSoaVhEjdbkx3w6+0JXSvFxMlJhLZmptI50iozLyf8+jEZBLL+BbO1e2gCjXJkSXFEkDRxPgJjsgQC1bNdpHbRaklbV46LZRUiPjTlIqOuGOPP0ia6COV71AAytxK/j9uXkvfJiTtFX1MKxNLtgsf7+WeiXNcbrjKGAz9REhSCGMrNM1dvYNqNXxkKi1rKm/PtUwkUemXtQ/LUnxc5zZ1rGFUVFu24nVZUrRJsaUQ7BOT6k5mGdx9nUwRCRmHHW6rt4zvB4bz3atORARCq+Wr/3NijL6LJ6688yGg/L73g== 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-SenderADCheck; bh=Zk6vhJQ3cs+xQw6SsrOq0u4eCYRLbS1bSOVN3BkYXeI=; b=BtFDji8Q9jr81fJbwNo0Pq/eKJtsxyi9PMaNklItG5kZWLdQl5dyFn3kHWKxrnItQmKtLgb+P+qhk+tRmZRVE4HTmjVhIP+UJZdOt7MLLTy3lP0T8wANslsSIaQJ8CiGh7a66IiP4ZHx2uVUh2bnBsC4q8m8livJNsCCTAoUEvo/NsiwgQpJl+w9xevEL86+kt051SZfGYuwUpfujUeeJ7UzLBZpRKJGGDHLk5gUGR2Zf2rik3BBhje2DkXqCIwN9alLvYOUJ4LbRuyAMe7wDMzFV1mOtDtLzV35Jg2h1pyTGCGWHRcDhDP5VydKFdHe/h8M3RqDBRXvAb+0UQBnyA== 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=Zk6vhJQ3cs+xQw6SsrOq0u4eCYRLbS1bSOVN3BkYXeI=; b=CI35Norte9/n1NzLHY8hBCo0fqUjUjuWc1QeRvx6KBiTdStkqQVtCqBv1D8Je/QhQrBVynz52TONkK5R7xa76BmMJnRQTaTglv02CRTpS2kak4UEqhP0TGdRwaUj8joS6ilY169cQPalhLM3tj92gS0rWcyceSHfm4Nh47QeYpc= Received: from CO6PR18MB3828.namprd18.prod.outlook.com (2603:10b6:5:346::20) by MWHPR18MB1488.namprd18.prod.outlook.com (2603:10b6:320:2d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Mon, 25 Jan 2021 17:50:47 +0000 Received: from CO6PR18MB3828.namprd18.prod.outlook.com ([fe80::5c2c:a13a:4f3d:94df]) by CO6PR18MB3828.namprd18.prod.outlook.com ([fe80::5c2c:a13a:4f3d:94df%5]) with mapi id 15.20.3784.019; Mon, 25 Jan 2021 17:50:47 +0000 From: Pavan Nikhilesh Bhagavatula To: Feifei Wang , Jerin Jacob Kollanukkaran , Harry van Haaren CC: "dev@dpdk.org" , "Honnappa.Nagarahalli@arm.com" , "nd@arm.com" , "stable@dpdk.org" , Ruifeng Wang Thread-Topic: [EXT] [dpdk-dev] [PATCH v1 1/5] app/eventdev: fix SMP barrier bugs for perf test Thread-Index: AQHW6kRUaJCXzN+00U2rvlOFtDBTPqo4sJzA Date: Mon, 25 Jan 2021 17:50:47 +0000 Message-ID: References: <20210114070830.707550-1-feifei.wang2@arm.com> <20210114070830.707550-2-feifei.wang2@arm.com> In-Reply-To: <20210114070830.707550-2-feifei.wang2@arm.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [2405:201:d009:380f:50b:3c28:481f:4468] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d0303634-1fa6-48ac-636c-08d8c159bf1a x-ms-traffictypediagnostic: MWHPR18MB1488: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jbBiyrn4Oxj9q5YJU90QbP/LQEMaMq6a9+k3blVH4alQdkKJ9728AmLOUblA0spPR/bFoLnEwmfkTipyKuvA0z2JjI9v97D6e8fyrxWH5w+GBp4+HLPQXrGTpgyCl6ycqv+g4ftm0rM+pJGo14ELcOrUeCyOvEJrnrYzokUZT3qFYLJl2P4iXShXiG18BPLf3L0UB/mJlfNsFnAf5XQ3dL9wWmwAbnu2BooxfZnpA0SHxQxITQLGN3l//jA3tnOLw123wNvDZT0r4up/BUoDtH+e7jPNAdPQC9pD8fJiE0LJ9cOIRuEuEfgwsAKhWBAY4JR1ZkRGIATLxLMzLIYuerFKdnqDSGxYGVFIZldNxwufzY9iQmec1Q+pcTqNEOZ56xjD5rdZlzgxHpUXh7ysuQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB3828.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(136003)(366004)(39860400002)(7696005)(33656002)(71200400001)(2906002)(54906003)(316002)(86362001)(110136005)(478600001)(5660300002)(83380400001)(4326008)(8936002)(6506007)(76116006)(9686003)(55016002)(66946007)(52536014)(64756008)(66556008)(66446008)(186003)(8676002)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?cqbZYT+IKBP2kw1WlvNAPPkLgfWufd2Py2Aomcy8PBa73VmAurJe7Lm1ovUZ?= =?us-ascii?Q?WfG0Br2PtaDE8rOlrZDu3/qthpFj6ijrAZKoMT9hCKyE2573RNkaHppxLWfw?= =?us-ascii?Q?ueNQ/a1KVQxi0Azpoy9Tr7s6Lu7Homi8mQ4a71NrPgWM8QJCp47tlPvtW2CU?= =?us-ascii?Q?BP/98Zep2YD8GboHJzvcTKmsQ0i24bjZWGf0E+GiWFT+stJ+rkkq4qaHJ7C3?= =?us-ascii?Q?Ihme75lXwhTOQZfxQjpxfLl4vq3sOyF20l+bSVEC2JWLLQZEiAWNAA4hg39Y?= =?us-ascii?Q?M3+rkGWhcZ5U3fyt5rPOWk2nHzBZf5C9WwkAJhCqALayBDffa2mye0MtUy9p?= =?us-ascii?Q?vQbuqLmSa5zPWtU1C4qQVxB81re5AGuTRet00JofSQWYY9aeA5ZKpo3XK5sT?= =?us-ascii?Q?anO4eCXZHgFU+Swx8C9CW85tsQdIyXpHC+ytM72VmZXXkXpgaRiJoSVoyziD?= =?us-ascii?Q?RNPNty4s2zoxVNgoX6IefGrqZpucBdqhUOh1sYHzdx8GpJCQ6rUsj1MDc0Fv?= =?us-ascii?Q?lj5lqzTN/Aceg9pg1Eq8UytXN1o1aKvjZuCMHYa8bM8W4yMa9h+lrKSr/GaX?= =?us-ascii?Q?uTElW6sQ1Gh10GMVjGSpgjmGgO/ngbOry5nXcqOutWzZ1oH6l+h7miBsaI/n?= =?us-ascii?Q?FwSj+sbTPHKdoci+YNRrK7vc6Mjbt4sbbjoV3zTRlHWgPCS/U/Zoz6av3gH/?= =?us-ascii?Q?l07yXXWPxUA6x/6sFxQf/fsnqgRDr7WwaL+MxF+iTM9ngfpXGPlqR1BE1Hf+?= =?us-ascii?Q?dUg1xLzaYdmtVZTq5DhvjnlQM84hO4oflQsKXxG8TpV7VOm5l3iSU94vlRga?= =?us-ascii?Q?2s+hR9gQl2WM06uUnajfT/Y2mCdcsry74GyvOJWTiYh7Prlw1qZ/+rE2Bf0D?= =?us-ascii?Q?+V+SVc73HjsXpomBxCbPckllNDC+v3ysI8W026ys9sRzE5TxtZvGOxqW+viT?= =?us-ascii?Q?m7ths+O5JWmsRUWKyZcqDDoq/vz5bZtL6DEA3fuYXsDJobcX9H5HHPhGw+PT?= =?us-ascii?Q?Kavg0LeHCuipPMAZfLo2pRZtoKdzWlXB360uSGgwPD3rEXjb1kvTDuK+qfTd?= =?us-ascii?Q?9jEx4fEzXAVrS1uQs6Z7PuG0YHmH5ABD4cCG9fSC7+EEjtM0+aUnJdwZmZCZ?= =?us-ascii?Q?jYoTHbkxS8kE?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB3828.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0303634-1fa6-48ac-636c-08d8c159bf1a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2021 17:50:47.3939 (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: RY5mYXd3w4YQacxD6SEZjtjt00Te44U6hAsL26iyrfpHEkgQDW0R8U3IPw5hioCWW+l0+xUenbZZdywfkCA+k1xB40rgR/mPu1U3/CC9IEk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1488 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-25_07:2021-01-25, 2021-01-25 signatures=0 Subject: Re: [dpdk-stable] [EXT] [dpdk-dev] [PATCH v1 1/5] app/eventdev: fix SMP barrier bugs for perf test 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" >This patch fixes RTE SMP barrier bugs for the perf test of eventdev. > >For the "perf_process_last_stage" function, wmb after storing >processed_pkts should be moved before it. This is because the worker >lcore should ensure it has really finished data processing, e.g. event >stored into buffers, before the shared variables "w- >>processed_pkts"are >stored. > >For the "perf_process_last_stage_latency", on the one hand, the wmb >should be moved before storing into "w->processed_pkts". The reason >is >the same as above. But on the other hand, for "w->latency", wmb is >unnecessary due to data dependency. > >Fixes: 2369f73329f8 ("app/testeventdev: add perf queue worker >functions") >Cc: jerinj@marvell.com >Cc: stable@dpdk.org > >Signed-off-by: Feifei Wang >Reviewed-by: Ruifeng Wang Acked-by: Pavan Nikhilesh >--- > app/test-eventdev/test_perf_common.h | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/app/test-eventdev/test_perf_common.h b/app/test- >eventdev/test_perf_common.h >index ff9705df8..e7233e5a5 100644 >--- a/app/test-eventdev/test_perf_common.h >+++ b/app/test-eventdev/test_perf_common.h >@@ -97,8 +97,13 @@ perf_process_last_stage(struct rte_mempool >*const pool, > void *bufs[], int const buf_sz, uint8_t count) > { > bufs[count++] =3D ev->event_ptr; >- w->processed_pkts++; >+ >+ /* wmb here ensures event_prt is stored before >+ * updating the number of processed packets >+ * for worker lcores >+ */ > rte_smp_wmb(); >+ w->processed_pkts++; > > if (unlikely(count =3D=3D buf_sz)) { > count =3D 0; >@@ -116,6 +121,12 @@ perf_process_last_stage_latency(struct >rte_mempool *const pool, > struct perf_elt *const m =3D ev->event_ptr; > > bufs[count++] =3D ev->event_ptr; >+ >+ /* wmb here ensures event_prt is stored before >+ * updating the number of processed packets >+ * for worker lcores >+ */ >+ rte_smp_wmb(); > w->processed_pkts++; > > if (unlikely(count =3D=3D buf_sz)) { >@@ -127,7 +138,6 @@ perf_process_last_stage_latency(struct >rte_mempool *const pool, > } > > w->latency +=3D latency; >- rte_smp_wmb(); > return count; > } > >-- >2.25.1