aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srpt/ib_srpt.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-01-16 16:14:16 -0800
committerDoug Ledford <dledford@redhat.com>2018-01-18 14:49:27 -0500
commit090fa24bf239ce1ec58f2b90c5ba54feca456cb0 (patch)
treea97b98b73e7f8a879bcaa838f02d38301a1441cb /drivers/infiniband/ulp/srpt/ib_srpt.h
parentIB/srpt: Don't allow reordering of commands on wait list (diff)
downloadlinux-dev-090fa24bf239ce1ec58f2b90c5ba54feca456cb0.tar.xz
linux-dev-090fa24bf239ce1ec58f2b90c5ba54feca456cb0.zip
IB/srpt: Preparations for adding RDMA/CM support
Introduce a union in struct srpt_rdma_ch for member variables that depend on the type of connection manager. Avoid that error messages report the IB/CM ID. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srpt/ib_srpt.h')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h
index 10f9b2667ef2..4d9199fd00dc 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.h
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.h
@@ -243,8 +243,8 @@ enum rdma_ch_state {
/**
* struct srpt_rdma_ch - RDMA channel
* @nexus: I_T nexus this channel is associated with.
- * @cm_id: IB CM ID associated with the channel.
* @qp: IB queue pair used for communicating over this channel.
+ * @cm_id: IB CM ID associated with the channel.
* @cq: IB completion queue for this channel.
* @zw_cqe: Zero-length write CQE.
* @rcu: RCU head.
@@ -275,8 +275,12 @@ enum rdma_ch_state {
*/
struct srpt_rdma_ch {
struct srpt_nexus *nexus;
- struct ib_cm_id *cm_id;
struct ib_qp *qp;
+ union {
+ struct {
+ struct ib_cm_id *cm_id;
+ } ib_cm;
+ };
struct ib_cq *cq;
struct ib_cqe zw_cqe;
struct rcu_head rcu;