> @@ -937,20 +937,31 @@ struct ib_mad_send_buf * ib_create_send_mad(struct > ib_mad_agent *mad_agent, > struct ib_mad_send_wr_private *mad_send_wr; > int pad, message_size, ret, size; > void *buf; > + size_t mad_size; > + int opa; > > mad_agent_priv = container_of(mad_agent, struct > ib_mad_agent_private, > agent); > - pad = get_pad_size(hdr_len, data_len); > + > + opa = mad_agent_priv->agent.device- > >cached_dev_attrs.device_cap_flags2 & > + IB_DEVICE_OPA_MAD_SUPPORT; > + > + if (opa && base_version == OPA_MGMT_BASE_VERSION) > + mad_size = sizeof(struct jumbo_mad); > + else > + mad_size = sizeof(struct ib_mad);
Didn't an earlier patch make is possible to read the mad_size directly from the device? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html