[Bug 1956264] Re: Cannot set offload options to false
Launchpad Bug Tracker
1956264 at bugs.launchpad.net
Wed Aug 3 06:40:16 UTC 2022
This bug was fixed in the package netplan.io - 0.104-0ubuntu2~20.04.2
---------------
netplan.io (0.104-0ubuntu2~20.04.2) focal; urgency=medium
* Cherry pick d/p/dbus-Remove-the-upper-limit-on-try-timeout.patch
(LP: #1967084)
* Cherry-pick fix for rendering WPA3 password (8934a1b), LP: #1975576
+ d/p/0010-nm-fix-rendering-of-password-for-unknown-passthrough.patch
* Backport offloading tristate patches (LP: #1956264)
+ d/p/0003-Add-tristate-type-for-offload-options-LP-1956264-270.patch
+ d/p/0004-tests-ethernets-fix-autopkgtest-with-alternating-def.patch
+ d/t/control: add 'ethtool' test-dep for link offloading tests
-- Lukas Märdian <slyon at ubuntu.com> Wed, 29 Jun 2022 17:54:23 +0200
** Changed in: netplan.io (Ubuntu Focal)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1956264
Title:
Cannot set offload options to false
Status in netplan:
Fix Committed
Status in netplan.io package in Ubuntu:
Fix Released
Status in netplan.io source package in Focal:
Fix Released
Status in netplan.io source package in Impish:
Won't Fix
Status in netplan.io source package in Jammy:
Fix Released
Status in netplan.io source package in Kinetic:
Fix Released
Bug description:
[Impact]
In https://bugs.launchpad.net/netplan/+bug/1771740, the ability to set the offload options that are exposed by systemd.link was added. Unfortunately, the implementation only allows setting the offload options to true. Setting the options to false results in nothing being written to the generated .link file, because "false" is treated the same as "unset" by netplan.
[Test Plan]
In addition to running & passing the full set of unit- and integration-tests
(that contains new tests to check for this new feature), as described in
https://wiki.ubuntu.com/NetplanUpdates we want to run the following commands
to make sure the link offload stanza is working properly:
$ cat /etc/netplan/test.yaml
network:
version: 2
ethernets:
eth1:
receive-checksum-offload: false
transmit-checksum-offload: false
tcp-segmentation-offload: false
tcp6-segmentation-offload: false
generic-segmentation-offload: false
generic-receive-offload: false
large-receive-offload: false
$ netplan apply
$ cat /run/systemd/network/10-netplan-eth1.link | grep Offload
=> Make sure the *Offload settings are correctly set to "=false".
$ ethtool -k eth1
=> Make sure the offloading options have been set to "off":
rx-checksumming: off
tx-checksumming: off
tcp-segmentation-offload: off
tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off
$ reboot
$ ethtool -k eth1
=> Make sure the offloading options have been set to "off" after reboot:
rx-checksumming: off
tx-checksumming: off
tcp-segmentation-offload: off
tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off
Furthermore, we want to validate the device renaming still works as expected and the new "udev test IFACE" call in "netplan apply" does not have side effects:
$ ip addr
=> observe interface name, e.g. "enp5s0"
$ netplan get # update your netplan config to match this output, adapting the MAC address of enp5s0
network:
version: 2
ethernets:
id0:
match:
macaddress: "00:16:3e:1a:23:dd"
dhcp4: true
dhcp6: true
set-name: "eth99"
$ netplan apply
$ ip addr
=> observe that "enp5s0" got renamed to "eth99"
$ netplan set ethernets.id0.set-name=eth42
$ netplan get
network:
version: 2
ethernets:
id0:
match:
macaddress: "00:16:3e:1a:23:dd"
dhcp4: true
dhcp6: true
set-name: "eth42"
$ reboot
=> observe the interface's name has now changed to "eth42"
autopkgtest logs:
* Jammy:
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/jammy-amd64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/jammy-arm64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/jammy-armhf.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/jammy-ppc64el.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/jammy-s390x.log
* Impish: EOL
* Focal:
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/focal-amd64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/focal-arm64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/focal-armhf.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/focal-ppc64el.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1956264/focal-s390x.log
[Where problems could occur]
* The settings exist since systemd-232 which means Bionic and up can use
this feature
This upload touches netplan's generator, if anything goes wrong it could impact
the rendering of network configuration and break a system's network connectivity
[Other Info]
The full set of autopkgtest logs will be attached after the upload is accepted
into -proposed and the tests have been run on the official autopkgtest.u.c
infrastructure.
=== original description ===
In https://bugs.launchpad.net/netplan/+bug/1771740, the ability to set
the offload options that are exposed by systemd.link was added.
Unfortunately, the implementation only allows setting the offload
options to true. Setting the options to false results in nothing being
written to the generated .link file, because "false" is treated the
same as "unset" by netplan.
See the current implementation
https://git.launchpad.net/netplan/tree/src/networkd.c#n260.
netplan needs to handle three different values for the offload
options: "true", "false", and "unset"
(I have a specific case in mind,
https://bugzilla.kernel.org/show_bug.cgi?id=118721, where I need to
set TSO to off when using the e1000e driver. The current netplan
implementation does not support that; as a workaround I created a
separate .link file in /etc/systemd/network to disable TSO.)
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1956264/+subscriptions
More information about the foundations-bugs
mailing list