Date: Thu, 16 Nov 2017 15:18:37 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r325896 - in projects/bsd_rdma_4_9/contrib/ofed: include libibumad Message-ID: <201711161518.vAGFIbeq060489@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Nov 16 15:18:36 2017 New Revision: 325896 URL: https://svnweb.freebsd.org/changeset/base/325896 Log: Fix compilation for libsysdecode. Don't install the ib_user_mad.h header file into user-space, because it conflicts with umad.h from libibumad.h when building libsysdecode. Sponsored by: Mellanox Technologies Modified: projects/bsd_rdma_4_9/contrib/ofed/include/Makefile projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.c projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.h Modified: projects/bsd_rdma_4_9/contrib/ofed/include/Makefile ============================================================================== --- projects/bsd_rdma_4_9/contrib/ofed/include/Makefile Thu Nov 16 15:16:53 2017 (r325895) +++ projects/bsd_rdma_4_9/contrib/ofed/include/Makefile Thu Nov 16 15:18:36 2017 (r325896) @@ -44,7 +44,6 @@ ${RDMACM}/rdma_cma_abi.h \ ${RDMACM}/rdma_verbs.h \ ${RDMACM}/rsocket.h \ ${RDMA}/ib_user_cm.h \ -${RDMA}/ib_user_mad.h \ ${RDMA}/ib_user_sa.h \ ${RDMA}/ib_user_verbs.h \ ${RDMA}/rdma_user_cm.h \ Modified: projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.c ============================================================================== --- projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.c Thu Nov 16 15:16:53 2017 (r325895) +++ projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.c Thu Nov 16 15:18:36 2017 (r325896) @@ -46,6 +46,7 @@ #include <dirent.h> #include <ctype.h> #include <inttypes.h> +#include <assert.h> #include <infiniband/umad.h> @@ -63,6 +64,9 @@ typedef struct ib_user_mad_reg_req { uint8_t rmpp_version; } ib_user_mad_reg_req_t; +static_assert(sizeof(struct ib_user_mad_reg_req) == IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT), + "Invalid structure size"); + struct ib_user_mad_reg_req2 { uint32_t id; uint32_t qpn; @@ -75,6 +79,9 @@ struct ib_user_mad_reg_req2 { uint8_t rmpp_version; uint8_t reserved[3]; }; + +static_assert(sizeof(struct ib_user_mad_reg_req2) == IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT2), + "Invalid structure size"); #define IBWARN(fmt, args...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## args) Modified: projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.h ============================================================================== --- projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.h Thu Nov 16 15:16:53 2017 (r325895) +++ projects/bsd_rdma_4_9/contrib/ofed/libibumad/umad.h Thu Nov 16 15:18:36 2017 (r325896) @@ -111,12 +111,12 @@ typedef struct ib_user_mad { #define IB_IOCTL_MAGIC 0x1b -#define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \ - struct ib_user_mad_reg_req) +#define IB_USER_MAD_REGISTER_AGENT \ + _IOWR(IB_IOCTL_MAGIC, 1, uint8_t [28] /* struct ib_user_mad_reg_req */) #define IB_USER_MAD_UNREGISTER_AGENT _IOW(IB_IOCTL_MAGIC, 2, uint32_t) #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3) -#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, \ - struct ib_user_mad_reg_req2) +#define IB_USER_MAD_REGISTER_AGENT2 \ + _IOWR(IB_IOCTL_MAGIC, 4, uint8_t [40] /* struct ib_user_mad_reg_req2 */) #define UMAD_CA_NAME_LEN 20 #define UMAD_CA_MAX_PORTS 10 /* 0 - 9 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711161518.vAGFIbeq060489>