On Fri, 2004-10-22 at 16:55, Roland Dreier wrote: > By the way, why is the cast (struct ib_mad_send_wc*)wc in the call to > ib_mad_complete_send_wr() valid? It looks like ib_mad_completion_handler() > calls ib_mad_send_done_handler() with the address of a struct ib_wc on > the stack; the layouts of struct ib_mad_send_wc and struct ib_wc don't > match so I'm a little confused as to what that cast is trying to do.
It's an optimization since the ib_mad_send_wc structure is a subset of and can be overlaid on the ib_wc structure. The ib_mad_send_wc struct is the first 3 elements of the ib_wc structure. -- Hal _______________________________________________ openib-general mailing list [EMAIL PROTECTED] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
