[openib-general] [RFC] [PATCH] user_mad: Support RMPP on send side

Hal Rosenstock halr at voltaire.com
Wed May 11 16:07:17 PDT 2005


On Wed, 2005-05-11 at 18:38, Sean Hefty wrote:
> Hal Rosenstock wrote:
> > The main issue I see on the send side is that without examining the
> > header, one can't get all the parameters for ib_create_send_mad. Even
> > with some variant of this call (perhaps broken up into 2 parts), I think
> > the mad_agent is the key parameter needed. I don't see a way to get this
> > ahead of time without 2 copies. Am I then back to not using this routine
> > and doing it "by hand" ?
> 
> Why not copy down the ib_user_mad, or any necessary header information, 
> separately from the actual MAD data itself?  I.e. read in the mad_agent and 
> MAD length first, allocate the send MAD, and then copy the data.  (I'll 
> admit that I'm not overly familiar with this code, so if this is overly 
> difficult just say so...)

That's exactly what is done. That's what I was calling 2 copies as
copy_from_user is called twice. My wording was poor.

The details are as follows:

Initially the user_mad header, MAD header, and RMPP header are copied
from user space. Later on, if it is a normal MAD, the MAD is copied from
user space. If it is an RMPP MAD, the MAD header is mem copied from
where it was put and the rest of the MAD is copied from user space.

I think some improvements to this code may be possible (perhaps more
with normal MADs).

> I'm concerned about having excessive copies on the opensm node, especially 
> if it's sending a large number of RMPP packets.

-- Hal





More information about the general mailing list