[openib-general] Some more RMPP Questions and Comments (mad_rmpp.c)
Hal Rosenstock
halr at voltaire.com
Mon May 2 11:09:57 PDT 2005
Hi again Sean,
from rmpp.c::ib_create_send_mad
...
if (mad_agent->rmpp_version) {
struct ib_rmpp_mad *rmpp_mad;
rmpp_mad = (struct ib_rmpp_mad *)send_buf->mad;
rmpp_mad->rmpp_hdr.paylen_newwin = cpu_to_be32(hdr_len -
offsetof(struct ib_rmpp_mad, data) + data_len);
}
Should the above also be based on whether RMPP is active in the MAD to
be sent ? I guess this depends on whether one MAD agent can be shared
for RMPP and non RMPP sends.
Also from rmpp.c::ib_create_send_mad:
send_buf->send_wr.wr.ud.remote_qkey = IB_QP_SET_QKEY;
Should the remote_qkey be a passed in parameter to this routine ?
from mad_rmpp.c:
static int data_offset(u8 mgmt_class)
{
if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM)
return offsetof(struct ib_sa_mad, data);
else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&
(mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))
return offsetof(struct ib_vendor_mad, data);
else
return offsetof(struct ib_rmpp_mad, data);
}
Seems like there are a number of places where vendor range 2 is checked.
There already is a (static) function for this in mad.c. Should this be used
(and made global) ?
-- Hal
More information about the general
mailing list