[ofa-general] Re: [PATCH] IB/core/user_mad.c: Add support for issmdisabled

Roland Dreier rdreier at cisco.com
Thu Mar 29 11:26:20 PDT 2007


 > -static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS * 2);
 > +static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS * 3);

I don't see any reason for this change -- in fact the "* 2" looks
buggy to me.  Probably a historical relic -- the only access to the
dev_map bitmap that I see uses at most IB_UMAD_MAX_PORTS bits.

 > +	struct ib_port_modify props = {
 > +		.set_port_cap_mask = IB_PORT_SM_DISABLED
 > +	};

this could be static const -- I see that this is cut-and-pasted, so
maybe we should clean up the other code first.

In fact... the whole ib_umad_smdis_open() and ib_umad_smdis_close()
functions are nearly exactly the same as the ib_umad_sm_open() and
ib_umad_sm_close() functions.  I think we need to avoid the code
duplication and use the same functions for both IsSM and IsSMDisabled
files.

 - R.



More information about the general mailing list