[ofa-general] Re: [PATCH] iblinkinfo: warn only on degragded link speed, width
Ira Weiny
weiny2 at llnl.gov
Wed Jul 29 17:07:53 PDT 2009
Arthur,
Thanks for the patch. However, iblinkinfo has been reimplemented in C.
Luckily I don't see this problem with that version.
# iblinkinfo
Switch 0x0002c9020040b1c8 Infiniscale-IV Mellanox Technologies:
2 1[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 1 1[ ] "dos0" ( )
2 2[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 5 1[ ] "dos1" ( )
2 3[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 6 1[ ] "dos2" ( )
2 4[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 4 1[ ] "dos3" ( )
2 5[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 3 1[ ] "dos4" ( )
2 6[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
2 7[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
...
# iblinkinfo
Switch 0x0008f10500200220 Voltaire 4036 - 36 QDR ports switch:
...
1 17[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
1 18[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
1 19[ ] ==( 4X 5.0 Gbps Active/ LinkUp)==> 7 5[ ] "Cisco Switch SFS7000D" ( )
1 20[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
1 21[ ] ==( 4X 2.5 Gbps Down/ Polling)==> [ ] "" ( )
...
Thanks,
Ira
On Wed, 29 Jul 2009 16:19:22 -0500
Arthur Kepner <akepner at sgi.com> wrote:
>
> iblinkinfo.pl warns when the link speed (or width) is higher than
> one of the supported values. For example, we're seeing:
>
> 168 11[ ] ==( 4X 10.0 Gbps Active / LinkUp)==> 169 \
> 11[ ] "Infiniscale-IV Mellanox Technologies" ( Could be 5.0 Gbps)
>
> It's complaining that 10Gbps was negotiated even though 5.0Gbps is
> available, which I doubt is the intended behavior.
>
> The following patch causes iblinkinfo to warn only when the link
> speed (or width) is lower than the greatest common value supported
> by both ports.
>
> Signed-off-by: Arthur Kepner <akepner at sgi.com>
> ---
>
> diff -rup a/scripts/iblinkinfo.pl b/scripts/iblinkinfo.pl
> --- a/scripts/iblinkinfo.pl 2009-07-29 13:16:02.889073624 -0700
> +++ b/scripts/iblinkinfo.pl 2009-07-29 13:17:24.902170284 -0700
> @@ -168,9 +168,11 @@ sub main
> }
> my @lines = split("\n", $data);
> my $speed = "";
> + my $nspeed = -1; # in Gbps
> my $speed_sup = "";
> my $speed_enable = "";
> my $width = "";
> + my $nwidth = -1;
> my $width_sup = "";
> my $width_enable = "";
> my $state = "";
> @@ -179,12 +181,18 @@ sub main
> my $phy_link_state = "";
>
> foreach my $line (@lines) {
> - if ($line =~ /^LinkSpeedActive:\.+(.*)/) { $speed = $1; }
> + if ($line =~ /^LinkSpeedActive:\.+(\d+\.\d+)(.*)/) {
> + $nspeed = $1;
> + $speed = $1.$2;
> + }
> if ($line =~ /^LinkSpeedEnabled:\.+(.*)/) {
> $speed_enable = $1;
> }
> if ($line =~ /^LinkSpeedSupported:\.+(.*)/) { $speed_sup = $1; }
> - if ($line =~ /^LinkWidthActive:\.+(.*)/) { $width = $1; }
> + if ($line =~ /^LinkWidthActive:\.+(\d+)(.*)/) {
> + $nwidth = $1;
> + $width = $1.$2;
> + }
> if ($line =~ /^LinkWidthEnabled:\.+(.*)/) {
> $width_enable = $1;
> }
> @@ -243,19 +251,19 @@ sub main
> if ($rem_width_enable ne "" && $rem_width_sup ne "") {
> if ( $width_enable =~ /12X/
> && $rem_width_enable =~ /12X/
> - && $width !~ /12X/)
> + && $nwidth < 12)
> {
> $width_msg = "Could be 12X";
> } else {
> if ( $width_enable =~ /8X/
> && $rem_width_enable =~ /8X/
> - && $width !~ /8X/)
> + && $nwidth < 8)
> {
> $width_msg = "Could be 8X";
> } else {
> if ( $width_enable =~ /4X/
> && $rem_width_enable =~ /4X/
> - && $width !~ /4X/)
> + && $nwidth < 4)
> {
> $width_msg = "Could be 4X";
> }
> @@ -265,13 +273,13 @@ sub main
> if ($rem_speed_enable ne "" && $rem_speed_sup ne "") {
> if ( $speed_enable =~ /10\.0/
> && $rem_speed_enable =~ /10\.0/
> - && $speed !~ /10\.0/)
> + && $nspeed < 10.0)
> {
> $speed_msg = "Could be 10.0 Gbps";
> } else {
> if ( $speed_enable =~ /5\.0/
> && $rem_speed_enable =~ /5\.0/
> - && $speed !~ /5\.0/)
> + && $nspeed < 5.0)
> {
> $speed_msg = "Could be 5.0 Gbps";
> }
>
--
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
weiny2 at llnl.gov
More information about the general
mailing list