lf-edge / eve

EVE is Edge Virtualization Engine
https://www.lfedge.org/projects/eve/
Apache License 2.0
470 stars 159 forks source link

Implement configurable device port MTU #3987

Closed milan-zededa closed 3 months ago

milan-zededa commented 3 months ago

User is now able to set the MTU inside the Network object assigned to device network port (aka SystemAdapter). By default (if not set), EVE will set the default MTU size, which depends on the network adapter type. Ethernet and WiFi adapters default to 1500 bytes, while cellular modems typically receive their MTU value from the network provider, which EVE will use unless the user overrides the MTU value.

For Ethernet and WiFi ports, MTU is applied by NIM microservice. For cellular modems, MTU is managed by the wwan microservice.

As part of this commit, few changes in the area of config items of DPC Reconciler were done. For example, PhysIf and IOHandle were refactored into:

Please note that this commit does not include MTU support for network instances and applications. That part of the MTU support was split and will be delivered as a separate commit.

milan-zededa commented 3 months ago

Question: why do we need a configurable MTU for vlan interfaces? Can't we just assume that the vlan interface has the same MTU as the parent?

Similarly for bonds; instead of having a configurable MTU for the bond interface, can't we just check/require that each underlying port has the same MTU, and then have the bond interface use that MTU?

I don't see a case where you'd want to configure those any differently.

The problem is that MTU is configured inside Network, which is then assigned to top-level "L3" adapters (to create "SystemAdapter"). This means that each VLAN sub-interface will get its own MTU config, while there will be no L3 config for its parent. Similarly for bonds. (so it is more of a matter of EVE API)

eriknordmark commented 3 months ago

The problem is that MTU is configured inside Network, which is then assigned to top-level "L3" adapters (to create "SystemAdapter"). This means that each VLAN sub-interface will get its own MTU config, while there will be no L3 config for its parent. Similarly for bonds.

OK