[ofa-general] Re: ibsim parsing question

Hal Rosenstock hrosenstock at xsigo.com
Mon May 12 12:35:27 PDT 2008


Hi Sasha,

On Mon, 2008-05-12 at 22:23 +0000, Sasha Khapyorsky wrote:
> Hi Hal,
> 
> On 14:02 Sun 04 May     , Hal Rosenstock wrote:
> > 
> > I have a question on ibsim parsing:
> > 
> > In sim_net.c:parse_port, there is the following code:
> >       parse_opt:
> >         line = s;
> >         while (s && (s = strchr(s + 1, '='))) {
> >                 char *opt = s;
> >                 while (opt && !isalpha(*opt))
> >                         opt--;
> >                 if (!opt || parse_port_opt(port, opt, s + 1) < 0) {
> >                         IBWARN("bad port option");
> >                         return -1;
> >                 }
> >                 line = s + 1;
> >         }
> > 
> > port options appear include w for link width and s for link speed.
> >
> > An issue is that this parsing starts inside the NodeDescription. = is a
> > valid character there and causes an invalid port option.
> 
> I can see the issue, but not sure I know best solution yet (never used
> 's' and 'w' options and didn't see topology files examples where it was
> used).
> 
> > There seem to
> > me to be two choices here:
> > 1. Either ignore unknown options in parse_port_option and the rule
> > becomes w= and s= are invalid in the NodeDescription (which is
> > artificial and not really per the spec).
> > or
> 
> Not sure that "per the spec" restriction is applicable here, it is
> only about simulator topology file format and this file is editable
> (node description value is ignored by ibsim parser in those lines
> anyway).
> 
> > 2. Find some way to start this port option parsing past the end of the
> > NodeDescription. As I'm not sure about all the formats supported, I
> > don't know how to determine a "solid" way to get past the end of the
> > NodeDescription in the topology format. Do you ?
> 
> Do you have examples of 'w' or 's' usage?

No.

> If it is something like:
> 
> [1]     "S-0008f104003f15e4"[19][ext 1] w=4 s=2 # lid 460 lmc 1 "ISR9288/ISR9096 Voltaire sLB-24D"
> 
> , then it should be easy separable by '#' character.

The = character is part of the NodeDescription and doesn't get skipped
even though it should.

-- Hal

> Sasha
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list