summaryrefslogtreecommitdiff
path: root/src/conf_mode
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 21:50:05 +0200
commit29082959e0efc02462fba8560d6726096e8743e9 (patch)
tree6658b8f81638827d4584d7671f1b72b005d81f4d /src/conf_mode
parent6f5fb5c503b5df96d0686002355da3633b1fc597 (diff)
downloadvyos-1x-29082959e0efc02462fba8560d6726096e8743e9.tar.gz
vyos-1x-29082959e0efc02462fba8560d6726096e8743e9.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.
Diffstat (limited to 'src/conf_mode')
-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 889f4856f..f604f787c 100755
--- a/src/conf_mode/interfaces-ethernet.py
+++ b/src/conf_mode/interfaces-ethernet.py
@@ -89,11 +89,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!')