Lines Matching defs:agent
43 #include "agent.h"
286 mad_agent_priv->agent.mr = ib_get_dma_mr(port_priv->qp_info[qpn].qp->pd,
288 if (IS_ERR(mad_agent_priv->agent.mr)) {
304 mad_agent_priv->agent.rmpp_version = rmpp_version;
305 mad_agent_priv->agent.device = device;
306 mad_agent_priv->agent.recv_handler = recv_handler;
307 mad_agent_priv->agent.send_handler = send_handler;
308 mad_agent_priv->agent.context = context;
309 mad_agent_priv->agent.qp = port_priv->qp_info[qpn].qp;
310 mad_agent_priv->agent.port_num = port_num;
323 mad_agent_priv->agent.hi_tid = ++ib_mad_client_id;
366 /* Add mad agent into port's agent list */
370 return &mad_agent_priv->agent;
376 ib_dereg_mr(mad_agent_priv->agent.mr);
472 mad_snoop_priv->agent.device = device;
473 mad_snoop_priv->agent.recv_handler = recv_handler;
474 mad_snoop_priv->agent.snoop_handler = snoop_handler;
475 mad_snoop_priv->agent.context = context;
476 mad_snoop_priv->agent.qp = port_priv->qp_info[qpn].qp;
477 mad_snoop_priv->agent.port_num = port_num;
489 return &mad_snoop_priv->agent;
537 ib_dereg_mr(mad_agent_priv->agent.mr);
566 /* If the TID is zero, the agent can only snoop. */
570 agent);
575 agent);
613 mad_snoop_priv->agent.snoop_handler(&mad_snoop_priv->agent,
638 mad_snoop_priv->agent.recv_handler(&mad_snoop_priv->agent,
679 struct ib_device *device = mad_agent_priv->agent.device;
688 port_num = mad_agent_priv->agent.port_num;
726 build_smp_wc(mad_agent_priv->agent.qp,
739 mad_agent_priv->agent.recv_handler) {
743 * Reference MAD agent until receive
755 port_priv = ib_get_mad_port(mad_agent_priv->agent.device,
756 mad_agent_priv->agent.port_num);
764 * No receiving agent so drop packet and
781 /* Reference MAD agent until send side of local completion handled */
847 agent.rmpp_version;
869 agent);
986 struct ib_mad_agent_private, agent);
1080 if (mad_agent_priv->agent.rmpp_version) {
1114 /* Reference MAD agent until send completes */
1121 if (mad_agent_priv->agent.rmpp_version) {
1196 if ((*method)->agent[i]) {
1225 if (method->agent[i])
1278 struct ib_mad_agent_private *agent)
1282 /* Remove any methods for this mad agent */
1284 if (method->agent[i] == agent) {
1285 method->agent[i] = NULL;
1330 (*method)->agent[i] = agent_priv;
1335 /* Remove any methods for this mad agent */
1425 (*method)->agent[i] = agent_priv;
1430 /* Remove any methods for this mad agent */
1480 /* Remove any methods for this mad agent */
1517 /* Remove any methods for this mad agent */
1568 if (entry->agent.hi_tid == hi_tid) {
1595 mad_agent = method->agent[mad->mad_hdr.method &
1613 mad_agent = method->agent[mad->mad_hdr.method &
1620 if (mad_agent->agent.recv_handler)
1625 &mad_agent->agent, port_priv->port_num);
1667 return !mad_agent_priv->agent.rmpp_version ||
1687 struct ib_device *device = mad_agent_priv->agent.device;
1688 u8 port_num = mad_agent_priv->agent.port_num;
1795 if (mad_agent_priv->agent.rmpp_version) {
1819 mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
1828 mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
2047 if (mad_agent_priv->agent.rmpp_version) {
2068 /* Remove send from MAD agent and notify client of completion */
2078 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
2081 /* Release reference on agent taken when sending */
2280 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
2316 agent);
2372 printk(KERN_ERR PFX "No receive MAD agent for local completion\n");
2381 build_smp_wc(recv_mad_agent->agent.qp,
2384 0, recv_mad_agent->agent.port_num, &wc);
2399 recv_mad_agent->agent.recv_handler(
2400 &recv_mad_agent->agent,
2416 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
2440 if (mad_send_wr->mad_agent_priv->agent.rmpp_version) {
2503 mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,