[openib-general] [RFC] MAD API changes to fix DMA mapping issues

Sean Hefty mshefty at ichips.intel.com
Wed Oct 19 11:21:20 PDT 2005


Sean Hefty wrote:
>> I'm still a little confused as to where the data buffer actually is.
>> Is it pointed to by the struct ib_mad *mad member?  If so, it seems a
>> little odd to make the pointer have type struct ib_mad *, since struct
>> ib_mad is exactly 256 bytes long.
> 
> Yes - it's pointed to by struct ib_mad.  This is how ib_mad_send_buf 
> worked before.  I can change the pointer to void*, but then it requires 
> casting to ib_mad or ib_mad_hdr where ever it is used.  I've also 
> considered changing it to a pointer to a union of the different MAD types.

Thinking about this more, making the buffer a void* may actually make it easier 
than struct ib_mad*, since explicit casting wouldn't be necessary.  There are 
several places in the code where there are casts to ib_rmpp_mad, ib_smp, 
ib_vendor_mad, etc.

I'd like to make supporting very large sends a separate change at this point 
though.  That change could possibly combine the ib_mad_send_buf and 
ib_mad_recv_wc structures together.

- Sean



More information about the general mailing list