[openib-general] [PATCH 3/4] IB CM: register and handle COMM_EST events on a QP
Or Gerlitz
ogerlitz at voltaire.com
Sun Jul 23 01:48:20 PDT 2006
Sean Hefty wrote:
> --- core/cm.c (revision 8629)
> +++ core/cm.c (working copy)
> +static void cm_event_handler(struct ib_event *event)
> +{
> + struct cm_id_private *cm_id_priv = NULL;
> + struct cm_timewait_info *timewait_info;
> + unsigned long flags;
> +
> + if (event->event == IB_EVENT_COMM_EST) {
> + spin_lock_irqsave(&cm.lock, flags);
> + timewait_info = cm_find_local_qpn(event->device->node_guid,
> + cpu_to_be32(event->element.
> + qp->qp_num));
> + if (timewait_info)
> + cm_id_priv = cm_get_id(timewait_info->work.local_id,
> + timewait_info->work.remote_id);
> + spin_unlock_irqrestore(&cm.lock, flags);
> + if (cm_id_priv) {
> + ib_cm_establish(&cm_id_priv->id);
> + cm_deref_id(cm_id_priv);
> + }
> + }
> +}
> +
+/**
+ * ib_cm_establish - Forces a connection state to established.
+ * @cm_id: Connection identifier to transition to established.
+ *
+ * This routine should be invoked by users who receive messages on a
+ * connected QP before an RTU has been received.
+ */
+int ib_cm_establish(struct ib_cm_id *cm_id);
Sean,
As with your patch ib_cm_establish is now called internally from within
the CM with the suggested solution good for both user and kernel space
connections/qps, how about removing it from the API?
Or.
Or.
More information about the general
mailing list