From 79e7065c2f6e56f9ba1108a218a19855f4af968b Mon Sep 17 00:00:00 2001 From: dletai Date: Mon, 7 Sep 2015 15:15:45 +0300 Subject: [PATCH] Update infiniband.py --- network/infiniband/python_modules/infiniband.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/network/infiniband/python_modules/infiniband.py b/network/infiniband/python_modules/infiniband.py index 58972795..c9aca20d 100644 --- a/network/infiniband/python_modules/infiniband.py +++ b/network/infiniband/python_modules/infiniband.py @@ -332,10 +332,12 @@ def metric_init(params): with open(lid_file) as f: # Linux sysfs lists the port_lid in hex port_lid = int(f.readline().split(' ')[0], 0) + if port_lid == 0: + continue + IB_PORTS[port_lid] = ib_device except IOError: print("Unable to read IB port LID # from file: %s" % lid_file) - IB_PORTS[port_lid] = ib_device - + # Create definitions for the known perfquery InfiniBand metrics for metric_name, metric_settings in KNOWN_PERFQUERY_METRICS.iteritems(): name_prefix = metric_settings['name_prefix']