[ofa-general] Re: [PATCH] IB/core/user_mad.c: Add support for issmdisabled
Hal Rosenstock
halr at voltaire.com
Thu Mar 29 13:03:04 PDT 2007
On Thu, 2007-03-29 at 13:26, Roland Dreier wrote:
> > -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.
Are you sure ? Don't issm files need a duplicated set of dev_map 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,
Yes, largely.
> so maybe we should clean up the other code first.
By clean up, (aside from static const), is there more than what you
indicate below in making issm and issmdisabled share the same open/close
routines ?
-- Hal
> 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