[openib-general] [PATCH] [CM] remove outdated peer-to-peer handling code
Sean Hefty
mshefty at ichips.intel.com
Wed Feb 16 16:09:55 PST 2005
This patch removes commented out and now outdated code for handling
peer-to-peer connection requests.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
Index: infiniband/core/cm.c
===================================================================
--- infiniband/core/cm.c (revision 1808)
+++ infiniband/core/cm.c (working copy)
@@ -985,37 +985,6 @@ static void cm_process_work(struct cm_id
ib_destroy_cm_id(&cm_id_priv->id);
}
-static int cm_peer_req_handler(struct cm_work *work)
-{
- /* todo: fix peer-to-peer
- spin_lock_irqsave(&cm.lock, flags);
- if (cm_is_active_peer(work->port->ca_guid,
- req_msg->local_ca_guid,
- cur_cm_id_priv->local_qpn,
- cm_req_get_local_qpn(req_msg))) {
- spin_unlock_irqrestore(&cm.lock, flags);
- ret = 1;
- goto out;
- }
- atomic_inc(&cur_cm_id_priv->refcount);
- cur_cm_id_priv->id.state = IB_CM_REQ_RCVD;
- rb_erase(&cur_cm_id_priv->service_node, &cm.service_table);
- cur_cm_id_priv->peer_to_peer = 0;
- cur_cm_id_priv->remote_ca_guid = req_msg->local_ca_guid;
- cur_cm_id_priv->id.remote_id = req_msg->local_comm_id;
- cm_insert_remote_id(cur_cm_id_priv);
- spin_unlock_irqrestore(&cm.lock, flags);
-
- ib_cancel_mad(work->port->mad_agent,
- (unsigned long) cur_cm_id_priv->msg);
- ib_destroy_cm_id(&cm_id_priv->id);
- cm_id_priv = cur_cm_id_priv;
-out:
- return ret;
- */
- return -ENOENT; /* Does not match a peer-to-peer request */
-}
-
static int cm_req_handler(struct cm_work *work)
{
struct ib_cm_id *cm_id;
@@ -1026,10 +995,7 @@ static int cm_req_handler(struct cm_work
req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
- /* Check for peer-to-peer connection. */
- ret = cm_peer_req_handler(work);
- if (ret != -ENOENT)
- return ret;
+ /* todo: Check for peer-to-peer connection. */
cm_id = ib_create_cm_id(NULL, NULL);
if (IS_ERR(cm_id))
@@ -1325,14 +1291,7 @@ static int cm_rep_handler(struct cm_work
cm_id_priv->sq_psn = cm_rep_get_starting_psn(rep_msg);
cm_id_priv->rnr_retry_count = cm_rep_get_rnr_retry_count(rep_msg);
- /* todo: handle peer_to_peer
- if (cm_id_priv->peer_to_peer) {
- cm_id_priv->peer_to_peer = 0;
- spin_lock_irqsave(&cm.lock, flags);
- rb_erase(&cm_id_priv->service_node, &cm.service_table);
- spin_unlock_irqrestore(&cm.lock, flags);
- }
- */
+ /* todo: handle peer_to_peer */
wr_id = (unsigned long) cm_id_priv->msg;
ret = atomic_inc_and_test(&cm_id_priv->work_count);
More information about the general
mailing list