In order to support RDMA_PS_IB, we need to know the qp type
to associated with the rdma cm id. Receive the qp type from
user space using currently reserved fields. Previous kernels
do not support RDMA_PS_IB, so we only read out the qp type
data if PS_IB has been selected. This avoids issues reading
uninitialized data from existing applications.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
case RDMA_PS_IPOIB:
*qp_type = IB_QPT_UD;
return 0;
+ case RDMA_PS_IB:
+ *qp_type = cmd->qp_type;
+ return 0;
default:
return -EINVAL;
}
__u64 uid;
__u64 response;
__u16 ps;
- __u8 reserved[6];
+ __u8 qp_type;
+ __u8 reserved[5];
};
struct rdma_ucm_create_id_resp {