diff options
author | 2024-12-05 10:44:09 +0100 | |
---|---|---|
committer | 2024-12-05 10:44:09 +0100 | |
commit | bb8a6462b8508108bf886f9c1d9d53d9ebf3f71a (patch) | |
tree | dd3f59edacf625290d6a99c94662b9f536d1eae9 /resources/libraries/python/IPUtil.py | |
parent | d8341ba278e8e0ea4960306f43e7fd7c871dc1d1 (diff) |
fix(gso): Repair linux interface name detection
+ Set GSO_FALSE tag on non-gso suite.
Change-Id: I32b6ff2f492a0dd8f2fe47ef5435c8d0e3318406
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPUtil.py')
-rw-r--r-- | resources/libraries/python/IPUtil.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py index d7996ccf79..672aa1ae3c 100644 --- a/resources/libraries/python/IPUtil.py +++ b/resources/libraries/python/IPUtil.py @@ -394,16 +394,12 @@ class IPUtil: :raises RuntimeError: If cannot get the information about interfaces. """ cmd = f"grep '{pci_addr}' /sys/class/net/*/device/uevent" - ret_code, stdout, stderr = exec_cmd(node, cmd, timeout=30) - if ret_code != 0: - return None - + msg = "Could not get information about interfaces" + stdout, stderr = exec_cmd_no_error(node, cmd, timeout=30, err_msg=msg) try: - stdout.split("/")[4] + return stdout.split("/")[4] except IndexError: - raise RuntimeError( - f"Could not get information about interfaces:\n{stderr}" - ) + raise RuntimeError(f"{msg}:\n{stderr}") @staticmethod def set_linux_interface_up( |