• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/ofed/drivers/infiniband/core/

Lines Matching refs:cm_id

69 	struct iwcm_id_private *cm_id;
79 * elements. The design pre-allocates them based on the cm_id type:
89 * One exception is when creating the cm_id for incoming connection requests.
91 * 1) in the event upcall, cm_event_handler(), for a listening cm_id. If
96 * If work elements cannot be allocated for the new connect request cm_id,
115 list_add(&work->free_list, &work->cm_id->work_free_list);
137 work->cm_id = cm_id_priv;
167 * Release a reference on cm_id. If the last reference is being
168 * released, free the cm_id and return 1.
182 static void add_ref(struct iw_cm_id *cm_id)
185 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
189 static void rem_ref(struct iw_cm_id *cm_id)
193 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
198 static int cm_event_handler(struct iw_cm_id *cm_id, struct iw_cm_event *event);
265 int iw_cm_disconnect(struct iw_cm_id *cm_id, int abrupt)
272 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
332 static void destroy_cm_id(struct iw_cm_id *cm_id)
337 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
346 * Since we're deleting the cm_id, drop any events that
357 cm_id->device->iwcm->destroy_listen(cm_id);
380 cm_id->device->iwcm->reject(cm_id, NULL, 0);
401 * references to be released on the cm_id and then kfree the cm_id
404 void iw_destroy_cm_id(struct iw_cm_id *cm_id)
408 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
409 destroy_cm_id(cm_id);
415 * @cm_id: connection manager pointer
424 static int iw_cm_map(struct iw_cm_id *cm_id, bool active)
426 cm_id->m_local_addr = cm_id->local_addr;
427 cm_id->m_remote_addr = cm_id->remote_addr;
438 int iw_cm_listen(struct iw_cm_id *cm_id, int backlog)
444 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
458 ret = iw_cm_map(cm_id, false);
460 ret = cm_id->device->iwcm->create_listen(cm_id, backlog);
479 int iw_cm_reject(struct iw_cm_id *cm_id,
487 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
500 ret = cm_id->device->iwcm->reject(cm_id, private_data,
517 int iw_cm_accept(struct iw_cm_id *cm_id,
525 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
536 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn);
543 cm_id->device->iwcm->add_ref(qp);
547 ret = cm_id->device->iwcm->accept(cm_id, iw_param);
554 cm_id->device->iwcm->rem_ref(qp);
573 int iw_cm_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
580 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
595 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn);
600 cm_id->device->iwcm->add_ref(qp);
605 ret = iw_cm_map(cm_id, true);
607 ret = cm_id->device->iwcm->connect(cm_id, iw_param);
613 cm_id->device->iwcm->rem_ref(qp);
644 struct iw_cm_id *cm_id;
654 cm_id = iw_create_cm_id(listen_id_priv->id.device,
657 /* If the cm_id could not be created, ignore the request */
658 if (IS_ERR(cm_id))
661 cm_id->provider_data = iw_event->provider_data;
662 cm_id->m_local_addr = iw_event->local_addr;
663 cm_id->m_remote_addr = iw_event->remote_addr;
664 cm_id->local_addr = listen_id_priv->id.local_addr;
665 cm_id->remote_addr = iw_event->remote_addr;
666 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
676 iw_cm_reject(cm_id, NULL, 0);
677 iw_destroy_cm_id(cm_id);
684 iw_cm_reject(cm_id, NULL, 0);
685 iw_destroy_cm_id(cm_id);
690 ret = cm_id->cm_handler(cm_id, iw_event);
692 iw_cm_reject(cm_id, NULL, 0);
693 iw_destroy_cm_id(cm_id);
803 * If in some other state, the cm_id was destroyed asynchronously.
865 * Process events on the work_list for the cm_id. If the callback
866 * function requests that the cm_id be deleted, a flag is set in the
867 * cm_id flags to indicate that when the last reference is
868 * removed, the cm_id is to be destroyed. This is necessary to
877 struct iwcm_id_private *cm_id_priv = work->cm_id;
915 * Each event holds a reference on the cm_id. Until the last posted
916 * event has been delivered and processed, the cm_id cannot be
923 static int cm_event_handler(struct iw_cm_id *cm_id,
931 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
941 work->cm_id = cm_id_priv;
1015 int iw_cm_init_qp_attr(struct iw_cm_id *cm_id,
1022 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);