From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB8F6A0540; Sun, 19 Jul 2020 12:11:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C2EBF1C06C; Sun, 19 Jul 2020 12:11:13 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by dpdk.org (Postfix) with ESMTP id AF5911BFC6; Sun, 19 Jul 2020 12:11:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=noUrURsx03OZ+gRmqJnVUlfxHYUXHsD7XNlI/8sSnpQX+Ql8caMkNQLOjOsrh3/N58NUAaR4XHGNkUe4vORiP41TLTQNoZp643wqYz3eK//OTdJRPCIGUONm1RYHPtC4FrKivzPpeveiI/XjTCIjiDXpcHeXadTpvDa6pvyBJJpOXgzNnRU6FNryWGoky/Dny5W5204Qj+HXuAbSWtgVpbU/ab9s5s4sE1xjwFaFwkZk0gq0ncoM7xxUs89x2Q2N7CD+NC0WEeoMTtGHhgJ88T2HX4vim01S6RzCKOBCk0yCT/Lu3aU7gOz3G243hV50sD1Si9qbxbRaKUKX2fGgVQ== 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=d6GerkPNYNzMrTnVNlAmMQroCqHFO3xxM5FQKKovKYk=; b=P5t2yJsPSybBoplSwd7AKmrF/HvbhWncCjKPDlIw+i7fATcUxF60BzSIX0bIs8YmGA/FqO9L5a2BuL5Oggxq1HodDG2lD96AQOK3ZSaNDxnmkhIIrj2Xht+lFAM8EYReMVe+cs3wXV2ubNdklI8hc2CPEaLpI03INE+9gYXIAC94/6lNRLec4MFG2hy0xrrzCduU196wq51LUTR07/4V97COS7e7MUh5T/czXhTqjbp/I20/RZ/sc6ofB/WRVOteYxU9oMzp2wskbWO5We/7IE7tjytk6YRUE55qgLdPc4CK+gLV2X/OGLftdf7hz0cFN8C2sEDLZk/cFYri/LXcUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d6GerkPNYNzMrTnVNlAmMQroCqHFO3xxM5FQKKovKYk=; b=S5MxgES1HInOtyFkWrQ1S6dbFDB7tdJwy+70DhED7+KnfgeWChUVeswLKHlNkqgZIq+UJ7/6fkOBXqqEgFWBVeTU/iv9KomKmnFcGSNX/rk33ixzRWRRWaxrZwqULUCBvk2hS40PBvqi9mX8gw/IQzCusK2u9wYPnj+gCvjBRaM= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (2603:10a6:205:8::26) by AM0PR05MB4850.eurprd05.prod.outlook.com (2603:10a6:208:cb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18; Sun, 19 Jul 2020 10:11:11 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::194e:dc46:7543:50ed]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::194e:dc46:7543:50ed%2]) with mapi id 15.20.3195.023; Sun, 19 Jul 2020 10:11:11 +0000 From: Slava Ovsiienko To: Thomas Monjalon , "dev@dpdk.org" CC: Raslan Darawsheh , Shiri Kuzin , "stable@dpdk.org" , Matan Azrad , Shahaf Shuler , Ray Kinsella , Neil Horman Thread-Topic: [PATCH] common/mlx5: fix CPU detection for PCI relaxed ordering Thread-Index: AQHWXbS73xV1krbT4Ui9CTMi5/6RyakOrkGQ Date: Sun, 19 Jul 2020 10:11:11 +0000 Message-ID: References: <20200719100735.2473014-1-thomas@monjalon.net> In-Reply-To: <20200719100735.2473014-1-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 25f7fbe7-d059-4e2e-080a-08d82bcc102f x-ms-traffictypediagnostic: AM0PR05MB4850: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Shq2tHny/8KVue7LM8mt7Mc/ejDY3/B1APCnNYG8U3fBu+ffJAEDH66lZbe899FjxzbXcxRaUjS76rvAcoRkBpOhH4LFYSNZQCDV3Wxg1FZ9pW420sKmc774bnu3bfmDepnFK+Y4pDGshksV45fFjed33uav13iRJPJWtmkGyer2vurRZkhcaHvR1a0/i0F7ZKHANRzZoJNrdu6nSp7JuAlN8MuklxNFXpb+lbUJaG7FuTBMMGLJy+4I76w9FwUKbkC65JHqS05Hm4tEya3U+uGVDF3cjSdqYrlITpau1za6W3Kk5zhgG3MEcJQWYvgW x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR05MB3265.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(346002)(366004)(376002)(136003)(71200400001)(26005)(186003)(7696005)(9686003)(316002)(86362001)(54906003)(110136005)(2906002)(6506007)(53546011)(83380400001)(8676002)(478600001)(4326008)(55016002)(66946007)(66476007)(66556008)(64756008)(66446008)(8936002)(5660300002)(52536014)(33656002)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: N2qu4WYsdDiJumP6kXYJcMf6Ex2H3n88SFUDid7DfM+Krp6cpZGXCZFXx9A++RGzgTzDtTCBDVIosP/PHwCzPX/4uQ3k5WrZZp3xlUMWriTgCbv/Vb8S2SyTXUBGTqD0JmtYGu7D4ZcuPrrFuApP8d1fubNty1QFMj9FNvw6oTWCoAm9b6ax8wsAX43whkrFfCGbpG4RrVT03fOwzqFTxdCZ+2GNouAPaFgXQn82rQh1XpsFi8oYmglWdcDWuwGz2Vrv1uxDV6WJq7oycvcSjsBJcwn+uRrRZbGyc5WJ6utBePRuKmD5IET0PL5Xu8VVrnk0f9YvAN8v+JXyFh9JRFV1zXNLrP04C+FtTuSHMr2KvBJQlSG3OP/6iLMsjTSwEew3x5T+mEcCYPL4LdgBqoNwEoD1kJdvCqrPBGW/oNAhudy3LtaLBnU3G0PpLDe9Q1yquZkmsddUoy6vY3qmD6lpTGsm1iJiJ5nJXE0Ifcc= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM4PR05MB3265.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25f7fbe7-d059-4e2e-080a-08d82bcc102f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2020 10:11:11.6336 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: v98O9UVWY9uXsSeWZH4V2BCLh+BIx4968A2FjOKf86UffnN/5m02B90RK6f4vCl3ILpNfWDVZ/R9G9k21dd8txJ/Gt6cwiV2o2wYSSlEztM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4850 Subject: Re: [dpdk-dev] [PATCH] common/mlx5: fix CPU detection for PCI relaxed ordering 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Thomas Monjalon > Sent: Sunday, July 19, 2020 13:08 > To: dev@dpdk.org > Cc: Raslan Darawsheh ; Shiri Kuzin > ; stable@dpdk.org; Matan Azrad > ; Shahaf Shuler ; Slava > Ovsiienko ; Ray Kinsella ; > Neil Horman > Subject: [PATCH] common/mlx5: fix CPU detection for PCI relaxed ordering >=20 > The detection of the CPU was done in a constructor and shared in a global > variable. >=20 > This variable may not be visible in the net PMD because it was not export= ed > as part of the .map file. > It is fixed by exporting a function, which is cleaner than a variable. >=20 > By checking the CPU only at the first call of the function, doing the che= ck in a > constructor becomes useless. > Note: the priority of the constructor was probably irrelevant. >=20 > At the same time, the comments are reworded or dropped if useless. >=20 > Fixes: 4c204fe5e5d2 ("common/mlx5: disable relaxed ordering in unsuitable > CPUs") > Cc: shirik@mellanox.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Thomas Monjalon Acked-by: Viacheslav Ovsiienko