diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-12-11 17:05:18 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-12-11 17:05:18 +0200 |
commit | c8410413e0c7aea0aa353b7d5dd85b0d96766197 (patch) | |
tree | 0569b2a7f8c2bbba7094ca3ec933ecf583874eb2 | |
parent | 229352c5fd4c9241ee333a50b96761fadfd7d940 (diff) |
Cantos MTU is printed in a different way
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
-rwxr-xr-x | scripts/dpdk_setup_ports.py | 6 |
1 files changed, 5 insertions, 1 deletions
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: |