[dpdk-dev] [PATCH] common/mlx5: fix mlx5 build

Raslan Darawsheh rasland at mellanox.com
Sun Jul 19 17:17:14 CEST 2020


Hi,

> -----Original Message-----
> From: Ali Alnubani <alialnu at mellanox.com>
> Sent: Sunday, July 19, 2020 2:52 PM
> To: dev at dpdk.org
> Cc: Suanming Mou <suanmingm at mellanox.com>; Raslan Darawsheh
> <rasland at mellanox.com>
> Subject: [PATCH] common/mlx5: fix mlx5 build
> 
> This fixes the following build errors by adding 2
> missing header includes:
> 
> ```
> drivers/common/mlx5/linux/mlx5_glue.c: In function
>     'mlx5_glue_destroy_flow_action':
> drivers/common/mlx5/linux/mlx5_glue.c:187:2: error: implicit declaration
>     of function 'mlx5_free' [-Werror=implicit-function-declaration]
>   mlx5_free(action);
>   ^
> ...
> drivers/common/mlx5/linux/mlx5_glue.c:620:46: error: 'SOCKET_ID_ANY'
>     undeclared (first use in this function)
>   action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
> ...
> ```
> 
> The build error reproduces on Ubuntu 16.04 with rdma-core version v22.1
> and
> with gcc version 5.4.0.
> 
> Fixes: 0e25e18bfba9 ("common/mlx5: convert control path memory to
> unified malloc")
> Cc: suanmingm at mellanox.com
> 
> Signed-off-by: Ali Alnubani <alialnu at mellanox.com>
> Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
> ---
>  drivers/common/mlx5/linux/mlx5_glue.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/common/mlx5/linux/mlx5_glue.c
> b/drivers/common/mlx5/linux/mlx5_glue.c
> index ea9c86b3a..fcf03e867 100644
> --- a/drivers/common/mlx5/linux/mlx5_glue.c
> +++ b/drivers/common/mlx5/linux/mlx5_glue.c
> @@ -8,6 +8,7 @@
>  #include <stddef.h>
>  #include <stdint.h>
>  #include <stdlib.h>
> +#include <rte_memory.h>
>  /*
>   * Not needed by this file; included to work around the lack of off_t
>   * definition for mlx5dv.h with unpatched rdma-core versions.
> @@ -15,6 +16,7 @@
>  #include <sys/types.h>
> 
>  #include "mlx5_glue.h"
> +#include "../mlx5_malloc.h"
> 
>  static int
>  mlx5_glue_fork_init(void)
> --
> 2.27.0


Patch squashed into relevant commit in master-net-mlx,

Kindest regards,
Raslan Darawsheh



More information about the dev mailing list