From dce9304e8d6fcdc5d3e2af92c181117fa262d8be Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Tue, 1 Jun 2021 10:58:47 -0500 Subject: [PATCH] Add some device error checking code to gen-trex-cfg.py --- gen-trex-cfg.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gen-trex-cfg.py b/gen-trex-cfg.py index 7d1be9d..80c5c1c 100755 --- a/gen-trex-cfg.py +++ b/gen-trex-cfg.py @@ -214,6 +214,12 @@ def main(): return(3) else: pair['node'] = int(fh.readline().rstrip()) + else: + t_global.log.error("Could not determine NUMA node for device %s" % (dev)) + return(16) + else: + t_global.log.error("Could not find /sys/bus/pci/devices/%s" % (dev)) + return(17) t_global.log.debug("device pairs: %s" % (t_global.device_pairs))