Lines Matching refs:id
217 struct ib_cm_id id;
276 m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn,
397 int ret, id;
403 next_id, &id);
405 next_id = ((unsigned) id + 1) & MAX_ID_MASK;
409 cm_id_priv->id.local_id = (__force __be32)id ^ cm.random_id_operand;
428 if (cm_id_priv->id.remote_id == remote_id)
513 __be64 service_id = cm_id_priv->id.service_id;
514 __be64 service_mask = cm_id_priv->id.service_mask;
523 if ((cur_cm_id_priv->id.service_mask & service_id) ==
524 (service_mask & cur_cm_id_priv->id.service_id) &&
525 (cm_id_priv->id.device == cur_cm_id_priv->id.device) &&
529 if (cm_id_priv->id.device < cur_cm_id_priv->id.device)
531 else if (cm_id_priv->id.device > cur_cm_id_priv->id.device)
533 else if (be64_lt(service_id, cur_cm_id_priv->id.service_id))
535 else if (be64_gt(service_id, cur_cm_id_priv->id.service_id))
559 if ((cm_id_priv->id.service_mask & service_id) ==
560 cm_id_priv->id.service_id &&
561 (cm_id_priv->id.device == device) && !data_cmp)
564 if (device < cm_id_priv->id.device)
566 else if (device > cm_id_priv->id.device)
568 else if (be64_lt(service_id, cm_id_priv->id.service_id))
570 else if (be64_gt(service_id, cm_id_priv->id.service_id))
670 __be32 remote_id = cm_id_priv->id.remote_id;
676 if (be32_lt(remote_id, cur_cm_id_priv->id.remote_id))
678 else if (be32_gt(remote_id, cur_cm_id_priv->id.remote_id))
704 ib_send_cm_sidr_rep(&cm_id_priv->id, ¶m);
718 cm_id_priv->id.state = IB_CM_IDLE;
719 cm_id_priv->id.device = device;
720 cm_id_priv->id.cm_handler = cm_handler;
721 cm_id_priv->id.context = context;
722 cm_id_priv->id.remote_cm_qpn = 1;
732 return &cm_id_priv->id;
826 cm_id_priv->id.state = IB_CM_TIMEWAIT;
837 cm_id_priv->id.state = IB_CM_IDLE;
852 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
876 &cm_id_priv->id.device->node_guid,
877 sizeof cm_id_priv->id.device->node_guid,
950 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
994 low_tid = (u64) ((__force u32)cm_id_priv->id.local_id |
1020 req_msg->local_comm_id = cm_id_priv->id.local_id;
1022 req_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
1136 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
1146 id.local_id);
1341 ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, &work->cm_event);
1349 ret = cm_id_priv->id.cm_handler(&cm_id_priv->id,
1355 cm_destroy_id(&cm_id_priv->id, ret);
1365 mra_msg->local_comm_id = cm_id_priv->id.local_id;
1366 mra_msg->remote_comm_id = cm_id_priv->id.remote_id;
1382 rej_msg->remote_comm_id = cm_id_priv->id.remote_id;
1384 switch(cm_id_priv->id.state) {
1390 rej_msg->local_comm_id = cm_id_priv->id.local_id;
1395 rej_msg->local_comm_id = cm_id_priv->id.local_id;
1399 rej_msg->local_comm_id = cm_id_priv->id.local_id;
1424 if (cm_id_priv->id.state == IB_CM_REQ_RCVD)
1432 switch (cm_id_priv->id.state) {
1492 listen_cm_id_priv = cm_find_listen(cm_id_priv->id.device,
1505 cm_id_priv->id.state = IB_CM_REQ_RCVD;
1553 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
1554 cm_id_priv->id.remote_id = req_msg->local_comm_id;
1559 id.local_id);
1575 cm_id_priv->id.cm_handler = listen_cm_id_priv->id.cm_handler;
1576 cm_id_priv->id.context = listen_cm_id_priv->id.context;
1577 cm_id_priv->id.service_id = req_msg->service_id;
1578 cm_id_priv->id.service_mask = ~cpu_to_be64(0);
1621 cm_format_req_event(work, cm_id_priv, &listen_cm_id_priv->id);
1639 rep_msg->local_comm_id = cm_id_priv->id.local_id;
1640 rep_msg->remote_comm_id = cm_id_priv->id.remote_id;
1651 rep_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
1671 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
1713 rtu_msg->local_comm_id = cm_id_priv->id.local_id;
1714 rtu_msg->remote_comm_id = cm_id_priv->id.remote_id;
1737 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
1812 if (cm_id_priv->id.state == IB_CM_ESTABLISHED)
1816 else if (cm_id_priv->id.state == IB_CM_MRA_REP_SENT)
1851 switch (cm_id_priv->id.state) {
1888 cm_id_priv->id.state = IB_CM_REP_RCVD;
1889 cm_id_priv->id.remote_id = rep_msg->local_comm_id;
1933 if (cm_id_priv->id.state != IB_CM_ESTABLISHED) {
1969 if (cm_id_priv->id.state != IB_CM_REP_SENT &&
1970 cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
1976 cm_id_priv->id.state = IB_CM_ESTABLISHED;
2001 dreq_msg->local_comm_id = cm_id_priv->id.local_id;
2002 dreq_msg->remote_comm_id = cm_id_priv->id.remote_id;
2021 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2060 drep_msg->local_comm_id = cm_id_priv->id.local_id;
2061 drep_msg->remote_comm_id = cm_id_priv->id.remote_id;
2084 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2163 switch (cm_id_priv->id.state) {
2192 cm_id_priv->id.state = IB_CM_DREQ_RCVD;
2225 if (cm_id_priv->id.state != IB_CM_DREQ_SENT &&
2226 cm_id_priv->id.state != IB_CM_DREQ_RCVD) {
2264 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2342 if (cm_id_priv->id.remote_id == remote_id)
2370 switch (cm_id_priv->id.state) {
2434 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2437 switch(cm_id_priv->id.state) {
2529 switch (cm_id_priv->id.state) {
2535 cm_id_priv->id.state = IB_CM_MRA_REQ_RCVD;
2542 cm_id_priv->id.state = IB_CM_MRA_REP_RCVD;
2546 cm_id_priv->id.lap_state != IB_CM_LAP_SENT ||
2549 if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
2555 cm_id_priv->id.lap_state = IB_CM_MRA_LAP_RCVD;
2567 cm_id_priv->id.state;
2592 lap_msg->local_comm_id = cm_id_priv->id.local_id;
2593 lap_msg->remote_comm_id = cm_id_priv->id.remote_id;
2628 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2713 if (cm_id_priv->id.state != IB_CM_ESTABLISHED)
2716 switch (cm_id_priv->id.lap_state) {
2744 cm_id_priv->id.lap_state = IB_CM_LAP_RCVD;
2775 apr_msg->local_comm_id = cm_id_priv->id.local_id;
2776 apr_msg->remote_comm_id = cm_id_priv->id.remote_id;
2804 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2850 if (cm_id_priv->id.state != IB_CM_ESTABLISHED ||
2851 (cm_id_priv->id.lap_state != IB_CM_LAP_SENT &&
2852 cm_id_priv->id.lap_state != IB_CM_MRA_LAP_RCVD)) {
2856 cm_id_priv->id.lap_state = IB_CM_LAP_IDLE;
2892 if (cm_id_priv->id.state != IB_CM_TIMEWAIT ||
2897 cm_id_priv->id.state = IB_CM_IDLE;
2919 sidr_req_msg->request_id = cm_id_priv->id.local_id;
2940 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
3008 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
3019 cm_id_priv->id.remote_id = sidr_req_msg->request_id;
3031 cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
3043 cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
3044 cm_id_priv->id.context = cur_cm_id_priv->id.context;
3045 cm_id_priv->id.service_id = sidr_req_msg->service_id;
3046 cm_id_priv->id.service_mask = ~cpu_to_be64(0);
3048 cm_format_sidr_req_event(work, &cur_cm_id_priv->id);
3053 ib_destroy_cm_id(&cm_id_priv->id);
3063 sidr_rep_msg->request_id = cm_id_priv->id.remote_id;
3066 sidr_rep_msg->service_id = cm_id_priv->id.service_id;
3090 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
3150 if (cm_id_priv->id.state != IB_CM_SIDR_REQ_SENT) {
3154 cm_id_priv->id.state = IB_CM_IDLE;
3180 if (msg != cm_id_priv->msg || state != cm_id_priv->id.state)
3199 cm_id_priv->id.state = IB_CM_IDLE;
3209 ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, &cm_event);
3212 ib_destroy_cm_id(&cm_id_priv->id);
3323 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
3367 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
3476 switch (cm_id_priv->id.state) {
3512 switch (cm_id_priv->id.state) {
3558 switch (cm_id_priv->id.state) {
3568 if (cm_id_priv->id.lap_state == IB_CM_LAP_UNINIT) {
3610 cm_id_priv = container_of(cm_id, struct cm_id_private, id);