From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Mike Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Hal Rosenstock
<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
Todd Rimmer <todd.rimmer-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] opensm: osm_subnet.c: Updated patch to add error-reporting to the parsing of opensm.conf
Date: Sun, 18 Mar 2012 14:57:14 +0200 [thread overview]
Message-ID: <20120318125714.GE2417@calypso> (raw)
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB5CD5B8B5D0-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
On 12:54 Wed 29 Feb , Mike Heinz wrote:
> I've recently seen two different users on different fabrics make the same
> mistake: They made a syntax error in their opensm.conf file and then couldn't
> figure out why their changes didn't take effect.
>
> Looking at the code that parses the opensm.conf file, it appears to treat any
> line it cannot parse as a comment and silently passes over it.
>
> This patch modifies the parse logic as follows:
>
> 1. Truncate the line at the first '#' character.
> 2. If the result is blank, skip to the next line.
> 3. If the first token in the line can be matched against a known token,
> process it as usual.
> 4. If the token cannot be matched against a known token, log an error message.
>
> The result is that if, for example, the user typed "force_link_speed=5" the
> system log will read:
>
> Feb 24 14:57:09 ifs001 OpenSM[17517]: OpenSM 3.3.13
> Feb 24 14:57:09 ifs001 OpenSM[17517]: Entering DISCOVERING state
> Feb 24 14:57:09 ifs001 OpenSM[17517]: Unrecognized token: "force_link_speed=5"
> Feb 24 14:57:09 ifs001 opensm[17517]: Entering MASTER state
> Feb 24 14:57:09 ifs001 opensm[17517]: SUBNET UP
> .
> .
> .
>
> In addition, error messages will also be reported to the command line and
> the opensm logfile. For example:
>
> [root@ifs001]# opensm
> -------------------------------------------------
> OpenSM 3.3.13
> Reading Cached Option File: /etc/opensm/opensm.conf
> Unrecognized token: "1`243561"
> Command Line Arguments:
> Log File: /var/log/opensm.log
> -------------------------------------------------
> OpenSM 3.3.13
>
> Entering DISCOVERING state
>
> Using default GUID 0x117500007918d2
> Unrecognized token: "1`243561"
> Entering MASTER state
>
> SUBNET UP
> .
> .
> .
>
> Signed-off-by: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
> ---
Applied. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-03-18 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 18:54 [PATCH] opensm: osm_subnet.c: Updated patch to add error-reporting to the parsing of opensm.conf Mike Heinz
[not found] ` <4C2744E8AD2982428C5BFE523DF8CDCB5CD5B8B5D0-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2012-03-05 16:27 ` Heinz, Michael William
2012-03-18 12:57 ` Alex Netes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120318125714.GE2417@calypso \
--to=alexne-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=todd.rimmer-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox