2 * QEMU paravirtual RDMA - rdmacm-mux declarations
4 * Copyright (C) 2018 Oracle
5 * Copyright (C) 2018 Red Hat Inc
8 * Yuval Shaia <yuval.shaia@oracle.com>
9 * Marcel Apfelbaum <marcel@redhat.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
20 #include "infiniband/verbs.h"
21 #include "infiniband/umad.h"
22 #include "rdma/rdma_user_cm.h"
24 typedef enum RdmaCmMuxMsgType
{
25 RDMACM_MUX_MSG_TYPE_REQ
= 0,
26 RDMACM_MUX_MSG_TYPE_RESP
= 1,
29 typedef enum RdmaCmMuxOpCode
{
30 RDMACM_MUX_OP_CODE_REG
= 0,
31 RDMACM_MUX_OP_CODE_UNREG
= 1,
32 RDMACM_MUX_OP_CODE_MAD
= 2,
35 typedef enum RdmaCmMuxErrCode
{
36 RDMACM_MUX_ERR_CODE_OK
= 0,
37 RDMACM_MUX_ERR_CODE_EINVAL
= 1,
38 RDMACM_MUX_ERR_CODE_EEXIST
= 2,
39 RDMACM_MUX_ERR_CODE_EACCES
= 3,
40 RDMACM_MUX_ERR_CODE_ENOTFOUND
= 4,
43 typedef struct RdmaCmMuxHdr
{
44 RdmaCmMuxMsgType msg_type
;
45 RdmaCmMuxOpCode op_code
;
47 RdmaCmMuxErrCode err_code
;
50 typedef struct RdmaCmUMad
{
51 struct ib_user_mad hdr
;
52 char mad
[RDMA_MAX_PRIVATE_DATA
];
55 typedef struct RdmaCmMuxMsg
{