RE: [openib-general] agent_mad_send

2004-10-28 Thread Tziporet Koren
Title: RE: [openib-general] agent_mad_send





The reason for this is that for special QPs the driver insert the AV to the packet and not the HW.
In regular QP the HW reads the AV only when is actually doing the send and thus you have to wait 
and not destroy the AV till the send completes.


Tziporet


-Original Message-
From: Roland Dreier [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 27, 2004 6:18 AM
To: Sean Hefty
Cc: [EMAIL PROTECTED]
Subject: Re: [openib-general] agent_mad_send



    Sean> In agent_mad_send, a call is made to create an address
    Sean> handle.  Immediately after calling ib_post_send_mad, the
    Sean> address handle is destroyed.  I think that we want to wait
    Sean> until the send is completed before destroying the address
    Sean> handle, and require this of all callers of ib_post_send_mad.


Yes, that's correct.  Because of a quirk in the way Mellanox HCA's
implement special QPs, it's actually OK to destroy the AH immediately
after posting the send, but for an ordinary QP this will lead to some
bizarre problems.


 - R.
___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general


To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Re: [openib-general] agent_mad_send

2004-10-27 Thread Hal Rosenstock
On Wed, 2004-10-27 at 12:47, Sean Hefty wrote:
> > I can post a patch for this but this depends on whether the agent or MAD
> > layer should destroy the AH.
> 
> I think that the MAD agent should, since it allocated the AH.

That's what I thought but didn't want to post a patch and find out
otherwise.

-- Hal

___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] agent_mad_send

2004-10-27 Thread Sean Hefty
On Wed, 27 Oct 2004 09:47:25 -0400
Hal Rosenstock <[EMAIL PROTECTED]> wrote:

> On Tue, 2004-10-26 at 18:29, Sean Hefty wrote:
> > In agent_mad_send, a call is made to create an address handle.  
> > Immediately after calling ib_post_send_mad, the address handle is destroyed.  
> > I think that we want to wait until the send is completed before destroying 
> > the address handle, and require this of all callers of ib_post_send_mad.
> 
> I can post a patch for this but this depends on whether the agent or MAD
> layer should destroy the AH.

I think that the MAD agent should, since it allocated the AH.
 
> > Also, I don't think that we want to have this code access the port_priv 
> > structure, such as the send_list_lock (which ends up being acquired twice).
> 
> The agent is using a different port_priv structure and send_list_lock
> than the one the MAD layer uses. Where is it acquired twice ?

My bad.  I was working off of the variable names, and didn't check that they had 
different types.

- Sean

-- 
___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] agent_mad_send

2004-10-27 Thread Sean Hefty
On Tue, 26 Oct 2004 21:17:34 -0700
Roland Dreier <[EMAIL PROTECTED]> wrote:

> Sean> In agent_mad_send, a call is made to create an address
> Sean> handle.  Immediately after calling ib_post_send_mad, the
> Sean> address handle is destroyed.  I think that we want to wait
> Sean> until the send is completed before destroying the address
> Sean> handle, and require this of all callers of ib_post_send_mad.
> 
> Yes, that's correct.  Because of a quirk in the way Mellanox HCA's
> implement special QPs, it's actually OK to destroy the AH immediately
> after posting the send, but for an ordinary QP this will lead to some
> bizarre problems.

I'm concerned about handling QP overrun cases, where the call to ib_post_send_mad 
doesn't immediately post to the QP.

- Sean
___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] agent_mad_send

2004-10-27 Thread Hal Rosenstock
On Tue, 2004-10-26 at 18:29, Sean Hefty wrote:
> In agent_mad_send, a call is made to create an address handle.  
> Immediately after calling ib_post_send_mad, the address handle is destroyed.  
> I think that we want to wait until the send is completed before destroying 
> the address handle, and require this of all callers of ib_post_send_mad.

I can post a patch for this but this depends on whether the agent or MAD
layer should destroy the AH.

> Also, I don't think that we want to have this code access the port_priv 
> structure, such as the send_list_lock (which ends up being acquired twice).

The agent is using a different port_priv structure and send_list_lock
than the one the MAD layer uses. Where is it acquired twice ?
 
> Queuing of MADs should be done by the ib_post_send_mad call, 
> and not by its caller.  This will be needed to handle QP overflow anyway.
> Agent_send_handler has a similar issue.

The agent layer is queuing the send to release resources (PCI unmap and
free MAD memory) on send completion, not for retransmission on QP
overflow.

-- Hal

___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] agent_mad_send

2004-10-26 Thread Roland Dreier
Sean> In agent_mad_send, a call is made to create an address
Sean> handle.  Immediately after calling ib_post_send_mad, the
Sean> address handle is destroyed.  I think that we want to wait
Sean> until the send is completed before destroying the address
Sean> handle, and require this of all callers of ib_post_send_mad.

Yes, that's correct.  Because of a quirk in the way Mellanox HCA's
implement special QPs, it's actually OK to destroy the AH immediately
after posting the send, but for an ordinary QP this will lead to some
bizarre problems.

 - R.
___
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general