[dpdk-dev] [PATCH v1] common/mlx5/linux: replace malloc and free in glue

Raslan Darawsheh rasland at nvidia.com
Sun Nov 1 15:58:19 CET 2020


Hi,

> -----Original Message-----
> From: Ophir Munk <ophirmu at nvidia.com>
> Sent: Tuesday, October 27, 2020 12:17 PM
> To: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>
> Cc: Ophir Munk <ophirmu at nvidia.com>; Matan Azrad <matan at nvidia.com>;
> Slava Ovsiienko <viacheslavo at nvidia.com>; stable at dpdk.org
> Subject: [PATCH v1] common/mlx5/linux: replace malloc and free in glue
> 
> This commit replaces mlx5_malloc and mlx5_free calls with Linux calls
> malloc and free in file mlx5_glue.c.
> The current mlx5_malloc calls have no flags, alignment or socket
> selection, so they are equivalent to calling malloc.  Rdma core itself
> is using malloc.  When using mlx5_malloc the glue library is dependent
> on common_mlx5 library which must be compiled first.  Not doing so and
> in case ibverbs_link=dlopen will result in compilation failure:
> mlx5_glue.c: undefined reference to `mlx5_malloc'.
> To make all of this simpler and remove the common_mlx5 dependency - this
> commit does the alloc/free replacements.
> 
> Fixes: 66914d19d135 ("common/mlx5: convert control path memory to
> unified malloc")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Ophir Munk <ophirmu at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
>  drivers/common/mlx5/linux/mlx5_glue.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list