[openib-general] Re: FW: [PATCH 1 of 3] mad: large RMPP support
Sean Hefty
mshefty at ichips.intel.com
Thu Feb 9 17:11:04 PST 2006
Michael S. Tsirkin wrote:
> As far as I can see, we decided that the list of segments is the right approach.
Agreed.
> It also seems you are also inclining towards uniform handling of the first
> segment and the rest of them, so I hope this means the simplification
> achieved by always using an s/g list of size 2 is also accepted.
I would prefer to keep single segment MADs to a single SGE, but this isn't a big
deal.
For a list of segments, my preference is to match what was done for the receive
side on completions. The first ib_mad_recv_buf is also in the rmpp_list. This
made the code simpler when dealing with multiple receive buffers that comprised
a single MAD. I'm anticipating that the same will be true for send handling.
> It seems to me the only issue left is the extra list walks needed when we
> look up the segment by number. The simplest solution to that would
> probably be tracking the chunk addressed by seg_num, or something
> along these lines.
This is the primary issue. Both the internal code and user should be able to
access segments without walking through the list multiple times. Internally,
the RMPP code can do this using a couple of additional pointers. Externally, a
user should have access to the segment list directly, rather than through a
function call.
The latest idea that I was suggesting was to separate the MAD header from the
data segments for multi-segment/RMPP active MADs. Let *mad reference the
header, and rmpp_list reference all data segments. Non-RMPP MADs would use *mad
to reference the entire buffer. For an RMPP MAD (one with RMPP active) that
fits into a single segment, I can go either way.
- Sean
More information about the general
mailing list