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

Sean Hefty mshefty at ichips.intel.com
Thu Feb 9 16:02:51 PST 2006


Michael S. Tsirkin wrote:
> Given that the last segment has a different size, it seems cleaner
> to just keep the segment size part of ib_mad_segment structure.

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.

> I dont htink its a good idea.
> Recall that when you send segments starting from the second one,
> you need the header from *mad. So this gets ugly very quickly.

This is true whether the first segment is in the rmpp_list or not.  From a 
user's viewpoint, they can walk all segments using the list operations. 
Otherwise, they need to reference the first segment using *mad, then all other 
segments using a list.  I do see the issue that the first segment requires an 
offset, whereas, others do not.

> On the other hand, it makes sense to keep the single mad case
> as simple as possible. So that's a good reason to have the rmpp list
> include segments starting from the second one.

For single segment MADs, the rmpp_list can be ignored by the user.  It's just 
that the internal code can be easier.  We won't have to special case tracking 
the last segment acked as being either referenced by *mad or a pointer to a segment.

Hmm... okay, how about this idea?  For single segment MADs, only *mad is used. 
For multiple segment MADs, *mad references the repeated header only.  All data 
segments are in the rmpp_list.

Does anything outside of userspace send a multi-segment RMPP MAD?  Is it likely 
that a kernel component would need to?

- Sean



More information about the general mailing list