mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
IB/core: Define 'ib' and 'roce' rdma_ah_attr types
rdma_ah_attr can now be either ib or roce allowing core components to use one type or the other and also to define attributes unique to a specific type. struct ib_ah is also initialized with the type when its first created. This ensures that calls such as modify_ah dont modify the type of the address handle attribute. 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:
parent
d8966fcd4c
commit
44c58487d5
31 changed files with 141 additions and 76 deletions
|
|
@ -80,10 +80,11 @@ 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.type = RDMA_AH_ATTR_TYPE_ROCE;
|
||||
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,
|
||||
memcpy(&qp_attr.ah_attr.roce.dmac, lnk->peer_mac,
|
||||
sizeof(lnk->peer_mac));
|
||||
qp_attr.dest_qp_num = lnk->peer_qpn;
|
||||
qp_attr.rq_psn = lnk->peer_psn; /* starting receive packet seq # */
|
||||
|
|
|
|||
Loading…
Reference in a new issue