[openib-general] Re: FW: [PATCH 1 of 3] mad: large RMPP support

Sean Hefty mshefty at ichips.intel.com
Thu Feb 9 17:17:48 PST 2006


Michael S. Tsirkin wrote:
>>The last segment should provide any necessary padding, so that the 
>>resulting MAD is 256-bytes.  Segments 2 through n should be the same size.
> 
> Uh, right. So segment size could just be a define.

To be clear, the segment size still varies by class, but would be consistent for 
a given class.

> I dont really think it matters that much how we shuffle the buffers around.
> What matters to me is making the rmpp and mad code as simple as possible,
> and hiding all these details away from the user.

I agree.  I was trying to suggest an implementation that I think will result in 
simpler code in the end.

> - There's an API function to get a MAD segment by index,
>   so that users never have to know about how RMPP works -
>   they get a pointer and size and can fill it in.

The problem is that it results in walking the list every time the user wants to 
see the next segment.  This is an O(n^2) operation.  In any case I can think of, 
all that's needed is a single walk through the list to copy the userspace MAD 
data into the appropriate data segments.  In this case I think it makes sense to 
expose the list implementation to gain the extra performance.

- Sean



More information about the general mailing list