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>
This commit is contained in:

committed by
Doug Ledford

parent
fcf589364f
commit
090fa24bf2
@@ -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;
|
||||
|
Reference in New Issue
Block a user