RE: [PATCH v4 16/19] IB/mad: Add Intel Omni-Path Architecture defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  /* 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:

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 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux