Skip to content

Commit

Permalink
Merge pull request #2949 from Artemy-Mellanox/topic/backport
Browse files Browse the repository at this point in the history
Backport build bugs
  • Loading branch information
yosefe authored Oct 14, 2018
2 parents d26386d + d56b499 commit f96c4e1
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions config/m4/ib.m4
Original file line number Diff line number Diff line change
Expand Up @@ -187,29 +187,30 @@ AS_IF([test "x$with_ib" == xyes],
], [with_mlx5_hw=no])
AC_MSG_NOTICE([Checking for DV bare-metal support])
AC_CHECK_HEADERS([infiniband/mlx5dv.h],
[with_mlx5_hw=yes
with_mlx5_dv=yes
mlx5_include=mlx5dv.h
AC_CHECK_LIB([mlx5-rdmav2], [mlx5dv_query_device],
AC_CHECK_LIB([mlx5-rdmav2], [mlx5dv_query_device],
[AC_SUBST(LIB_MLX5, [-lmlx5-rdmav2])],[
AC_CHECK_LIB([mlx5], [mlx5dv_query_device],
AC_CHECK_LIB([mlx5], [mlx5dv_query_device],
[AC_SUBST(LIB_MLX5, [-lmlx5])],
[with_mlx5_dv=no])])])
[with_mlx5_dv=no], [-libverbs])], [-libverbs])
AS_IF([test "x$with_mlx5_dv" != xno], [
AC_CHECK_HEADERS([infiniband/mlx5dv.h],
[with_mlx5_hw=yes
with_mlx5_dv=yes
mlx5_include=mlx5dv.h], [], [ ])])
AS_IF([test "x$has_get_av" == xyes ], [
AS_IF([test "x$with_mlx5_dv" == xyes -a "x$has_get_av" == xyes ], [
AC_CHECK_DECLS([
mlx5dv_init_obj],
[], [], [[#include <infiniband/mlx5dv.h>]])
AC_CHECK_MEMBERS([struct mlx5dv_cq.cq_uar],
[], [], [[#include <infiniband/mlx5dv.h>]])
AC_CHECK_DECLS([ibv_alloc_td],
[has_res_domain=yes], [], [[#include <infiniband/verbs.h>]])
], [with_mlx5_hw=no])])
[], [], [[#include <infiniband/mlx5dv.h>]])])
AC_CHECK_DECLS([ibv_alloc_td],
[has_res_domain=yes], [], [[#include <infiniband/verbs.h>]])])
AS_IF([test "x$has_res_domain" == xyes], [], [
AC_MSG_WARN([Cannot use mlx5 accel because resource domains are not supported])
AC_MSG_WARN([Please upgrade MellanoxOFED to 3.1 or above])
AS_IF([test "x$has_res_domain" == xyes -a "x$has_get_av" == xyes ], [], [
with_mlx5_hw=no])
AS_IF([test "x$with_mlx5_hw" == xyes],
Expand Down

0 comments on commit f96c4e1

Please sign in to comment.