Skip to content

Conversation

@AmandaCameron
Copy link
Contributor

Fixes #723 -- I'm not entirely happy with the option name I chose, but I'm not great at naming things, so if there's a better name do let me know. Passes go test locally, but didn't try in a VM yet, need to get mkosi installed on my laptop first.

@AmandaCameron
Copy link
Contributor Author

Testing in a local VM is turning out to be more complicated than I expected. Seems make test assumes incus is running locally, when I've only got it available remotely, or via a libvirt instance of incusos

@stgraber
Copy link
Member

stgraber commented Dec 21, 2025

I don't think we want to get an extra entry in that struct for every type of offload, so having a sub-struct for it is probably best.

Something like:

type SystemNetworkOffloading struct {
    DisableGRO bool `json:"disable_gro,omitempty" yaml:"disable_gro,omitempty"`
    DisableGSO bool `json:"disable_gso,omitempty" yaml:"disable_gso,omitempty"`
    DisableIPv4TSO bool `json:"disable_ipv4_tso,omitempty" yaml:"disable_ipv4_tso,omitempty"`
    DisableIPv6TSO bool `json:"disable_ipv6_tso,omitempty" yaml:"disable_ipv6_tso,omitempty"`
}

For now they're all "disable" flags for offloads that should be there, but that could also start getting positive values for offloading that's typically disabled.

@stgraber
Copy link
Member

stgraber commented Dec 21, 2025

Then both SystemNetworkInterface and SystemNetworkBond would need to get a Offloading SystemNetworkOffloading struct field to contain those flags.

@AmandaCameron
Copy link
Contributor Author

Implemented separate switches for the ones you listed.

I went with making them just be unmentioned if they're not set to disabled, because I didn't want to risk the code causing them to be turned on when the kernel has them off for some reason, causing potential problems.

@AmandaCameron
Copy link
Contributor Author

ah, forgot I switched my git email, will fix the DCO now

@stgraber
Copy link
Member

Thanks, I'll take a look, tweak a bit and land it!

Other ethtool flags were brought up on the forum today (energy efficient ethernet) so I'm going to check if that makes sense to still fit under Offloading or if we need an even more generic thing like Ethernet or something instead for those flags.

@stgraber stgraber force-pushed the networkd/tso-disable branch from 303f1ca to d7418df Compare December 22, 2025 22:24
@stgraber
Copy link
Member

@gibmat given my additions on this one, can you give this a quick review?

@stgraber stgraber changed the title incus-osd: Add option to disable hw segmentation offloading Add ethernet settings on physical network interfaces Dec 22, 2025
@stgraber stgraber force-pushed the networkd/tso-disable branch from d7418df to 530df11 Compare December 22, 2025 22:35
@cfouche3005
Copy link

Does the WOL settings (#638) also related to this ? Should they also be add to this PR ?

@stgraber
Copy link
Member

They'll most likely get added to that struct. I was going to take a look at that next once this one is in with the general infrastructure for this.

@stgraber stgraber force-pushed the networkd/tso-disable branch from 530df11 to cd21abf Compare December 23, 2025 16:16
@stgraber
Copy link
Member

@gibmat should be good to go. I updated the API and filed an issue so we can keep track switching to text/template in the future.

@gibmat gibmat enabled auto-merge December 23, 2025 16:24
@gibmat gibmat merged commit 1b445b8 into lxc:main Dec 23, 2025
6 checks passed
@AmandaCameron
Copy link
Contributor Author

Will this require waiting for incus 1.21 or will this just work when the stable incusos branch is next updated? I ask because this being a blocker is exactly what motivated me to make the PR in the first place. (Buggy e1000e hw <-> driver interactions)

@stgraber
Copy link
Member

@AmandaCameron it will be in the next testing and then stable IncusOS image.
We have a few more things landing right now but there's a good chance I'll tag a testing image later today or tomorrow and we'll be pushing something to stable this week.

@AmandaCameron
Copy link
Contributor Author

Got it, hopefully I can switch my remaining two incus nodes to incusos sometime soon then. Having to physically go and detach/reatatch the ethernet cable on the single NUC i did as a canary is a bit tedius, and halted my migration entirely.

@AmandaCameron AmandaCameron deleted the networkd/tso-disable branch December 23, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add support for disabling tcp segmentation offloading for an interface

4 participants