[openib-general] [PATCH] user_mad: Add receive side RMPP support

Sean Hefty mshefty at ichips.intel.com
Thu Jun 30 14:46:22 PDT 2005


Fab Tillier wrote:
> Why not just expect the user to read a MAD until the read returns zero?
> 
> I'm thinking something like this:
> 
> read( offset = 0, len = 256 )
> read( offset 256, len = <value determined by first read?> )
> 
> So a read at offset 0 would block waiting for the next MAD, but a read with a
> non-zero offset would return EOF if the full MAD was read.
> 
> Thoughts?

The user would need to know how large of a buffer to allocate for the read. 
  If the user needs to allocate two buffers, then they either need to be 
able to process data the spans multiple buffers, or a second data copy is 
required.  There's also an issue if the user is using multiple threads...

- Sean



More information about the general mailing list