[openib-general] [PATCH] [SA Query] Change sa_query MAD allocation

Sean Hefty mshefty at ichips.intel.com
Fri Oct 14 10:52:55 PDT 2005


Sean Hefty wrote:
> +	query->sa_query.mad_buf = ib_create_send_mad(agent, 1, 0,
> +						     query->sa_query.sm_ah->ah,
> +						     0, IB_MGMT_MAD_DATA - 
> +						     IB_MGMT_SA_DATA,
> +						     IB_MGMT_SA_DATA, gfp_mask);

My testing worked with this, but the call above is wrong.  The header size is 
not calculated correctly.  It should be something like:

query->sa_query.mad_buf = ib_create_send_mad(agent, 1, 0,
					     query->sa_query.sm_ah->ah,
					     0, sizeof(struct ib_mad) -
					     IB_MGMT_SA_DATA,
					     IB_MGMT_SA_DATA, gfp_mask);

This error appears in two other places in the patch.

- Sean



More information about the general mailing list