oxidecomputer / oxidecomputer/opte
Make MTU configurable at a Port level
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
While reviewing #260 I noticed a hard-coded MTU. This reminded me that we are also hard-coding this in other places like xde (search m_max_sdu).
We need to make this configurable at the Port level, so that each client can have its own MTU. This should then also be passed down via VPC config so that we can give VPC instances different MTUs in the future. For now Omicron should probably just hard-code the value for all instances -- the important bit is just that we get it in a place where it is configurable by the control plane.
There are two wrinkles here:
-
The MTU we supply to the Port should leave room for any encapsulation the network implementation may want to perform. In the case of VPC, we want to make sure we leave room for the IPv6/Geneve headers (and their potential options) tacked onto the instance's traffic.
-
The way things are architected, all OPTE Ports sit atop a single mac provider:
xde. It can only set one global MTU, based on the upstream links it is client to (in the Oxide Rack case that's currently two T6 NICs). I think what we can do is set the xde MTU to the maximum possible based on the underlying links. And then all Port's that sit atop xde need to verify that their MTU is less than or equal to xde's (with the caveat of point (1) in mind, that there is margin for any encap that needs doing).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching for hard-coded MTUs, especially m_max_sdu in xde, and trace how OPTE Ports receive configuration from VPC and the control plane. Map the Port-to-xde MTU checks and the encapsulation margin needed for IPv6/Geneve headers. Done means per-Port MTU configuration reaches VPC instances while xde uses a safe global maximum and rejects incompatible Port values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100