• Home
  • Raw
  • Download

Lines Matching refs:cm_id

836 static void cm_destroy_id(struct ib_cm_id *cm_id, int err)  in cm_destroy_id()  argument
841 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in cm_destroy_id()
844 switch (cm_id->state) { in cm_destroy_id()
846 cm_id->state = IB_CM_IDLE; in cm_destroy_id()
853 cm_id->state = IB_CM_IDLE; in cm_destroy_id()
864 ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT, in cm_destroy_id()
876 ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED, in cm_destroy_id()
889 ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED, in cm_destroy_id()
896 ib_send_cm_dreq(cm_id, NULL, 0); in cm_destroy_id()
905 ib_send_cm_drep(cm_id, NULL, 0); in cm_destroy_id()
912 cm_free_id(cm_id->local_id); in cm_destroy_id()
922 void ib_destroy_cm_id(struct ib_cm_id *cm_id) in ib_destroy_cm_id() argument
924 cm_destroy_id(cm_id, 0); in ib_destroy_cm_id()
928 int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask, in ib_cm_listen() argument
941 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_cm_listen()
942 if (cm_id->state != IB_CM_IDLE) in ib_cm_listen()
956 cm_id->state = IB_CM_LISTEN; in ib_cm_listen()
960 cm_id->service_id = cpu_to_be64(cm.listen_service_id++); in ib_cm_listen()
961 cm_id->service_mask = ~cpu_to_be64(0); in ib_cm_listen()
963 cm_id->service_id = service_id; in ib_cm_listen()
964 cm_id->service_mask = service_mask; in ib_cm_listen()
970 cm_id->state = IB_CM_IDLE; in ib_cm_listen()
1106 int ib_send_cm_req(struct ib_cm_id *cm_id, in ib_send_cm_req() argument
1119 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_req()
1121 if (cm_id->state != IB_CM_IDLE) { in ib_send_cm_req()
1144 cm_id->service_id = param->service_id; in ib_send_cm_req()
1145 cm_id->service_mask = ~cpu_to_be64(0); in ib_send_cm_req()
1177 BUG_ON(cm_id->state != IB_CM_IDLE); in ib_send_cm_req()
1178 cm_id->state = IB_CM_REQ_SENT; in ib_send_cm_req()
1520 struct ib_cm_id *cm_id; in cm_req_handler() local
1527 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); in cm_req_handler()
1528 if (IS_ERR(cm_id)) in cm_req_handler()
1529 return PTR_ERR(cm_id); in cm_req_handler()
1531 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in cm_req_handler()
1564 ib_send_cm_rej(cm_id, IB_CM_REJ_INVALID_GID, in cm_req_handler()
1572 ib_send_cm_rej(cm_id, IB_CM_REJ_INVALID_ALT_GID, in cm_req_handler()
1601 ib_destroy_cm_id(cm_id); in cm_req_handler()
1635 int ib_send_cm_rep(struct ib_cm_id *cm_id, in ib_send_cm_rep() argument
1648 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_rep()
1650 if (cm_id->state != IB_CM_REQ_RCVD && in ib_send_cm_rep()
1651 cm_id->state != IB_CM_MRA_REQ_SENT) { in ib_send_cm_rep()
1672 cm_id->state = IB_CM_REP_SENT; in ib_send_cm_rep()
1697 int ib_send_cm_rtu(struct ib_cm_id *cm_id, in ib_send_cm_rtu() argument
1714 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_rtu()
1716 if (cm_id->state != IB_CM_REP_RCVD && in ib_send_cm_rtu()
1717 cm_id->state != IB_CM_MRA_REP_SENT) { in ib_send_cm_rtu()
1737 cm_id->state = IB_CM_ESTABLISHED; in ib_send_cm_rtu()
1986 int ib_send_cm_dreq(struct ib_cm_id *cm_id, in ib_send_cm_dreq() argument
1998 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_dreq()
2000 if (cm_id->state != IB_CM_ESTABLISHED) { in ib_send_cm_dreq()
2005 if (cm_id->lap_state == IB_CM_LAP_SENT || in ib_send_cm_dreq()
2006 cm_id->lap_state == IB_CM_MRA_LAP_RCVD) in ib_send_cm_dreq()
2028 cm_id->state = IB_CM_DREQ_SENT; in ib_send_cm_dreq()
2048 int ib_send_cm_drep(struct ib_cm_id *cm_id, in ib_send_cm_drep() argument
2065 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_drep()
2067 if (cm_id->state != IB_CM_DREQ_RCVD) { in ib_send_cm_drep()
2233 int ib_send_cm_rej(struct ib_cm_id *cm_id, in ib_send_cm_rej() argument
2249 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_rej()
2252 switch (cm_id->state) { in ib_send_cm_rej()
2407 int ib_send_cm_mra(struct ib_cm_id *cm_id, in ib_send_cm_mra() argument
2428 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_mra()
2434 lap_state = cm_id->lap_state; in ib_send_cm_mra()
2439 lap_state = cm_id->lap_state; in ib_send_cm_mra()
2443 if (cm_id->lap_state == IB_CM_LAP_RCVD) { in ib_send_cm_mra()
2444 cm_state = cm_id->state; in ib_send_cm_mra()
2467 cm_id->state = cm_state; in ib_send_cm_mra()
2468 cm_id->lap_state = lap_state; in ib_send_cm_mra()
2603 int ib_send_cm_lap(struct ib_cm_id *cm_id, in ib_send_cm_lap() argument
2616 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_lap()
2618 if (cm_id->state != IB_CM_ESTABLISHED || in ib_send_cm_lap()
2619 (cm_id->lap_state != IB_CM_LAP_UNINIT && in ib_send_cm_lap()
2620 cm_id->lap_state != IB_CM_LAP_IDLE)) { in ib_send_cm_lap()
2648 cm_id->lap_state = IB_CM_LAP_SENT; in ib_send_cm_lap()
2776 int ib_send_cm_apr(struct ib_cm_id *cm_id, in ib_send_cm_apr() argument
2792 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_apr()
2794 if (cm_id->state != IB_CM_ESTABLISHED || in ib_send_cm_apr()
2795 (cm_id->lap_state != IB_CM_LAP_RCVD && in ib_send_cm_apr()
2796 cm_id->lap_state != IB_CM_MRA_LAP_SENT)) { in ib_send_cm_apr()
2814 cm_id->lap_state = IB_CM_LAP_IDLE; in ib_send_cm_apr()
2916 int ib_send_cm_sidr_req(struct ib_cm_id *cm_id, in ib_send_cm_sidr_req() argument
2928 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_sidr_req()
2933 cm_id->service_id = param->service_id; in ib_send_cm_sidr_req()
2934 cm_id->service_mask = ~cpu_to_be64(0); in ib_send_cm_sidr_req()
2947 if (cm_id->state == IB_CM_IDLE) in ib_send_cm_sidr_req()
2957 cm_id->state = IB_CM_SIDR_REQ_SENT; in ib_send_cm_sidr_req()
2982 struct ib_cm_id *cm_id; in cm_sidr_req_handler() local
2987 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); in cm_sidr_req_handler()
2988 if (IS_ERR(cm_id)) in cm_sidr_req_handler()
2989 return PTR_ERR(cm_id); in cm_sidr_req_handler()
2990 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in cm_sidr_req_handler()
3014 cur_cm_id_priv = cm_find_listen(cm_id->device, in cm_sidr_req_handler()
3060 int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id, in ib_send_cm_sidr_rep() argument
3073 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_send_cm_sidr_rep()
3075 if (cm_id->state != IB_CM_SIDR_REQ_RCVD) { in ib_send_cm_sidr_rep()
3092 cm_id->state = IB_CM_IDLE; in ib_send_cm_sidr_rep()
3295 static int cm_establish(struct ib_cm_id *cm_id) in cm_establish() argument
3306 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in cm_establish()
3308 switch (cm_id->state) in cm_establish()
3312 cm_id->state = IB_CM_ESTABLISHED; in cm_establish()
3335 work->local_id = cm_id->local_id; in cm_establish()
3336 work->remote_id = cm_id->remote_id; in cm_establish()
3344 static int cm_migrate(struct ib_cm_id *cm_id) in cm_migrate() argument
3350 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in cm_migrate()
3352 if (cm_id->state == IB_CM_ESTABLISHED && in cm_migrate()
3353 (cm_id->lap_state == IB_CM_LAP_UNINIT || in cm_migrate()
3354 cm_id->lap_state == IB_CM_LAP_IDLE)) { in cm_migrate()
3355 cm_id->lap_state = IB_CM_LAP_IDLE; in cm_migrate()
3364 int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event) in ib_cm_notify() argument
3370 ret = cm_establish(cm_id); in ib_cm_notify()
3373 ret = cm_migrate(cm_id); in ib_cm_notify()
3593 int ib_cm_init_qp_attr(struct ib_cm_id *cm_id, in ib_cm_init_qp_attr() argument
3600 cm_id_priv = container_of(cm_id, struct cm_id_private, id); in ib_cm_init_qp_attr()