RoCEE introduces new file in sysfs: "link_layer".
Assume IB if the file doesn't exist (driver w/o RoCEE support).

Signed-off-by: Yevgeny Kliteynik <[email protected]>
---
 infiniband-diags/scripts/ibstatus |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/infiniband-diags/scripts/ibstatus 
b/infiniband-diags/scripts/ibstatus
index 87fbb0c..f7fbbc2 100755
--- a/infiniband-diags/scripts/ibstatus
+++ b/infiniband-diags/scripts/ibstatus
@@ -31,6 +31,7 @@ port_status() {
        echo "  state:          " `[ -r $port_dir/state ] && cat 
$port_dir/state || echo unknown`
        echo "  phys state:     " `[ -r $port_dir/phys_state ] && cat 
$port_dir/phys_state || echo unknown`
        echo "  rate:           " `[ -r $port_dir/rate ] && cat $port_dir/rate 
|| echo unknown`
+       echo "  link_layer:     " `[ -r $port_dir/link_layer ] && cat 
$port_dir/link_layer || echo IB`
        echo
 }

-- 
1.5.1.4

--
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

Reply via email to