Lines Matching full:agent
52 #include "agent.h"
383 mad_agent_priv->agent.rmpp_version = rmpp_version; in ib_register_mad_agent()
384 mad_agent_priv->agent.device = device; in ib_register_mad_agent()
385 mad_agent_priv->agent.recv_handler = recv_handler; in ib_register_mad_agent()
386 mad_agent_priv->agent.send_handler = send_handler; in ib_register_mad_agent()
387 mad_agent_priv->agent.context = context; in ib_register_mad_agent()
388 mad_agent_priv->agent.qp = port_priv->qp_info[qpn].qp; in ib_register_mad_agent()
389 mad_agent_priv->agent.port_num = port_num; in ib_register_mad_agent()
390 mad_agent_priv->agent.flags = registration_flags; in ib_register_mad_agent()
402 ret2 = ib_mad_agent_security_setup(&mad_agent_priv->agent, qp_type); in ib_register_mad_agent()
412 ret2 = xa_alloc_cyclic(&ib_mad_clients, &mad_agent_priv->agent.hi_tid, in ib_register_mad_agent()
464 return &mad_agent_priv->agent; in ib_register_mad_agent()
467 xa_erase(&ib_mad_clients, mad_agent_priv->agent.hi_tid); in ib_register_mad_agent()
469 ib_mad_agent_security_cleanup(&mad_agent_priv->agent); in ib_register_mad_agent()
503 xa_erase(&ib_mad_clients, mad_agent_priv->agent.hi_tid); in unregister_mad_agent()
511 ib_mad_agent_security_cleanup(&mad_agent_priv->agent); in unregister_mad_agent()
528 agent); in ib_unregister_mad_agent()
604 struct ib_device *device = mad_agent_priv->agent.device; in handle_outgoing_dr_smp()
618 port_num = mad_agent_priv->agent.port_num; in handle_outgoing_dr_smp()
688 build_smp_wc(mad_agent_priv->agent.qp, in handle_outgoing_dr_smp()
707 mad_agent_priv->agent.recv_handler) { in handle_outgoing_dr_smp()
711 * Reference MAD agent until receive in handle_outgoing_dr_smp()
723 port_priv = ib_get_mad_port(mad_agent_priv->agent.device, in handle_outgoing_dr_smp()
724 mad_agent_priv->agent.port_num); in handle_outgoing_dr_smp()
732 * No receiving agent so drop packet and in handle_outgoing_dr_smp()
753 /* Reference MAD agent until send side of local completion handled */ in handle_outgoing_dr_smp()
817 agent.rmpp_version; in alloc_send_rmpp_list()
827 int ib_mad_kernel_rmpp_agent(const struct ib_mad_agent *agent) in ib_mad_kernel_rmpp_agent() argument
829 return agent->rmpp_version && !(agent->flags & IB_MAD_USER_RMPP); in ib_mad_kernel_rmpp_agent()
847 agent); in ib_create_send_mad()
983 struct ib_mad_agent_private, agent); in ib_free_send_mad()
1091 if (mad_agent_priv->agent.rmpp_version) { in ib_post_send_mad()
1125 /* Reference MAD agent until send completes */ in ib_post_send_mad()
1132 if (ib_mad_kernel_rmpp_agent(&mad_agent_priv->agent)) { in ib_post_send_mad()
1189 if ((*method)->agent[i]) { in method_in_use()
1212 if (method->agent[i]) in check_method_table()
1265 struct ib_mad_agent_private *agent) in remove_methods_mad_agent() argument
1269 /* Remove any methods for this mad agent */ in remove_methods_mad_agent()
1271 if (method->agent[i] == agent) in remove_methods_mad_agent()
1272 method->agent[i] = NULL; in remove_methods_mad_agent()
1313 (*method)->agent[i] = agent_priv; in add_nonoui_reg_req()
1318 /* Remove any methods for this mad agent */ in add_nonoui_reg_req()
1395 dev_err(&agent_priv->agent.device->dev, "All OUI slots in use\n"); in add_oui_reg_req()
1405 (*method)->agent[i] = agent_priv; in add_oui_reg_req()
1410 /* Remove any methods for this mad agent */ in add_oui_reg_req()
1459 /* Remove any methods for this mad agent */ in remove_mad_reg_req()
1496 /* Remove any methods for this mad agent */ in remove_mad_reg_req()
1575 mad_agent = method->agent[mad_hdr->method & in find_mad_agent()
1593 mad_agent = method->agent[mad_hdr->method & in find_mad_agent()
1603 if (mad_agent && !mad_agent->agent.recv_handler) { in find_mad_agent()
1606 &mad_agent->agent, port_priv->port_num); in find_mad_agent()
1655 return !mad_agent_priv->agent.rmpp_version || in is_rmpp_data_mad()
1656 !ib_mad_kernel_rmpp_agent(&mad_agent_priv->agent) || in is_rmpp_data_mad()
1677 struct ib_device *device = mad_agent_priv->agent.device; in rcv_has_same_gid()
1678 u32 port_num = mad_agent_priv->agent.port_num; in rcv_has_same_gid()
1799 if (ib_mad_kernel_rmpp_agent(&mad_agent_priv->agent)) { in ib_mad_complete_recv()
1814 if (!ib_mad_kernel_rmpp_agent(&mad_agent_priv->agent) in ib_mad_complete_recv()
1821 mad_agent_priv->agent.recv_handler( in ib_mad_complete_recv()
1822 &mad_agent_priv->agent, NULL, in ib_mad_complete_recv()
1838 mad_agent_priv->agent.recv_handler( in ib_mad_complete_recv()
1839 &mad_agent_priv->agent, in ib_mad_complete_recv()
1850 mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent, NULL, in ib_mad_complete_recv()
2225 if (ib_mad_kernel_rmpp_agent(&mad_agent_priv->agent)) { in ib_mad_complete_send_wr()
2246 /* Remove send from MAD agent and notify client of completion */ in ib_mad_complete_send_wr()
2256 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, in ib_mad_complete_send_wr()
2259 /* Release reference on agent taken when sending */ in ib_mad_complete_send_wr()
2429 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, in cancel_mads()
2468 struct ib_mad_agent_private, agent); in ib_modify_mad()
2522 dev_err(&mad_agent_priv->agent.device->dev, in local_completions()
2523 "No receive MAD agent for local completion\n"); in local_completions()
2532 build_smp_wc(recv_mad_agent->agent.qp, in local_completions()
2536 recv_mad_agent->agent.port_num, &wc); in local_completions()
2555 recv_mad_agent->agent.recv_handler( in local_completions()
2556 &recv_mad_agent->agent, in local_completions()
2569 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, in local_completions()
2593 if (ib_mad_kernel_rmpp_agent(&mad_send_wr->mad_agent_priv->agent)) { in retry_send()
2661 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, in timeout_sends()