Skip to content
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

Allow to use network port with VLAN-subinterfaces for untagged traffic #4444

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented Nov 20, 2024

With this enhancement, user will be able to use VLAN parent interface as an L3 endpoint and access the untagged network either for EVE management or from an application via Local network instance.

Some changes were required to allow having SystemAdapter assigned to a network port (physical or bond) which is at the same time referenced by a VLAN sub-interface. Previously, this was not allowed and resulted in parsing errors published to the controller.

In terms of the Linux network configuration, not many changes were required. We simply allow assigning static IP or running DHCP client even for VLAN parent interface.
The only scenario which is not allowed, is to bridge network port and at the same time use it with VLAN sub-interfaces. This means that accessing untagged network from a Switch NI is not allowed when the port is already used with VLAN subinterfaces.

Submitted example to eden: lf-edge/eden#1043 (later will be rewritten to Go test)

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions about naming/comments.
Kicking off tests in parallel.

FWIW I ran it through my ztests setup - primarily to check if the old hardware models which don't have logicallabel set would run into trouble. No issues found.

With this enhancement, user will be able to use VLAN parent interface
as an L3 endpoint and access the untagged network either for EVE
management or from an application via Local network instance.

Some changes were required to allow having SystemAdapter assigned
to a network port (physical or bond) which is at the same time
referenced by a VLAN sub-interface. Previously, this was not allowed
and resulted in parsing errors published to the controller.

In terms of the Linux network configuration, not many changes were
required. We simply allow assigning static IP or running DHCP client
even for VLAN parent interface.
The only scenario which is not allowed, is to bridge network port and
at the same time use it with VLAN sub-interfaces. This means that
accessing untagged network from a Switch NI is not allowed when the port
is already used with VLAN subinterfaces.

Signed-off-by: Milan Lenco <milan@zededa.com>
reflect.DeepEqual is quite expensive so let's compare Bond
fields manually and using more efficient methods from the generics
package.

Signed-off-by: Milan Lenco <milan@zededa.com>
@eriknordmark eriknordmark merged commit a783bfc into lf-edge:master Nov 25, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants