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
This commit is contained in:
Hans Petter Selasky 2017-11-16 15:18:36 +00:00
parent f04e941e25
commit 7093892ca0
3 changed files with 11 additions and 5 deletions

View File

@ -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 \

View File

@ -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;
@ -76,6 +80,9 @@ struct ib_user_mad_reg_req2 {
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)
#define TRACE if (umaddebug) IBWARN

View File

@ -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 */