[openib-general] [PATCH] user_mad: Add receive side RMPP support
Fab Tillier
ftillier at silverstorm.com
Thu Jun 30 14:53:48 PDT 2005
> From: Sean Hefty [mailto:mshefty at ichips.intel.com]
> Sent: Thursday, June 30, 2005 2:46 PM
>
> 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...
Ok, so my idea sucked. What about not coalescing in the kernel, and just
handing up MADs to be coalesced in user-mode? It would require a buffer
allocation in UM, as well as copies, but those currently happen in the kernel
and could be eliminated, no?
- Fab
More information about the general
mailing list