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 3075DA00C3 for ; Tue, 27 Sep 2022 23:06:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25554427EC; Tue, 27 Sep 2022 23:06:54 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) by mails.dpdk.org (Postfix) with ESMTP id 3130F40694; Tue, 27 Sep 2022 23:06:52 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=EYvCJm/tb79QMqSOldBq8L+teQrtROQqS1BjPKIFQc6bZS2eDwXM7pbqUbvNnerJ9GHNZnfdPutmFb6x2/3OF9G0CVV1MEIP+M0XqI9hkrXw9iiM4M5pMeUaNlXKz760L2Y2LwmYd6IrXqbpkDQ34QXyyeBWvlfud02VQyePBK++lAR6Zp++w2ZuclzFajv/kuZteMeZn86knRjPXga1uIxkQrI45COVZHehblOJNJ7QG1vnIheH+UDtaXDcue9c5HUYU4ceTWym8Lsy2TXBUpjWC3syYw66QVecETgttz4mmiRSQGzomGfpDPKiOXwjfxQZQ4CmcYqk5Oa9e5IHxQ== ARC-Message-Signature: i=2; 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=FCyB0rKsROkkk4q+LXJTtGFeUjclxJuabMCzwYIU4w4=; b=JR5AN17fvaU/26cH5REPS2GAWWabCisBdqzyg6eNmoErqdM1SX3mGil/QnyBzXVglMw3EOwCs1UKtXU7UEIuJQZFZ5HHV38ErGF0yKJau2+34IAcs7w94DJFQ+3FLPRqrW7u2pFwgfEJRvU2fJPdDvBRrOrMiUlhhMnCQ+LCOE8gSwrej825hHU0x7k108xCNESCEOpLJ0aMMvDfk54WdsOL9kSFDhTq9kwFnK13whjHMSL8tA3teLWHjrv6Cs7heuI4NBpE9yX+AnVvMXA+TN6SwjGVAHhB1y1WES1SLCuWYDvI8Yf+j1J6EmMeKDWSJnq8mq08/Jy3FbxyUcqL0g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCyB0rKsROkkk4q+LXJTtGFeUjclxJuabMCzwYIU4w4=; b=gRQ5gXD2GnE/zxpLI62omriR/73x2P3cb7c0gW7xsSoRGWz4vJsjtRJubU05pDrvcHw2eAHGQopCSo5yvaKYMhLa37/gC/b1BTBKbsPmAhJBwef+r2OzzjBezt5HX0m1QWH5RrKmZvXCem5eM1qedGa/7jG0eCm0vkZ9SQ0ljbI= Received: from AS9PR06CA0324.eurprd06.prod.outlook.com (2603:10a6:20b:45b::13) by AS1PR08MB7516.eurprd08.prod.outlook.com (2603:10a6:20b:483::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Tue, 27 Sep 2022 21:06:49 +0000 Received: from VE1EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45b:cafe::83) by AS9PR06CA0324.outlook.office365.com (2603:10a6:20b:45b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Tue, 27 Sep 2022 21:06:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT052.mail.protection.outlook.com (10.152.19.173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Tue, 27 Sep 2022 21:06:49 +0000 Received: ("Tessian outbound 99ee3885c6d5:v128"); Tue, 27 Sep 2022 21:06:48 +0000 X-CR-MTA-TID: 64aa7808 Received: from 1fcbec75c994.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E13B8E2D-1657-4F76-B554-5D436AC23466.1; Tue, 27 Sep 2022 21:06:42 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1fcbec75c994.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 27 Sep 2022 21:06:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=De1rNWCJTCFC4EnA4hyjs1m1JxntGshGmZIH24JRTVXhbI/tX7EHLDVkCQzTg9J2Yph78FwinRRnJOHC3FM29ziURKzOhvWZetwRCzSFgIOVL941BQQsqWsHiFd9k8lQl5YnHqCcsGtYINjejpPGrYAMCM0lSokBwLx/+QgtLiw0ufBbV5xtJRt3z1YpVRn3QLDFUfvXIxgYcvpdvKEuevBCX/BlREMRSfhHB2Db8VhAgxhIIC856jTKVOhxPHI0ppDrU2pa0leD8gQNaU436NsysW0nqaddqfamjA0MqJcgDVZYF0YjYRjMIop8CFJJJDbgX5u831mozvl00yuaHA== 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=FCyB0rKsROkkk4q+LXJTtGFeUjclxJuabMCzwYIU4w4=; b=N8X5Wfbud++UhZzluBIIItkcqODayw9xXk027SU9Yo6UBilbtHDnOn0dvutFKxwAPTH9aoJjH0nCZ+YC20GTK+I6H0TYEYFPE15kR/IGrmHEZewbUvu0whYBgD37YlX1p4GcTLj+AZd6TRQof0ZA3d0wAltAZ3Aovoy1el5gfFJWFKvBVnJ4G18tcLX95HilwHBSKOjCzr+JZuLfEFcL/S/y7gwkX3vvUO99022uA3eivhvWGbnamIW7z3jz53l517/lm71NF09ReIi8C09kVXo51w+rxExzLoLu1hC9ZQikfpNrgCq+mM016yKZmyvwHsHfhRxaXwnRmS71fgLoNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCyB0rKsROkkk4q+LXJTtGFeUjclxJuabMCzwYIU4w4=; b=gRQ5gXD2GnE/zxpLI62omriR/73x2P3cb7c0gW7xsSoRGWz4vJsjtRJubU05pDrvcHw2eAHGQopCSo5yvaKYMhLa37/gC/b1BTBKbsPmAhJBwef+r2OzzjBezt5HX0m1QWH5RrKmZvXCem5eM1qedGa/7jG0eCm0vkZ9SQ0ljbI= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DBBPR08MB6057.eurprd08.prod.outlook.com (2603:10a6:10:1f5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Tue, 27 Sep 2022 21:06:41 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::c1ee:db1:105:9372]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::c1ee:db1:105:9372%8]) with mapi id 15.20.5654.026; Tue, 27 Sep 2022 21:06:41 +0000 From: Honnappa Nagarahalli To: Slava Ovsiienko , "dev@dpdk.org" , Ruifeng Wang , Matan Azrad , Shahaf Shuler CC: nd , Matan Azrad , "stable@dpdk.org" , nd Subject: RE: [PATCH v2] net/mlx5: use just sufficient barrier for Arm platforms Thread-Topic: [PATCH v2] net/mlx5: use just sufficient barrier for Arm platforms Thread-Index: AQHY0js6kBq/o7BFf0Kgf4d3XmoqKq3zxONg Date: Tue, 27 Sep 2022 21:06:41 +0000 Message-ID: References: <20210606164948.35997-1-honnappa.nagarahalli@arm.com> <20220830200038.1694160-1-honnappa.nagarahalli@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: D69509B8BBD17D4688B3778E19C18FDD.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|DBBPR08MB6057:EE_|VE1EUR03FT052:EE_|AS1PR08MB7516:EE_ X-MS-Office365-Filtering-Correlation-Id: c9faeb7e-49d8-4598-05fd-08daa0cc3197 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: hu5yhKILQ4FiTiHpdiAQTQybKWu5UFj9pZgBt/2Hs/TpvfGMqn+4w3XQKwuBuyyqQICvmG7FtAcvjnyfRfJDPMloMCHyPWq4K6sPXdJjiIQ1ryEGMRN4+ysxZokHaV++sH6yS4m11L6Ad1ZMloOV6RwbVmhG3ji8mlmspxLV0yAeRk4xSINPDvWpQOHM1CQagjEpeJWdzMYBSb+PCcvR5h9CE2GsCu1A2qZoR6tbk64BYEFrm8A8KA64m8GrbbKEWAQTbDJOhKxuBLHMcCbr88SAK1RNSLanVM4kSEXnIGhb+8rX20negVTpduxllpHDZalDkp4s7t2io04IzQn1GXj90+wY0iZ4XqXhpWr9d3rNGbUyajXzNAc4B1EQPStovnxCnMtK9aX8niDN1n3Uyi/qNP74fdHbq3P1KBecGMkzhX1lpI3eP/Hzk6EIw+9U4g9STwGFDCQuFYSn2rsNpPVICMlrqRfFyCCEWhL+xvGZwS9AdcQK+kig7vdnCBnUtX2ImQv0Ke9wokWhLHaSzE5F8hc/uHI8MvM86+q/X2R0QGyMsdFYWICJ4aX8zPry83hjGLq+tWUG0CTlwb/9MAB925S16iHpmAn3q94f3ordBaCGDxzTSpU/nW6UhSSjvjPH3eUBDu4aEZXQZllmmM/0BDpeQlttGkCnPBkixDXtUq+aPfq9rxgkoTM7TSsnV9rAZ8gShI1qB2ul1BWyWzjQF1V6C8lmhY3w0exV+4TyzHsMv2bMJjfGkjIFsP8WpgKxCnaA0Fg+Rec4pIHjI0M3Hbu+uFMdw2Xz+v/p9lI= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(396003)(136003)(39860400002)(376002)(366004)(451199015)(83380400001)(186003)(71200400001)(6506007)(8936002)(41300700001)(33656002)(122000001)(2906002)(38100700002)(316002)(9686003)(5660300002)(478600001)(26005)(64756008)(66446008)(4326008)(8676002)(7696005)(52536014)(66476007)(55016003)(53546011)(66946007)(66556008)(76116006)(110136005)(38070700005)(54906003)(966005)(86362001); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6057 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a7d852f0-6f60-437b-30da-08daa0cc2ce8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xx0woEYfL+L2Crdtw1p4hW0Yxpj6XD4MAlMnNaNaSotGisX1YAz9AVfTgPGpARfLvhyhfYbsmliN5hpjptwLIhk9r5HoMA8pMQbf1u6z258lO8aDFurx+sRSgi/2qVIanhb8+7V+gL9kg4shg9Ux40BSzERu7P28EpmX5YK+Jxpwi5BsY6plqV9YB0k3f6/9KFfmK7WdpAf6gWf7OtFwZAoedXng1+enfVnp55+goqQfc+zBHc6Mr8gJ+eROVztGLO/R7QZ5Ve1NDwTKD1DwtKS9/jTPbAFyhtdCqnpKGByNCIEt9yIDVznYL1HDn80CCE+q46JJh4R1PnmLWbtdFqgftbiXiL+tUjUcXorAdCOkDwi9LXpbatFmqwoH06SAauKclRSm6WNY7MPsypIbeh4uXL2UL3VdTeeHHh3toKZ8tvk6JtZA4enNOK2tagCTipt+W4eTsmog+rFD9GT3MFeuQ9cQcRm+VuM7n+K+x3ZuNh6BxVydGRTamvkQYeqsLyI+9cg6Yz0vj5OqIsenGgUoRmPIGQEt8d8tbEyRZWiSbqsETefaBNzmi5C3QJJ1cTA57HiWb9Kx9yukTE+d1/bhjZKJeUmhklIwf+p8kBgn+97RYTE2AUZaq1UnDOs4ZAkzy0Y9HwKXt43JxQolUqdNf8lJxKPZZliF6lsM+qXvEeR565qpC42bYP/4Z+ZMZ5ORT+u+oUquKFrUGTZm8pCAsossxHAlrXHbgjF+xlqRtB/Cz1mOxH4arcaphXGRwUBw6sWynoxAIhYrp/flDZg7Mqvmb1Wf7leIU9eWu50= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(39860400002)(396003)(346002)(136003)(451199015)(46966006)(36840700001)(40470700004)(5660300002)(82310400005)(83380400001)(4326008)(41300700001)(2906002)(8676002)(52536014)(33656002)(53546011)(81166007)(86362001)(40460700003)(82740400003)(316002)(356005)(110136005)(7696005)(26005)(6506007)(9686003)(966005)(54906003)(186003)(47076005)(478600001)(336012)(55016003)(450100002)(70586007)(70206006)(40480700001)(36860700001)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 21:06:49.0498 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9faeb7e-49d8-4598-05fd-08daa0cc3197 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7516 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 >=20 > Hi, Honnappa >=20 > We discussed the barrier here: > http://patches.dpdk.org/project/dpdk/patch/20210606164948.35997-1- > honnappa.nagarahalli@arm.com/ >=20 > (BTW, it is good practice to keep the reference to previous patch version= s > below Commit Message of the next ones). Apologies, I did not understand this. I would like to fix this if I can und= erstand it better. >=20 > This barrier is not about compiler ordering, it is about external HW agen= t > memory action completions. > So, I'm not sure the rte_atomic_thread_fence() is safe for x86 - patch im= pacts > x86 as well. >=20 > With best regards, > Slava >=20 > > -----Original Message----- > > From: Honnappa Nagarahalli > > Sent: Tuesday, August 30, 2022 23:01 > > To: dev@dpdk.org; honnappa.nagarahalli@arm.com; > ruifeng.wang@arm.com; > > Matan Azrad ; Shahaf Shuler ; > > Slava Ovsiienko > > Cc: nd@arm.com; Matan Azrad ; stable@dpdk.org > > Subject: [PATCH v2] net/mlx5: use just sufficient barrier for Arm > > platforms > > > > cqe->op_own indicates if the CQE is owned by the NIC. The rest of > > the fields in CQE should be read only after op_own is read. On Arm > > platforms using "dmb ishld" is sufficient to enforce this. > > > > Fixes: 88c0733535d6 ("net/mlx5: extend Rx completion with error > > handling") > > Cc: matan@mellanox.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Ruifeng Wang > > --- > > drivers/common/mlx5/mlx5_common.h | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/common/mlx5/mlx5_common.h > > b/drivers/common/mlx5/mlx5_common.h > > index 5028a05b49..ac2e85b15f 100644 > > --- a/drivers/common/mlx5/mlx5_common.h > > +++ b/drivers/common/mlx5/mlx5_common.h > > @@ -195,7 +195,11 @@ check_cqe(volatile struct mlx5_cqe *cqe, const > > uint16_t cqes_n, > > > > if (unlikely((op_owner !=3D (!!(idx))) || (op_code =3D=3D > > MLX5_CQE_INVALID))) > > return MLX5_CQE_STATUS_HW_OWN; > > - rte_io_rmb(); > > + /* Prevent speculative reading of other fields in CQE until > > + * CQE is valid. > > + */ > > + rte_atomic_thread_fence(__ATOMIC_ACQUIRE); > > + > > if (unlikely(op_code =3D=3D MLX5_CQE_RESP_ERR || > > op_code =3D=3D MLX5_CQE_REQ_ERR)) > > return MLX5_CQE_STATUS_ERR; > > -- > > 2.17.1