[ofa-general] RE: pkey.sim.tcl (was: [PATCH] opensm: detect port external reset andflush cached tables)
Eitan Zahavi
eitan at mellanox.co.il
Wed Jul 25 23:26:27 PDT 2007
Hi Sasha,
I am happy you actually use the simulator.
Please provide more info regarding the failure. You should tar compress
the /tmp/ibmgtsim.XXXX of your run.
The following flow is performed by this test:
1. Three partitions are created with random Pkeys. The first 2 will have
full members. The 3rd has only partial memebr.
2. Ports are assigned either group 1, group 2 or a combination of group
(1 and 3) or (2 and 3)
3. PKey tables for each port are filled with random index for the port
"real" pkeys and other random pkeys. Length si also random.
4. opensm is invoked with a matching partition-policy file, wait for
SUBNET UP
5. osmtest full inventory - including path records is run from 5 random
ports
The code validates each port inventory only reports ports it is
shares PKey with
6. The default PKey is removed from ALL the port pkey tables
7. All PKey tables are validated against initial setup to see that the
indexes of the assigned "real" pkeys was not altered by the SM.
8. A single switch is selected and its Change Bit is raised.
9. Wait for SUBNET UP
10. Validate all ports got their default pkey back.
I suspect from our thread about not setting LFT that stage 10 failed for
you.
Eitan
Eitan Zahavi
Senior Engineering Director, Software Architect
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL
> -----Original Message-----
> From: Sasha Khapyorsky [mailto:sashak at voltaire.com]
> Sent: Wednesday, July 25, 2007 11:24 PM
> To: Eitan Zahavi; Yevgeny Kliteynik
> Cc: Hal Rosenstock; general at lists.openfabrics.org
> Subject: pkey.sim.tcl (was: [PATCH] opensm: detect port
> external reset andflush cached tables)
>
> 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