[dpdk-dev] [PATCH 3/4] net/mlx5: rework PMD global data init
Shahaf Shuler
shahafs at mellanox.com
Thu Mar 14 13:36:28 CET 2019
Hi Koh,
Thursday, March 7, 2019 9:33 AM, Yongseok Koh:
> Subject: [PATCH 3/4] net/mlx5: rework PMD global data init
>
> There's more need to have PMD global data structure. It 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 init functions
> 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.
It is hard to understand from the commit log what was missing on the old design.
>
> 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.
I thought we agreed to drop those and have different VA for each process.
If so, is the extra work on the UAR here is needed?
>
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> ---
> 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(-)
>
> 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 = RTE_SPINLOCK_INITIALIZER;
>
> +/* Process local data for secondary processes. */ static struct
> +mlx5_local_data mlx5_local_data;
Why not storing this context as part of ethdev-> process_private instead of declaring it static?
> +
> /** Driver-specific log messages type. */ int mlx5_logtype;
>
More information about the dev
mailing list