[ofa-general] pkey.sim.tcl (was: [PATCH] opensm: detect port external reset and flush cached tables)

Sasha Khapyorsky sashak at voltaire.com
Wed Jul 25 13:24:18 PDT 2007


Hi Eitan, Yevgeny,


On 00:54 Wed 25 Jul     , Sasha Khapyorsky wrote:
> 
> This detects port external reset by validating PortState == INIT, and
> when detected flushes cached port related tables - re-reads pkey table
> and drops (overwrites) SL2VL and VLArb tables.
> 
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>

[snip...]
> diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
> index 6fe2d1d..0528e38 100644
> --- a/opensm/opensm/osm_port_info_rcv.c
> +++ b/opensm/opensm/osm_port_info_rcv.c
> @@ -801,6 +801,12 @@ osm_pi_rcv_process(
>        p_rcv->p_subn->master_sm_base_lid = p_pi->master_sm_base_lid;
>      }
>  
> +    /* if port just inited or reached INIT state (external reset)
> +       request update for port related tables */
> +    p_physp->need_update =
> +      (ib_port_info_get_port_state(p_pi) == IB_LINK_INIT ||
> +       p_physp->need_update > 1 ) ? 1 : 0;
> +
>      switch( osm_node_get_type( p_node ) )
>      {
>      case IB_NODE_TYPE_CA:
> @@ -824,7 +830,8 @@ osm_pi_rcv_process(
>      /*
>        Get the tables on the physp.
>      */
> -    __osm_pi_rcv_get_pkey_slvl_vla_tables( p_rcv, p_node, p_physp );
> +    if (p_physp->need_update)
> +      __osm_pi_rcv_get_pkey_slvl_vla_tables( p_rcv, p_node, p_physp );

When testing this patch, I tried it with ibmgtsim and test failed:

  RunSimTest -o ${ROOT}/sbin/opensm -t ${TESTS}/IS1-16.topo -f ${TESTS}/pkey.sim.tcl -c ${TESTS}/pkey.check.tcl

The failure is resulted by port pkey tables modifications which is
performed in pkey.sim.tcl. Why should we do this? Is this legal scenario
when pkey tables are modified externally without Partition Manager?

Sasha



More information about the general mailing list