[openib-general] RFC: detecting duplicate MAD requests

Sean Hefty mshefty at ichips.intel.com
Mon Jun 12 13:04:45 PDT 2006


Sean Hefty wrote:
> I'd like to propose that the MAD layer detect duplicate requests.  After a
> request MAD has been handed to a client, its context would be maintained until
> the user calls ib_free_recv_mad(), allowing duplicate requests to be discarded.
> 
{snip}
> 
> Finally, a way would need to be found for when to call ib_free_recv_mad() for
> userspace clients.

I've been trying to come up with a way to handle userspace clients.  Here are a 
few ideas:

1. Export ib_free_recv_mad() to userspace.  This changes the ABI, and would 
require changes to all existing clients for things to work properly.  My 
preference would be to avoid this option.

2. Change the MAD registration, so that clients indicate which methods generate 
responses.  Again, this changes the ABI.

3. Hard-code which methods generate responses.  For most management classes, 
there's only 3-6 methods that generate responses.  The kernel umad module would 
only free a request MAD after a response had been generated.  This would make 
umad class aware, and would not work for user-defined classes.

4. Modify umad to learn which requests generate responses, by examining response 
MADs.  When a response is sent, umad would mark which method the response is for 
by flipping the R-bit.  Based on the algorithm, this could result in losing 
responses the first time that a request is seen.  Some additional hard-coding 
would be needed for a Set, since a Set request generates GetResp MADs.

Comments?

- Sean




More information about the general mailing list