-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T6716: don't automatically set ethernet offload #4077
Conversation
👍 |
✅ No issues found in unused-imports check.. Please refer the workflow run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One modification that we may want to consider: only set in config during live boot, before installation:
diff --git a/src/activation-scripts/20-ethernet_offload.py b/src/activation-scripts/20-ethernet_offload.py
index 33b0ea469..4c7d8b521 100755
--- a/src/activation-scripts/20-ethernet_offload.py
+++ b/src/activation-scripts/20-ethernet_offload.py
@@ -20,6 +20,7 @@
from vyos.ethtool import Ethtool
from vyos.configtree import ConfigTree
+from vyos.system.image import is_live_boot
def activate(config: ConfigTree):
base = ['interfaces', 'ethernet']
@@ -36,7 +37,7 @@ def activate(config: ConfigTree):
enabled, fixed = eth.get_generic_receive_offload()
if configured and fixed:
config.delete(base + [ifname, 'offload', 'gro'])
- elif enabled and not fixed:
+ elif is_live_boot() and enabled and not fixed:
config.set(base + [ifname, 'offload', 'gro'])
# If GSO is enabled by the Kernel - we reflect this on the CLI. If GSO is
... etc. It will still hold that after installation, activation will not enable against user settings.
Remove the lines of code that checked if the kernel had offloading enabled and was then forcing the config to set it to "on." The behavior now mirrors the config and offloading will only be enabled if the config is explicitly set to enabled. Note: the code is still present to disable the offloading, in the config, if the kernel doesn't support it. Note(2): Allow the previous behavior where the offload settings get set, based on the Kernel, if the boot is a live boot.
cc2ac9a
to
b6c2a74
Compare
I like @jestabro suggestion and updated the PR commit to reflect. |
@Mergifyio backport circinus |
✅ Backports have been created
|
Change Summary
Remove the lines of code that checked if the kernel had offloading enabled and was then forcing the config to set it to "on." The behavior now mirrors the config and offloading will only be enabled if the config is explicitly set to enabled.
Note: the code is still present to disable the offloading, in the config, if the kernel doesn't support it.
Types of changes
Related Task(s)
https://vyos.dev/T6716
Related PR(s)
Component(s) name
Ethernet activation script (20-ethernet_offload.py)
Proposed changes
Delete lines of code that set the ethernet offload setting based on the Kernel offload setting.
How to test
On a system where the kernel enables offloading at boot and/or the offload is currently set in the config:
No offloading settings should be shown. On VyOS 1.5, without this PR, the offload settings will automatically be restored.
Smoketest result
Checklist: