MAD: fix issues routing vendor MADs
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 12 May 2009 17:25:44 +0000 (17:25 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 12 May 2009 17:25:44 +0000 (17:25 +0000)
commite09b78d86ecd04f5f66986b1c22de0a996e43862
treeb967b081bd99383aef17943ec3141e6916b0c915
parentbb2c75ed9c837e9c7219f86704eb8c2652be99bf
MAD: fix issues routing vendor MADs

Only dispatch received vendor defined MADs to the HCA driver if the
management class is one of the MLX vendor defined classes.

When dispatching MADs locally that are not handled by the HCA driver,
copy the sent MAD data into the received MAD buffer.  Also initialize
the address information of the dispatched MAD, so that replies can be
routed correctly back to the sender.  If a MAD is not handled by the
HCA driver and cannot be dispatched, return the MAD to the MAD pool
to avoid leaking MADs.

Finally, we simplify the MAD dispatch code.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2174 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
core/al/al_mad.c
core/al/kernel/al_smi.c
inc/iba/ib_types.h