libibumad: fix return value for RMPP handling
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 3 Mar 2009 00:50:59 +0000 (00:50 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 3 Mar 2009 00:50:59 +0000 (00:50 +0000)
commit1e12c556ae2e571177978dbb8bbff2e5365f24b0
tree688b3e0ade34cccd37709397d7c0879e66752274
parent01fe653b0a64acd610bc580a5e457cc67e4f1b77
libibumad: fix return value for RMPP handling

Return ENOSPC if the user provided buffer is smaller than the MAD to retrieve from the kernel.  This allows processing of MADs > 256 bytes.

Problem was found by running the saquery ib-diag with RMPP used to return fabric topology information.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1999 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
ulp/libibumad/include/infiniband/umad.h
ulp/libibumad/src/umad.cpp