mad_agent 143 drivers/infiniband/core/agent.c static void agent_send_handler(struct ib_mad_agent *mad_agent, mad_agent 213 drivers/infiniband/core/cm.c struct ib_mad_agent *mad_agent; mad_agent 318 drivers/infiniband/core/cm.c struct ib_mad_agent *mad_agent; mad_agent 341 drivers/infiniband/core/cm.c mad_agent = cm_id_priv->av.port->mad_agent; mad_agent 342 drivers/infiniband/core/cm.c if (!mad_agent) { mad_agent 347 drivers/infiniband/core/cm.c ah = rdma_create_ah(mad_agent->qp->pd, &av->ah_attr, 0); mad_agent 353 drivers/infiniband/core/cm.c m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn, mad_agent 380 drivers/infiniband/core/cm.c return ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index, mad_agent 392 drivers/infiniband/core/cm.c ah = ib_create_ah_from_wc(port->mad_agent->qp->pd, mad_recv_wc->wc, mad_agent 1032 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 1046 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 1066 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 1082 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 1256 drivers/infiniband/core/cm.c hi_tid = ((u64) cm_id_priv->av.port->mad_agent->hi_tid) << 32; mad_agent 2366 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2399 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2439 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2493 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2638 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2643 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2713 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2857 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2867 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 2877 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, mad_agent 3024 drivers/infiniband/core/cm.c ib_modify_mad(cm_id_priv->av.port->mad_agent, mad_agent 3031 drivers/infiniband/core/cm.c ib_modify_mad(cm_id_priv->av.port->mad_agent, mad_agent 3039 drivers/infiniband/core/cm.c ib_modify_mad(cm_id_priv->av.port->mad_agent, mad_agent 3409 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 3716 drivers/infiniband/core/cm.c ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); mad_agent 3782 drivers/infiniband/core/cm.c static void cm_send_handler(struct ib_mad_agent *mad_agent, mad_agent 3789 drivers/infiniband/core/cm.c port = mad_agent->context; mad_agent 3989 drivers/infiniband/core/cm.c static void cm_recv_handler(struct ib_mad_agent *mad_agent, mad_agent 3993 drivers/infiniband/core/cm.c struct cm_port *port = mad_agent->context; mad_agent 4363 drivers/infiniband/core/cm.c port->mad_agent = ib_register_mad_agent(ib_device, i, mad_agent 4371 drivers/infiniband/core/cm.c if (IS_ERR(port->mad_agent)) mad_agent 4392 drivers/infiniband/core/cm.c ib_unregister_mad_agent(port->mad_agent); mad_agent 4405 drivers/infiniband/core/cm.c ib_unregister_mad_agent(port->mad_agent); mad_agent 4456 drivers/infiniband/core/cm.c cur_mad_agent = port->mad_agent; mad_agent 4457 drivers/infiniband/core/cm.c port->mad_agent = NULL; mad_agent 677 drivers/infiniband/core/mad.c void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent) mad_agent 683 drivers/infiniband/core/mad.c if (mad_agent->hi_tid) { mad_agent 684 drivers/infiniband/core/mad.c mad_agent_priv = container_of(mad_agent, mad_agent 689 drivers/infiniband/core/mad.c mad_snoop_priv = container_of(mad_agent, mad_agent 1049 drivers/infiniband/core/mad.c struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, mad_agent 1063 drivers/infiniband/core/mad.c mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private, mad_agent 1066 drivers/infiniband/core/mad.c opa = rdma_cap_opa_mad(mad_agent->device, mad_agent->port_num); mad_agent 1076 drivers/infiniband/core/mad.c if (ib_mad_kernel_rmpp_agent(mad_agent)) { mad_agent 1097 drivers/infiniband/core/mad.c mad_send_wr->sg_list[0].lkey = mad_agent->qp->pd->local_dma_lkey; mad_agent 1106 drivers/infiniband/core/mad.c mad_send_wr->sg_list[1].lkey = mad_agent->qp->pd->local_dma_lkey; mad_agent 1127 drivers/infiniband/core/mad.c mad_send_wr->send_buf.mad_agent = mad_agent; mad_agent 1199 drivers/infiniband/core/mad.c mad_agent_priv = container_of(send_buf->mad_agent, mad_agent 1214 drivers/infiniband/core/mad.c struct ib_mad_agent *mad_agent; mad_agent 1225 drivers/infiniband/core/mad.c mad_agent = mad_send_wr->send_buf.mad_agent; mad_agent 1227 drivers/infiniband/core/mad.c sge[0].addr = ib_dma_map_single(mad_agent->device, mad_agent 1231 drivers/infiniband/core/mad.c if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[0].addr))) mad_agent 1236 drivers/infiniband/core/mad.c sge[1].addr = ib_dma_map_single(mad_agent->device, mad_agent 1240 drivers/infiniband/core/mad.c if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[1].addr))) { mad_agent 1241 drivers/infiniband/core/mad.c ib_dma_unmap_single(mad_agent->device, mad_agent 1251 drivers/infiniband/core/mad.c ret = ib_post_send(mad_agent->qp, &mad_send_wr->send_wr.wr, mad_agent 1265 drivers/infiniband/core/mad.c ib_dma_unmap_single(mad_agent->device, mad_agent 1268 drivers/infiniband/core/mad.c ib_dma_unmap_single(mad_agent->device, mad_agent 1300 drivers/infiniband/core/mad.c if (!send_buf->mad_agent->send_handler || mad_agent 1302 drivers/infiniband/core/mad.c !send_buf->mad_agent->recv_handler)) { mad_agent 1410 drivers/infiniband/core/mad.c int ib_process_mad_wc(struct ib_mad_agent *mad_agent, mad_agent 1413 drivers/infiniband/core/mad.c dev_err(&mad_agent->device->dev, mad_agent 1772 drivers/infiniband/core/mad.c struct ib_mad_agent_private *mad_agent = NULL; mad_agent 1784 drivers/infiniband/core/mad.c mad_agent = xa_load(&ib_mad_clients, hi_tid); mad_agent 1785 drivers/infiniband/core/mad.c if (mad_agent && !atomic_inc_not_zero(&mad_agent->refcount)) mad_agent 1786 drivers/infiniband/core/mad.c mad_agent = NULL; mad_agent 1814 drivers/infiniband/core/mad.c mad_agent = method->agent[mad_hdr->method & mad_agent 1832 drivers/infiniband/core/mad.c mad_agent = method->agent[mad_hdr->method & mad_agent 1836 drivers/infiniband/core/mad.c if (mad_agent) mad_agent 1837 drivers/infiniband/core/mad.c atomic_inc(&mad_agent->refcount); mad_agent 1842 drivers/infiniband/core/mad.c if (mad_agent && !mad_agent->agent.recv_handler) { mad_agent 1845 drivers/infiniband/core/mad.c &mad_agent->agent, port_priv->port_num); mad_agent 1846 drivers/infiniband/core/mad.c deref_mad_agent(mad_agent); mad_agent 1847 drivers/infiniband/core/mad.c mad_agent = NULL; mad_agent 1850 drivers/infiniband/core/mad.c return mad_agent; mad_agent 2264 drivers/infiniband/core/mad.c struct ib_mad_agent_private *mad_agent; mad_agent 2365 drivers/infiniband/core/mad.c mad_agent = find_mad_agent(port_priv, (const struct ib_mad_hdr *)recv->mad); mad_agent 2366 drivers/infiniband/core/mad.c if (mad_agent) { mad_agent 2367 drivers/infiniband/core/mad.c trace_ib_mad_recv_done_agent(mad_agent); mad_agent 2368 drivers/infiniband/core/mad.c ib_mad_complete_recv(mad_agent, &recv->header.recv_wc); mad_agent 2536 drivers/infiniband/core/mad.c ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, mad_agent 2539 drivers/infiniband/core/mad.c ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, mad_agent 2701 drivers/infiniband/core/mad.c int ib_modify_mad(struct ib_mad_agent *mad_agent, mad_agent 2709 drivers/infiniband/core/mad.c mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private, mad_agent 2735 drivers/infiniband/core/mad.c void ib_cancel_mad(struct ib_mad_agent *mad_agent, mad_agent 2738 drivers/infiniband/core/mad.c ib_modify_mad(mad_agent, send_buf, 0); mad_agent 972 drivers/infiniband/core/sa_query.c send_handler(query->mad_buf->mad_agent, &mad_send_wc); mad_agent 2193 drivers/infiniband/core/sa_query.c static void recv_handler(struct ib_mad_agent *mad_agent, mad_agent 107 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c struct ib_mad_agent *mad_agent; mad_agent 606 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c static void vema_send(struct ib_mad_agent *mad_agent, mad_agent 623 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c static void vema_recv(struct ib_mad_agent *mad_agent, mad_agent 635 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c port = mad_agent->context; mad_agent 636 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c ah = ib_create_ah_from_wc(mad_agent->qp->pd, mad_wc->wc, mad_agent 637 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c mad_wc->recv_buf.grh, mad_agent->port_num); mad_agent 641 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c rsp = ib_create_send_mad(mad_agent, mad_wc->wc->src_qp, mad_agent 746 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c if (!port || !port->mad_agent) mad_agent 780 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c ah = rdma_create_ah(port->mad_agent->qp->pd, &ah_attr, 0); mad_agent 798 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c send_buf = ib_create_send_mad(port->mad_agent, 1, pkey_idx, 0, mad_agent 899 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c if (!port->mad_agent) mad_agent 908 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c ib_unregister_mad_agent(port->mad_agent); mad_agent 909 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c port->mad_agent = NULL; mad_agent 950 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c port->mad_agent = ib_register_mad_agent(cport->ibdev, i, mad_agent 955 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c if (IS_ERR(port->mad_agent)) { mad_agent 956 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c ret = PTR_ERR(port->mad_agent); mad_agent 957 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c port->mad_agent = NULL; mad_agent 458 drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_mad_send_handler(struct ib_mad_agent *mad_agent, mad_agent 471 drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent, mad_agent 475 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = (struct srpt_port *)mad_agent->context; mad_agent 483 drivers/infiniband/ulp/srpt/ib_srpt.c ah = ib_create_ah_from_wc(mad_agent->qp->pd, mad_wc->wc, mad_agent 484 drivers/infiniband/ulp/srpt/ib_srpt.c mad_wc->recv_buf.grh, mad_agent->port_num); mad_agent 490 drivers/infiniband/ulp/srpt/ib_srpt.c rsp = ib_create_send_mad(mad_agent, mad_wc->wc->src_qp, mad_agent 587 drivers/infiniband/ulp/srpt/ib_srpt.c if (!sport->mad_agent) { mad_agent 594 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = ib_register_mad_agent(sport->sdev->device, mad_agent 601 drivers/infiniband/ulp/srpt/ib_srpt.c if (IS_ERR(sport->mad_agent)) { mad_agent 602 drivers/infiniband/ulp/srpt/ib_srpt.c ret = PTR_ERR(sport->mad_agent); mad_agent 603 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = NULL; mad_agent 640 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->mad_agent) { mad_agent 641 drivers/infiniband/ulp/srpt/ib_srpt.c ib_unregister_mad_agent(sport->mad_agent); mad_agent 642 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = NULL; mad_agent 387 drivers/infiniband/ulp/srpt/ib_srpt.h struct ib_mad_agent *mad_agent; mad_agent 492 include/rdma/ib_mad.h struct ib_mad_agent *mad_agent; mad_agent 558 include/rdma/ib_mad.h typedef void (*ib_mad_send_handler)(struct ib_mad_agent *mad_agent, mad_agent 571 include/rdma/ib_mad.h typedef void (*ib_mad_snoop_handler)(struct ib_mad_agent *mad_agent, mad_agent 587 include/rdma/ib_mad.h typedef void (*ib_mad_recv_handler)(struct ib_mad_agent *mad_agent, mad_agent 760 include/rdma/ib_mad.h void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent); mad_agent 802 include/rdma/ib_mad.h void ib_cancel_mad(struct ib_mad_agent *mad_agent, mad_agent 814 include/rdma/ib_mad.h int ib_modify_mad(struct ib_mad_agent *mad_agent, mad_agent 854 include/rdma/ib_mad.h int ib_process_mad_wc(struct ib_mad_agent *mad_agent, mad_agent 884 include/rdma/ib_mad.h struct ib_mad_send_buf *ib_create_send_mad(struct ib_mad_agent *mad_agent,