[openib-general] semantics of process_mad?

Fab Tillier ftillier at infiniconsys.com
Fri Sep 10 14:26:02 PDT 2004


> From: Roland Dreier [mailto:roland at topspin.com]
> Sent: Friday, September 10, 2004 1:49 PM
> To: openib-general at openib.org
> Subject: [openib-general] semantics of process_mad?
> 
> I'm now looking at implementing the process_mad method:
> 
> 	int	 (*process_mad)(struct ib_device *device,
> 				int process_mad_flags,
> 				struct ib_mad *in_mad,
> 				struct ib_mad *out_mad);
> 
> A QP number parameter might also be good, but maybe we can rely on the
> access layer to ensure that the MAD's class and QP number match
> appropriately.

I'm confused as to what the QP parameter would be used for.  Can you
clarify?

> 
> Finally, what should the return value be?  There are several
> independent things that the process_mad function needs to tell the
> access layer:
> 
>  - Did the operation succeed?
>  - Was the MAD consumed or should it be dispatched to a registered
> consumer?
>  - Was a reply generated or should no reply be sent?

Why not have the out_mad be an output parameter?  If the process_mad has
output data, it would allocate a mad, fill it in, and return it.  Just a
random thought, so it may be totally stupid.

- Fab




More information about the general mailing list