Lines Matching full:agent

123 	struct ib_mad_agent    *agent[IB_UMAD_MAX_AGENTS];  member
183 return file->agents_dead ? NULL : file->agent[id]; in __get_agent()
186 static int queue_packet(struct ib_umad_file *file, struct ib_mad_agent *agent, in queue_packet() argument
200 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
221 static void send_handler(struct ib_mad_agent *agent, in send_handler() argument
224 struct ib_umad_file *file = agent->context; in send_handler()
234 if (!queue_packet(file, agent, packet, false)) in send_handler()
240 static void recv_handler(struct ib_mad_agent *agent, in recv_handler() argument
244 struct ib_umad_file *file = agent->context; in recv_handler()
264 if (rdma_cap_opa_mad(agent->device, agent->port_num)) in recv_handler()
278 ret = ib_init_ah_attr_from_wc(agent->device, agent->port_num, in recv_handler()
294 if (queue_packet(file, agent, packet, true)) in recv_handler()
513 struct ib_mad_agent *agent; in ib_umad_write() local
549 agent = __get_agent(file, packet->mad.hdr.id); in ib_umad_write()
550 if (!agent) { in ib_umad_write()
556 ah_attr.type = rdma_ah_find_type(agent->device, in ib_umad_write()
571 ah = rdma_create_user_ah(agent->qp->pd, &ah_attr, NULL); in ib_umad_write()
581 && ib_mad_kernel_rmpp_agent(agent)) { in ib_umad_write()
592 packet->msg = ib_create_send_mad(agent, in ib_umad_write()
630 *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 | in ib_umad_write()
635 if (!ib_mad_kernel_rmpp_agent(agent) in ib_umad_write()
697 struct ib_mad_agent *agent = NULL; in ib_umad_reg_agent() local
752 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent()
757 if (IS_ERR(agent)) { in ib_umad_reg_agent()
758 ret = PTR_ERR(agent); in ib_umad_reg_agent()
759 agent = NULL; in ib_umad_reg_agent()
780 file->agent[agent_id] = agent; in ib_umad_reg_agent()
786 if (ret && agent) in ib_umad_reg_agent()
787 ib_unregister_mad_agent(agent); in ib_umad_reg_agent()
798 struct ib_mad_agent *agent = NULL; in ib_umad_reg_agent2() local
865 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent2()
871 if (IS_ERR(agent)) { in ib_umad_reg_agent2()
872 ret = PTR_ERR(agent); in ib_umad_reg_agent2()
873 agent = NULL; in ib_umad_reg_agent2()
889 file->agent[agent_id] = agent; in ib_umad_reg_agent2()
895 if (ret && agent) in ib_umad_reg_agent2()
896 ib_unregister_mad_agent(agent); in ib_umad_reg_agent2()
906 struct ib_mad_agent *agent = NULL; in ib_umad_unreg_agent() local
924 agent = file->agent[id]; in ib_umad_unreg_agent()
925 file->agent[id] = NULL; in ib_umad_unreg_agent()
930 if (agent) in ib_umad_unreg_agent()
931 ib_unregister_mad_agent(agent); in ib_umad_unreg_agent()
1065 if (file->agent[i]) in ib_umad_close()
1066 ib_unregister_mad_agent(file->agent[i]); in ib_umad_close()
1371 if (file->agent[id]) in ib_umad_kill_port()
1372 ib_unregister_mad_agent(file->agent[id]); in ib_umad_kill_port()