infiniband-diags: Add dump2psl and dump2slvl perl scripts
PATCH v2 1/1 infiniband-diags: Add dump2psl and dump2slvl perl scripts
to aid in torus-2QoS credit checking
Signed-off-by Jim Schutt <[email protected]>
---
Changes since v1:
Proper formatting
configure.in | 2 + scripts/dump2psl.pl | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/dump2slvl.pl | 24 +++++++++++++++++++++++ 3 files changed, 77 insertions(+), 0 deletions(-) create mode 100755 scripts/dump2psl.pl create mode 100755 scripts/dump2slvl.pl
configure.in +2 -0
@@ -169,6 +169,8 @@ AC_CONFIG_FILES([\ scripts/ibrouters \ scripts/iblinkinfo.pl \ scripts/ibqueryerrors.pl \ + scripts/dump2psl.pl \ + scripts/dump2slvl.pl \ libibnetdisc/Makefile ]) AC_OUTPUT
scripts/dump2psl.pl new file +51 -0
51 lines not on this page · raw message
scripts/dump2slvl.pl new file +24 -0
@@ -0,0 +1,24 @@ +#! /usr/bin/perl -w + +my $switch = 0x0; + +my $H = "([xXa-fA-F0-9]+)"; +my $D = "([0-9]+)"; +my $DD = "\\s+([0-9]+)\\s+([0-9]+)"; + +while (<>) { + + if (/^Switch\s+$H/) { + $switch = $1; + } + + if (/^\s*$D\s+$D\s+:$DD$DD$DD$DD$DD$DD$DD$DD/) { + + printf "%s %d %d", $switch, $1, $2; + printf " 0x%x%x 0x%x%x", $3, $4, $5, $6; + printf " 0x%x%x 0x%x%x", $7, $8, $9, $10; + printf " 0x%x%x 0x%x%x", $11, $12, $13, $14; + printf " 0x%x%x 0x%x%x", $15, $16, $17, $18; + printf "\n"; + } +}
Signature · 7 lines
1.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html