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:34:25 +0200 |
commit | 6c280b1ca52c8f2a80bbaea52aa3e09060af04b3 (patch) | |
tree | c9fc6b15d59ae6ebc629b5d0f5991f290b6f41a9 /python/vyos | |
parent | 0229645c8248decb5664056df8aa5cd5dff41802 (diff) | |
download | vyos-1x-6c280b1ca52c8f2a80bbaea52aa3e09060af04b3.tar.gz vyos-1x-6c280b1ca52c8f2a80bbaea52aa3e09060af04b3.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.
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 |