From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30060.outbound.protection.outlook.com [40.107.3.60]) by dpdk.org (Postfix) with ESMTP id 7A1B84C91 for ; Tue, 26 Mar 2019 13:38:02 +0100 (CET) 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=Ahu9rU1OFfpAu93PlC7yY8Zp3roVIOoum4JIdA/numc=; b=B0wX071OJDx+1PLGJXWKu84dPrp8EeUVGtR4dxurSc0VfuLQ1EtWOmjXtZQv6GahnsyCFIFsjglVMuymU7MQ0XZQ1QinrrJ6+7z0m30QExTAz24n9eEtDh3su32WOtPN97ewAhnNadapuQRgflQXZhui0e5K3XgMwUMyUbJIXrI= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3668.eurprd05.prod.outlook.com (52.133.44.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Tue, 26 Mar 2019 12:38:01 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003%2]) with mapi id 15.20.1750.014; Tue, 26 Mar 2019 12:38:01 +0000 From: Shahaf Shuler To: Yongseok Koh CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init Thread-Index: AQHU4z81aSTlzKiElEa01BI3srcELKYd2tqw Date: Tue, 26 Mar 2019 12:38:00 +0000 Message-ID: References: <20190307073314.18324-1-yskoh@mellanox.com> <20190325191545.20707-1-yskoh@mellanox.com> <20190325191545.20707-4-yskoh@mellanox.com> In-Reply-To: <20190325191545.20707-4-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8a99b053-e5d3-4356-c633-08d6b1e7e24b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3668; x-ms-traffictypediagnostic: AM0PR0502MB3668: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39860400002)(376002)(136003)(199004)(189003)(3846002)(71200400001)(71190400001)(76176011)(4326008)(6506007)(26005)(446003)(11346002)(97736004)(81156014)(68736007)(6636002)(486006)(86362001)(229853002)(478600001)(476003)(6862004)(6116002)(102836004)(81166006)(6436002)(52536014)(316002)(5660300002)(186003)(14454004)(8676002)(256004)(9686003)(7696005)(2906002)(74316002)(105586002)(66066001)(53936002)(8936002)(25786009)(305945005)(7736002)(55016002)(33656002)(99286004)(6246003)(106356001)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3668; H:AM0PR0502MB3795.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jNDneGrTSPflTgIs8Tj05YMbjUXVR0UkYcT9FC/Ls51eRtDXbpS7XQ3so0K4AAqNxhk2KEa87FKDWDea2o1G3ZW8eHa2B3N0cRuunzlG2bHTgkac3Od4fKhAZGcc4WdfEabOiOwz1eTkOJmw8x+MEBC5+tFJK0RdA+yt8pUaG3ZKR88TIOFgBoWpQvVPpkQa9lKBKB9CY4lgkrIfn0hGGCmrBf6NopAaHK0C8yh6aypMOIxiI7nKqKzdT4q2jkEjCrg8y3xrMNrcJ7U3pYNvKEwe14jqeDyrY2kHI/fYlTjoh637pHeoY1/93MH4behc/rSlaqyovC5VUeJnTtAJPVGc+nR7EL07nOiRA+/FV8MyvY5SrKiaHnsMccAXM0Xw74TE5RX057Y25N+DYxKZ0Mf+14ATT0zeTZIi1FBMYDY= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a99b053-e5d3-4356-c633-08d6b1e7e24b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:38:00.9791 (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-Transport-CrossTenantHeadersStamped: AM0PR0502MB3668 Subject: Re: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init 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: Tue, 26 Mar 2019 12:38:02 -0000 Monday, March 25, 2019 9:16 PM, Yongseok Koh: > Subject: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init >=20 > There's more need to have PMD global data structure. This should be > initialized once per a process regardless of how many PMD instances are > probed. mlx5_init_once() is called during probing and make sure all the i= nit > functions are called once per a process. Currently, such global data and = its > initialization functions are even scattered. Rather than 'extern'-ing suc= h > variables and calling such functions one by one making sure it is called = only > once by checking the validity of such variables, it will be better to hav= e a > global storage to hold such data and a consolidated function having all t= he > initializations. The existing shared memory gets more extensively used fo= r > this purpose. As there could be multiple secondary processes, a static > storage (local to process) is also added. >=20 > As the reserved virtual address for UAR remap is a PMD global resource, t= his > doesn't need to be stored in the device priv structure, but in the PMD gl= obal > data. >=20 > Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 47228A05D3 for ; Tue, 26 Mar 2019 13:38:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 715964C93; Tue, 26 Mar 2019 13:38:03 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30060.outbound.protection.outlook.com [40.107.3.60]) by dpdk.org (Postfix) with ESMTP id 7A1B84C91 for ; Tue, 26 Mar 2019 13:38:02 +0100 (CET) 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=Ahu9rU1OFfpAu93PlC7yY8Zp3roVIOoum4JIdA/numc=; b=B0wX071OJDx+1PLGJXWKu84dPrp8EeUVGtR4dxurSc0VfuLQ1EtWOmjXtZQv6GahnsyCFIFsjglVMuymU7MQ0XZQ1QinrrJ6+7z0m30QExTAz24n9eEtDh3su32WOtPN97ewAhnNadapuQRgflQXZhui0e5K3XgMwUMyUbJIXrI= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3668.eurprd05.prod.outlook.com (52.133.44.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Tue, 26 Mar 2019 12:38:01 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003%2]) with mapi id 15.20.1750.014; Tue, 26 Mar 2019 12:38:01 +0000 From: Shahaf Shuler To: Yongseok Koh CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init Thread-Index: AQHU4z81aSTlzKiElEa01BI3srcELKYd2tqw Date: Tue, 26 Mar 2019 12:38:00 +0000 Message-ID: References: <20190307073314.18324-1-yskoh@mellanox.com> <20190325191545.20707-1-yskoh@mellanox.com> <20190325191545.20707-4-yskoh@mellanox.com> In-Reply-To: <20190325191545.20707-4-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8a99b053-e5d3-4356-c633-08d6b1e7e24b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3668; x-ms-traffictypediagnostic: AM0PR0502MB3668: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39860400002)(376002)(136003)(199004)(189003)(3846002)(71200400001)(71190400001)(76176011)(4326008)(6506007)(26005)(446003)(11346002)(97736004)(81156014)(68736007)(6636002)(486006)(86362001)(229853002)(478600001)(476003)(6862004)(6116002)(102836004)(81166006)(6436002)(52536014)(316002)(5660300002)(186003)(14454004)(8676002)(256004)(9686003)(7696005)(2906002)(74316002)(105586002)(66066001)(53936002)(8936002)(25786009)(305945005)(7736002)(55016002)(33656002)(99286004)(6246003)(106356001)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3668; H:AM0PR0502MB3795.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jNDneGrTSPflTgIs8Tj05YMbjUXVR0UkYcT9FC/Ls51eRtDXbpS7XQ3so0K4AAqNxhk2KEa87FKDWDea2o1G3ZW8eHa2B3N0cRuunzlG2bHTgkac3Od4fKhAZGcc4WdfEabOiOwz1eTkOJmw8x+MEBC5+tFJK0RdA+yt8pUaG3ZKR88TIOFgBoWpQvVPpkQa9lKBKB9CY4lgkrIfn0hGGCmrBf6NopAaHK0C8yh6aypMOIxiI7nKqKzdT4q2jkEjCrg8y3xrMNrcJ7U3pYNvKEwe14jqeDyrY2kHI/fYlTjoh637pHeoY1/93MH4behc/rSlaqyovC5VUeJnTtAJPVGc+nR7EL07nOiRA+/FV8MyvY5SrKiaHnsMccAXM0Xw74TE5RX057Y25N+DYxKZ0Mf+14ATT0zeTZIi1FBMYDY= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a99b053-e5d3-4356-c633-08d6b1e7e24b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:38:00.9791 (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-Transport-CrossTenantHeadersStamped: AM0PR0502MB3668 Subject: Re: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init 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" Message-ID: <20190326123800.06kJ-tZc7t0grdscAoFRbtpQt0fw0z4EVetRx9ntZ6c@z> Monday, March 25, 2019 9:16 PM, Yongseok Koh: > Subject: [dpdk-dev] [PATCH v2 3/4] net/mlx5: rework PMD global data init >=20 > There's more need to have PMD global data structure. This should be > initialized once per a process regardless of how many PMD instances are > probed. mlx5_init_once() is called during probing and make sure all the i= nit > functions are called once per a process. Currently, such global data and = its > initialization functions are even scattered. Rather than 'extern'-ing suc= h > variables and calling such functions one by one making sure it is called = only > once by checking the validity of such variables, it will be better to hav= e a > global storage to hold such data and a consolidated function having all t= he > initializations. The existing shared memory gets more extensively used fo= r > this purpose. As there could be multiple secondary processes, a static > storage (local to process) is also added. >=20 > As the reserved virtual address for UAR remap is a PMD global resource, t= his > doesn't need to be stored in the device priv structure, but in the PMD gl= obal > data. >=20 > Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler