Lines Matching refs:port

172 	struct cm_port *port[0];
176 struct cm_port *port;
188 struct cm_port *port;
218 /* todo: use alternate port on send failure */
262 mad_agent = cm_id_priv->av.port->mad_agent;
286 static int cm_alloc_response_msg(struct cm_port *port,
293 ah = ib_create_ah_from_wc(port->mad_agent->qp->pd, mad_recv_wc->wc,
294 mad_recv_wc->recv_buf.grh, port->port_num);
298 m = ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index,
343 static void cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc,
346 av->port = port;
348 ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc,
355 struct cm_port *port = NULL;
364 port = cm_dev->port[p-1];
370 if (!port)
373 ret = ib_find_cached_pkey(cm_dev->ib_device, port->port_num,
378 av->port = port;
379 ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
857 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
865 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
886 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
902 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
987 hi_tid = ((u64) cm_id_priv->av.port->mad_agent->hi_tid) << 32;
1054 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
1075 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
1191 static int cm_issue_rej(struct cm_port *port,
1201 ret = cm_alloc_response_msg(port, mad_recv_wc, &msg);
1292 param->port = cm_id_priv->av.port->port_num;
1401 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
1408 ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
1466 cm_issue_rej(work->port, work->mad_recv_wc,
1479 cm_issue_rej(work->port, work->mad_recv_wc,
1530 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL);
1536 cm_init_av_for_response(work->port, work->mad_recv_wc->wc,
1568 ib_get_cached_gid(work->port->cm_dev->ib_device,
1569 work->port->port_num, 0, &work->path[0].sgid);
1621 cm_id_priv->av.port->cm_dev->ack_delay);
1788 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
1790 ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
1863 cm_issue_rej(work->port, work->mad_recv_wc,
1888 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
1921 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
1955 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
1961 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2013 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2101 static int cm_issue_drep(struct cm_port *port,
2109 ret = cm_alloc_response_msg(port, mad_recv_wc, &msg);
2138 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2140 cm_issue_drep(work->port, work->mad_recv_wc);
2153 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2158 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2163 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2165 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
2177 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2223 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2366 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2376 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2386 ib_cancel_mad(cm_id_priv->av.port->mad_agent,
2526 ib_modify_mad(cm_id_priv->av.port->mad_agent,
2533 ib_modify_mad(cm_id_priv->av.port->mad_agent,
2541 ib_modify_mad(cm_id_priv->av.port->mad_agent,
2544 atomic_long_inc(&work->port->
2553 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2602 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
2715 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2717 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
2731 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
2740 cm_init_av_for_response(work->port, work->mad_recv_wc->wc,
2851 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
2982 param->port = work->port->port_num;
2993 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL);
3004 cm_init_av_for_response(work->port, work->mad_recv_wc->wc,
3015 atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES].
3144 ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
3212 struct cm_port *port;
3215 port = mad_agent->context;
3228 &port->counter_group[CM_XMIT].counter[attr_index]);
3231 &port->counter_group[CM_XMIT_RETRIES].
3391 struct cm_port *port = mad_agent->context;
3440 atomic_long_inc(&port->counter_group[CM_RECV].
3453 work->port = port;
3482 qp_attr->port_num = cm_id_priv->av.port->port_num;
3551 qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num;
3609 qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num;
3709 static int cm_create_port_fs(struct cm_port *port)
3713 ret = kobject_init_and_add(&port->port_obj, &cm_port_obj_type,
3714 &port->cm_dev->device->kobj,
3715 "%d", port->port_num);
3717 kfree(port);
3722 ret = kobject_init_and_add(&port->counter_group[i].obj,
3724 &port->port_obj,
3734 kobject_put(&port->counter_group[i].obj);
3735 kobject_put(&port->port_obj);
3740 static void cm_remove_port_fs(struct cm_port *port)
3745 kobject_put(&port->counter_group[i].obj);
3747 kobject_put(&port->port_obj);
3753 struct cm_port *port;
3768 cm_dev = kzalloc(sizeof(*cm_dev) + sizeof(*port) *
3786 port = kzalloc(sizeof *port, GFP_KERNEL);
3787 if (!port)
3790 cm_dev->port[i-1] = port;
3791 port->cm_dev = cm_dev;
3792 port->port_num = i;
3794 ret = cm_create_port_fs(port);
3798 port->mad_agent = ib_register_mad_agent(ib_device, i,
3804 port,
3806 if (IS_ERR(port->mad_agent))
3821 ib_unregister_mad_agent(port->mad_agent);
3823 cm_remove_port_fs(port);
3828 port = cm_dev->port[i-1];
3829 ib_modify_port(ib_device, port->port_num, 0, &port_modify);
3830 ib_unregister_mad_agent(port->mad_agent);
3831 cm_remove_port_fs(port);
3840 struct cm_port *port;
3856 port = cm_dev->port[i-1];
3857 ib_modify_port(ib_device, port->port_num, 0, &port_modify);
3858 ib_unregister_mad_agent(port->mad_agent);
3860 cm_remove_port_fs(port);