Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21925
b: refs/heads/master
c: 5e9f71a
h: refs/heads/master
i:
  21923: 2cdf70a
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Mar 20, 2006
1 parent 41485e1 commit e51838d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f0b67e0d5c2807337b8fee4aa71b05f4f641534
refs/heads/master: 5e9f71a16c56af7e2ff8b7ea251e0fd90b5de560
16 changes: 0 additions & 16 deletions trunk/drivers/infiniband/core/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ ib_get_agent_port(struct ib_device *device, int port_num)
return entry;
}

int smi_check_local_dr_smp(struct ib_smp *smp,
struct ib_device *device,
int port_num)
{
struct ib_agent_port_private *port_priv;

port_priv = ib_get_agent_port(device, port_num);
if (!port_priv) {
printk(KERN_DEBUG SPFX "smi_check_local_dr_smp %s port %d "
"not open\n", device->name, port_num);
return 1;
}

return smi_check_local_smp(port_priv->agent[0], smp);
}

int agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
struct ib_wc *wc, struct ib_device *device,
int port_num, int qpn)
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
goto out;
}
/* Check to post send on QP or process locally */
ret = smi_check_local_dr_smp(smp, device, port_num);
if (!ret || !device->process_mad)
ret = smi_check_local_smp(smp, device);
if (!ret)
goto out;

local = kmalloc(sizeof *local, GFP_ATOMIC);
Expand Down Expand Up @@ -1661,9 +1661,7 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
port_priv->device->node_type,
port_priv->port_num))
goto out;
if (!smi_check_local_dr_smp(&recv->mad.smp,
port_priv->device,
port_priv->port_num))
if (!smi_check_local_smp(&recv->mad.smp, port_priv->device))
goto out;
}

Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/infiniband/core/smi.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,16 @@ extern int smi_check_forward_dr_smp(struct ib_smp *smp);
extern int smi_handle_dr_smp_send(struct ib_smp *smp,
u8 node_type,
int port_num);
extern int smi_check_local_dr_smp(struct ib_smp *smp,
struct ib_device *device,
int port_num);

/*
* Return 1 if the SMP should be handled by the local SMA/SM via process_mad
*/
static inline int smi_check_local_smp(struct ib_mad_agent *mad_agent,
struct ib_smp *smp)
static inline int smi_check_local_smp(struct ib_smp *smp,
struct ib_device *device)
{
/* C14-9:3 -- We're at the end of the DR segment of path */
/* C14-9:4 -- Hop Pointer = Hop Count + 1 -> give to SMA/SM */
return ((mad_agent->device->process_mad &&
return ((device->process_mad &&
!ib_get_smp_direction(smp) &&
(smp->hop_ptr == smp->hop_cnt + 1)));
}
Expand Down

0 comments on commit e51838d

Please sign in to comment.