From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH 3/4] net/mlx5: rework PMD global data init Date: Mon, 18 Mar 2019 21:21:16 +0000 Message-ID: <20190318212107.GA37866@yongseok-MBP.local> References: <20190307073314.18324-1-yskoh@mellanox.com> <20190307073314.18324-4-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Shahaf Shuler Return-path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50084.outbound.protection.outlook.com [40.107.5.84]) by dpdk.org (Postfix) with ESMTP id 4E49DA3 for ; Mon, 18 Mar 2019 22:21:18 +0100 (CET) In-Reply-To: Content-Language: en-US Content-ID: <411BB5053A6F1749B5C1B944C96F7389@eurprd05.prod.outlook.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Mar 14, 2019 at 05:36:28AM -0700, Shahaf Shuler wrote: > Hi Koh, >=20 > Thursday, March 7, 2019 9:33 AM, Yongseok Koh: > > Subject: [PATCH 3/4] net/mlx5: rework PMD global data init > >=20 > > There's more need to have PMD global data structure. It should be initi= alized > > once per a process regardless of how many PMD instances are probed. > > mlx5_init_once() is called during probing and make sure all the init fu= nctions > > are called once per a process. The existing shared memory gets more > > extensively used for this purpose. As there could be multiple secondary > > processes, a static storage (local to process) is also added. >=20 > It is hard to understand from the commit log what was missing on the old = design.=20 Okay, will add more comments. > > As the reserved virtual address for UAR remap is a PMD global resource,= this > > doesn't need to be stored in the device priv structure, but in the PMD = global > > data. >=20 > I thought we agreed to drop those and have different VA for each process.= =20 > If so, is the extra work on the UAR here is needed?=20 My plan was to do that in a separate patch for performance regression. Let me know if you want it to be done in this patchset. > > Signed-off-by: Yongseok Koh > > --- > > drivers/net/mlx5/mlx5.c | 250 ++++++++++++++++++++++++++++++++-- > > ---------- > > drivers/net/mlx5/mlx5.h | 19 +++- > > drivers/net/mlx5/mlx5_mp.c | 19 +++- > > drivers/net/mlx5/mlx5_txq.c | 7 +- > > 4 files changed, 217 insertions(+), 78 deletions(-) > >=20 > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > > 6ed2418106..ea8fd55ee6 100644 > > --- a/drivers/net/mlx5/mlx5.c > > +++ b/drivers/net/mlx5/mlx5.c > > @@ -128,16 +128,26 @@ struct mlx5_shared_data *mlx5_shared_data; > > /* Spinlock for mlx5_shared_data allocation. */ static rte_spinlock_t > > mlx5_shared_data_lock =3D RTE_SPINLOCK_INITIALIZER; > >=20 > > +/* Process local data for secondary processes. */ static struct > > +mlx5_local_data mlx5_local_data; >=20 > Why not storing this context as part of ethdev-> process_private instead = of declaring it static?=20 Because it is not per-device data but per-PMD data. Will also have to rebase my patchsets when I send out v2. Thanks, Yongseok