From owner-svn-src-projects@freebsd.org Thu Nov 16 15:18:38 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D567DE0A56 for ; Thu, 16 Nov 2017 15:18:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 254FA7E499; Thu, 16 Nov 2017 15:18:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAGFIbbR060492; Thu, 16 Nov 2017 15:18:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGFIbeq060489; Thu, 16 Nov 2017 15:18:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711161518.vAGFIbeq060489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Nov 2017 15:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r325896 - in projects/bsd_rdma_4_9/contrib/ofed: include libibumad X-SVN-Group: projects X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in projects/bsd_rdma_4_9/contrib/ofed: include libibumad X-SVN-Commit-Revision: 325896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 15:18:38 -0000 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 #include #include +#include #include @@ -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 */