Repository navigation
fix(saiserver): preserve hybrid port VLAN memberships across tagging modes - #755
Open
mohankarthik wants to merge 1 commit into
Open
mohankarthik wants to merge 1 commit into
mohankarthik wants to merge 1 commit into
Conversation
mohankarthik
force-pushed
the
fix-hybrid-vlan-member
branch
from
October 13, 2026 17:55
9188d3b to
dce6113
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #750 fixing hybrid and multi-VLAN port handling,
RemoveVlanMembercleanup, andvlanmap thread safety onmain:vlanMap Access (vlan.mu):vlan.membersandvlan.vlans(vidByOid,oidByVid,memberByOid,memberByPortId,untaggedMemberByPortId,hasTaggedMember,CreateVlan,CreateVlanMember,RemoveVlanMember,Reset) withvlan.mu(sync.RWMutex).untaggedMemberByPortId):CreateVlanMembercalledmemberByPortId(portID)and deleted any existing VLAN membership on the port before adding the new one.memberByPortIdeviction withuntaggedMemberByPortId(portID)and only evict when the new membership isUNTAGGED/PRIORITY_TAGGED, allowing multipleTAGGEDVLANs (trunk port) and oneUNTAGGEDnative VLAN +TAGGEDVLANs (hybrid port) to coexist regardless of creation order.RemoveVlanMemberLifecycle:MemberListattribute inattrmgr.VlanTableaccording to the remaining memberships (restoring untaggedEncap(ETHERNET_VLAN)+Update(VLAN_TAG)actions when the lastTAGGEDmembership is removed from a hybrid port); when no memberships remain on the port, remove itsVlanTableentry viaTableEntryRemove.vlan_test.go):&&->||assertion bug inTestVlanOperations.TestCreateVlanMemberHybridPortcoveringUNTAGGED->TAGGED,TAGGED->UNTAGGED, multi-VLANTAGGEDtrunk ports, untagged VLAN replacement on a hybrid port, and tagged/untagged member removal.