Re: [PATCHv3] opensm: Add support for optimized SLtoVLMappingTable programming

Hal Rosenstock
2010-01-23T12:26:14Z

On Sat, Jan 16, 2010 at 3:33 PM, Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On 15:14 Wed 13 Jan     , Hal Rosenstock wrote:
>> >> > @@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
>> >> >        if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
>> >> >                return ret;
>> >> >
>> >> > +       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
>> >> > +           sm->p_subn->opt.use_optimized_slvl) {
>> >> > +               p = osm_node_get_physp_ptr(node, 1);
>> >> > +               force_update = p->need_update || sm->p_subn->need_update;
>> >> > +               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
>> >> > +                                         &qcfg->sl2vl);
>> >> > +       }
>> >> > +
>> >> >        for (i = 1; i < num_ports; i++) {
>> >> >                p = osm_node_get_physp_ptr(node, i);
>> >> >                force_update = p->need_update || sm->p_subn->need_update;
>> >> >                for (j = 0; j < num_ports; j++)
>> >> > -                       if (sl2vl_update_table(sm, p, i, j, force_update,
>> >> > -                                              &qcfg->sl2vl))
>> >> > +                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
>> >> > +                                              force_update, &qcfg->sl2vl))
>> >> >                                ret = -1;
>> >> >        }
>> >> >
>> >> >
>> >> > , does it look fine for you?
>> >>
>> >> In the optimized case, doesn't this send extra SL2VL mapping table ?
>> >
>> > I don't see how, could you elaborate?
>>
>> Doesn't this send a table for the endport even when optimized ?
>
> Yes, and how is this different from the original patch?

The original patch didn't do this but missed accounting for the switch
port 0 configuration.

> Remember, that there is a different configuration for switch's port 0
> (needed or not - this is another question), so we must to take it into
> account.

Yes but is there a need for this if they are the same and wildcarding
is used ? That will save what seems to me to be an unneeded MAD
request/response pair per switch.

-- Hal

> Sasha