summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-31 21:50:05 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-31 22:01:44 +0200
commitde3c476ccb60d66a844f9e12a9ca2963ae2206e6 (patch)
tree7d82387a6ce75f8771c9875acc7b7f8bf55ebbbe /src
parent5cbb1f3e4adba39d790f378afabb1e45416aff7c (diff)
downloadvyos-1x-de3c476ccb60d66a844f9e12a9ca2963ae2206e6.tar.gz
vyos-1x-de3c476ccb60d66a844f9e12a9ca2963ae2206e6.zip
ethernet: T3163: only change ring-buffer settings if required
Only update the RX/TX ring-buffer settings if they are different from the ones currently programmed to the hardware. There is no need to write the same value to the hardware again - this could cause traffic disruption on some NICs. (cherry picked from commit 29082959e0efc02462fba8560d6726096e8743e9)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-ethernet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py
index 57e05d4ea..f3f3fede8 100755
--- a/src/conf_mode/interfaces-ethernet.py
+++ b/src/conf_mode/interfaces-ethernet.py
@@ -79,11 +79,11 @@ def verify(ethernet):
f'settings to: {speed}/{duplex}!')
if 'ring_buffer' in ethernet:
- max_rx = ethtool.get_rx_buffer()
+ max_rx = ethtool.get_ring_buffer_max('rx')
if not max_rx:
raise ConfigError('Driver does not support RX ring-buffer configuration!')
- max_tx = ethtool.get_tx_buffer()
+ max_tx = ethtool.get_ring_buffer_max('tx')
if not max_tx:
raise ConfigError('Driver does not support TX ring-buffer configuration!')