From 568d62a95612dd3210497c870be3d57eb728f45c Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 11 Dec 2016 09:52:48 +0200 Subject: more flexiable OFED version check Signed-off-by: Hanoh Haim --- scripts/dpdk_setup_ports.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/dpdk_setup_ports.py') diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index 8475bdee..e445a402 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -352,7 +352,9 @@ Other network devices def check_ofe_version (self): ofed_info='/usr/bin/ofed_info' - ofed_ver= 'MLNX_OFED_LINUX-3.4-1.0.0.0' + ofed_ver= '-3.4-' + ofed_ver_show= '3.4-1' + if not os.path.isfile(ofed_info): print("OFED %s is not installed on this setup" % ofed_info) @@ -368,7 +370,7 @@ Other network devices if len(lines)>1: if not (ofed_ver in str(lines[0])): - print("installed OFED version is '%s' should be '%s' " % (lines[0],ofed_ver)) + print("installed OFED version is '%s' should be at least '%s' and up" % (lines[0],ofed_ver_show)) exit(-1); @@ -989,6 +991,8 @@ def main (): print(e) exit(-1) + + if __name__ == '__main__': main() -- cgit From c8410413e0c7aea0aa353b7d5dd85b0d96766197 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 11 Dec 2016 17:05:18 +0200 Subject: Cantos MTU is printed in a different way Signed-off-by: Hanoh Haim --- scripts/dpdk_setup_ports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/dpdk_setup_ports.py') diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index e445a402..ce6d2b2f 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -324,7 +324,11 @@ Other network devices if obj: return int(obj.group(1)); else: - return -1 + obj=re.search(r'mtu (\d+)',out,flags=re.MULTILINE|re.DOTALL); + if obj: + return int(obj.group(1)); + else: + return -1 def set_mtu_mlx5 (self,dev_id,new_mtu): if len(dev_id)>0: -- cgit