On Fri, Apr 03, 2015 at 05:33:55PM -0600, Hefty, Sean wrote:
> >  /* Registration table sizes */
> >  #define MAX_MGMT_CLASS             80
> > -#define MAX_MGMT_VERSION   8
> > +#define MAX_MGMT_VERSION   0x83
> 
> It's unfortunate that this results in a big jump in used versions.  
> Mad_priv.h defines this:

It is unfortunate.

> 
> struct ib_mad_port_private {
>       ...
>       struct ib_mad_mgmt_version_table version[MAX_MGMT_VERSION];
> 
> struct ib_mad_mgmt_version_table {
>       struct ib_mad_mgmt_class_table *class;
>       struct ib_mad_mgmt_vendor_class_table *vendor;
> };
> 
> This ends up allocating about 2K of data per port of NULL pointers.  Not a 
> huge deal, but still.

I agree this is not ideal but this is not a large amount of space.  Nor is this
something which is dynamically being allocated.

> 
> I don't have a great fix here.  Maybe the version[] array can be the 
> necessary size, with some sort of simple mapping function from version to the 
> index?

I did not have a great fix either.  Hence the current implementation.

Frankly I don't know of many systems that have more than a few ports and at 2K
each this does not seem like a big deal.

Ira

--
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

Reply via email to