[openib-general] Re: user_mad.c changes for upstream
Hal Rosenstock
halr at voltaire.com
Mon Sep 19 11:21:31 PDT 2005
On Mon, 2005-09-19 at 14:09, Roland Dreier wrote:
> Hal> Hi Roland, The last patch I sent is incremental off of what
> Hal> is in the OpenIB svn tree. If that looks right, I will check
> Hal> it in. It does work. Do you want a patch which is the
> Hal> consolidated difference from what has been pushed upstream or
> Hal> would you be all set on this ?
>
> What I really need is a changelog comment explaining the final change.
> A diff against what is upstream is helpful, but I can generate it from
> subversion without too much trouble.
OK. Here's what I think it nets out to other than the formatting
changes:
user_mad::ib_umad_write Fix the data length for RMPP of user buffer
copied when sending SA class RMPP
The salient diff is below.
-- Hal
--- user_mad.c (revision 3471)
+++ user_mad.c (revision 3484)
@@ -334,10 +334,11 @@ static ssize_t ib_umad_write(struct file
ret = -EINVAL;
goto err_ah;
}
- /* Validate that management class can support RMPP */
+
+ /* Validate that the management class can support RMPP */
if (rmpp_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
hdr_len = offsetof(struct ib_sa_mad, data);
- data_len = length;
+ data_len = length - hdr_len;
} else if ((rmpp_mad->mad_hdr.mgmt_class >= IB_MGMT_CLASS_VENDOR
_RANGE2_START) &&
(rmpp_mad->mad_hdr.mgmt_class <= IB_MGMT_CLASS_VENDO
R_RANGE2_END)) {
hdr_len = offsetof(struct ib_vendor_mad, data);
More information about the general
mailing list