IB/core: Use rdma_ah_attr accessor functions

Modify core and driver components to use accessor functions
introduced to access individual fields of rdma_ah_attr

Reviewed-by: Ira Weiny <[email protected]>
Reviewed-by: Don Hiatt <[email protected]>
Reviewed-by: Sean Hefty <[email protected]>
Reviewed-by: Niranjana Vishwanathapura <[email protected]>
Signed-off-by: Dasaratharaman Chandramouli <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
Dasaratharaman Chandramouli 2017-04-29 14:41:28 -04:00 • committed by Doug Ledford
commit d8966fcd4c
57 changed files with 1040 additions and 881 deletions

View file

@ -80,11 +80,9 @@ static int smc_ib_modify_qp_rtr(struct smc_link *lnk)
memset(&qp_attr, 0, sizeof(qp_attr));
qp_attr.qp_state = IB_QPS_RTR;
qp_attr.path_mtu = min(lnk->path_mtu, lnk->peer_mtu);
qp_attr.ah_attr.port_num = lnk->ibport;
qp_attr.ah_attr.ah_flags = IB_AH_GRH;
qp_attr.ah_attr.grh.hop_limit = 1;
memcpy(&qp_attr.ah_attr.grh.dgid, lnk->peer_gid,
sizeof(lnk->peer_gid));
rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport);
rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, 0, 1, 0);
rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid);
memcpy(&qp_attr.ah_attr.dmac, lnk->peer_mac,
sizeof(lnk->peer_mac));
qp_attr.dest_qp_num = lnk->peer_qpn;