Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle EINVAL when enabling VLAN filtering on Linux 6.12#5304

Merged
rene merged 1 commit into
lf-edge:masterfrom
milan-zededa:vlan-filtering-kernel-6.12
Oct 14, 2025
Merged

Handle EINVAL when enabling VLAN filtering on Linux 6.12#5304
rene merged 1 commit into
lf-edge:masterfrom
milan-zededa:vlan-filtering-kernel-6.12

Conversation

@milan-zededa

@milan-zededa milan-zededa commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

Description

On Linux 6.12, attempting to enable VLAN filtering on a bridge that is not yet ready may return EINVAL instead of EBUSY. Update VLANBridgeConfigurator to treat both EBUSY and EINVAL as indications that the bridge is busy, ensuring proper retry behavior.

Note that the code retries for up to 1 minute. If EINVAL occurs due to an actual invalid argument, the error will eventually be returned instead of looping indefinitely.

How to test and validate this PR

  1. Onboard an edge node running an EVE version with the Linux kernel 6.12.
  2. Deploy a Switch Network Instance.
  3. Deploy an application connected to the Switch NI using a VLAN access port.
  4. Verify that both the Network Instance and the application are reported as deployed successfully (no errors in the controller UI or logs).
  5. SSH into the edge node and confirm that VLAN filtering is enabled on the bridge associated with the Switch NI.

Example (for a Switch NI attached to eth0):

# In this example, Switch NI is attached to eth0.
# Notice "vlan_filtering 1"

$ eve enter
$ ip -d link show dev eth0
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 02:fe:22:1a:87:00 brd ff:ff:ff:ff:ff:ff promiscuity 3 minmtu 68 maxmtu 65535 
    bridge forward_delay 1500 hello_time 200 max_age 2000 ageing_time 30000 stp_state 0 priority 32768 vlan_filtering 1 vlan_protocol 802.1Q bridge_id 8000.02:FE:22:1A:87:00 designated_root 8000.02:FE:22:1A:87:00 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer    0.00 tcn_timer    0.00 topology_change_timer    0.00 gc_timer  284.16 vlan_default_pvid 1 vlan_stats_enabled 0 vlan_stats_per_port 0 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_vlan_snooping 0 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 16 mcast_hash_max 4096 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

Changelog notes

Support VLAN filtering on Linux 6.12

PR Backports

Only needed for Linux kernel 6.12, which is yet to be merged into master.
Not to be backported to already released LTS versions.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've checked the boxes above, or I've provided a good reason why I didn't check them.

On Linux 6.12, attempting to enable VLAN filtering on a bridge that is not yet
ready may return EINVAL instead of EBUSY. Update VLANBridgeConfigurator to
treat both EBUSY and EINVAL as indications that the bridge is busy, ensuring
proper retry behavior.

Note that the code retries for up to 1 minute. If EINVAL occurs due to an actual
invalid argument, the error will eventually be returned instead of looping
indefinitely.

Signed-off-by: Milan Lenco <[email protected]>
@milan-zededa milan-zededa self-assigned this Oct 13, 2025
@milan-zededa milan-zededa added the main-quest The fate of the project rests on this PR. Prioritise review to advance the storyline! label Oct 13, 2025
@github-actions github-actions Bot requested a review from eriknordmark October 13, 2025 16:41
@milan-zededa milan-zededa requested review from rene and rucoder October 13, 2025 16:41

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rene rene left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM as well (will not approve again because it's approved already and Eden tests are running)...

@milan-zededa

Copy link
Copy Markdown
Contributor Author

I run the LPS/LOC test suite locally and it passes fine.
Do not understand why it failed here, probably slow runners or something.

@rene rene merged commit 4547563 into lf-edge:master Oct 14, 2025
45 of 46 checks passed
@rucoder rucoder mentioned this pull request Oct 14, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main-quest The fate of the project rests on this PR. Prioritise review to advance the storyline!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants