diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-31 23:31:29 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-31 23:36:19 +0200 |
commit | f5f58669cccbb99ae2b8bc9737e9d6bb782a53a4 (patch) | |
tree | dbf078af5010399c045a744082249ffbfc791135 /python/vyos | |
parent | b0d4112bd6073e4a947869c3bd80f8e87783fbfa (diff) | |
download | vyos-1x-f5f58669cccbb99ae2b8bc9737e9d6bb782a53a4.tar.gz vyos-1x-f5f58669cccbb99ae2b8bc9737e9d6bb782a53a4.zip |
vyos.ethtool: T3163: ring-buffer values should be stored as string
Commit 29082959 ("ethernet: T3163: only change ring-buffer settings if
required") added a delta-check code for the ring buffer values, unfortunately
this was never properly evaluated as str() and int() got compared resulting
always in an unequal result.
(cherry picked from commit 6c280b1ca52c8f2a80bbaea52aa3e09060af04b3)
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/ethtool.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py index 87b9d7dd0..609d83b5e 100644 --- a/python/vyos/ethtool.py +++ b/python/vyos/ethtool.py @@ -113,7 +113,7 @@ class Ethtool: # output format from 0 -> n/a. As we are only interested in the # tx/rx keys we do not care about RX Mini/Jumbo. if value.isdigit(): - self._ring_buffers_max[key] = int(value) + self._ring_buffers_max[key] = value # Now we wan't to get the current RX/TX ringbuffer values - used for for line in out.splitlines()[7:11]: if ':' in line: @@ -123,7 +123,7 @@ class Ethtool: # output format from 0 -> n/a. As we are only interested in the # tx/rx keys we do not care about RX Mini/Jumbo. if value.isdigit(): - self._ring_buffers[key] = int(value) + self._ring_buffers[key] = value # Get current flow control settings, but this is not supported by # all NICs (e.g. vmxnet3 does not support is) @@ -177,7 +177,7 @@ class Ethtool: # thus when it's impossible return None if rx_tx not in ['rx', 'tx']: ValueError('Ring-buffer type must be either "rx" or "tx"') - return self._ring_buffers.get(rx_tx, None) + return str(self._ring_buffers.get(rx_tx, None)) def check_speed_duplex(self, speed, duplex): """ Check if the passed speed and duplex combination is supported by |