summaryrefslogtreecommitdiffstats
path: root/scripts/dpdk_setup_ports.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-13 20:02:45 +0200
committerimarom <imarom@cisco.com>2016-12-13 20:02:45 +0200
commitac1c2d18f699c40b974d314df3db835ec26bc0bd (patch)
tree44b73dacf0be5809817d5d675a2be8a6d85ce357 /scripts/dpdk_setup_ports.py
parent603bd7a4d9dcb8058812633ac60a75598578cb83 (diff)
parentfe755604ec04ed7f8622394f99f0048901dad4e1 (diff)
Merge branch 'master' into rx_phase_2
Diffstat (limited to 'scripts/dpdk_setup_ports.py')
-rwxr-xr-xscripts/dpdk_setup_ports.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py
index 8475bdee..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:
@@ -352,7 +356,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 +374,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 +995,8 @@ def main ():
print(e)
exit(-1)
+
+
if __name__ == '__main__':
main()