SONiC-VPP t0 Fix missed svi neighbors.#1997
Open
dypet wants to merge 1 commit into
Open
Conversation
Signed-off-by: dypet <dypeters@cisco.com>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
dypet
marked this pull request as ready for review
July 20, 2026 14:17
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
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.
Description of PR
Summary:
Fixes # (issue)
This PR fixes IP neighbors on VLAN SVIs (
Vlan<id>interfaces) never beingprogrammed into the VPP data plane, which caused routed uplink→downlink
traffic destined to hosts on a VLAN to be silently dropped.
In the VPP virtual-switch (
vslib/vpp), the neighbor-programming pathSwitchVpp::addRemoveIpNbr()only handled router interfaces (RIFs) of typePORTandSUB_PORT. It unconditionally queriedSAI_ROUTER_INTERFACE_ATTR_PORT_IDup front, but a VLAN SVI RIF(
SAI_ROUTER_INTERFACE_TYPE_VLAN) has noPORT_IDattribute (it points at aVLAN, not a single port). As a result the lookup failed and the neighbor was
dropped before the RIF type was ever examined — and
VLANwas not an acceptedtype anyway. The corresponding bridge-virtual interface (
bvi<vlanid>) in VPPtherefore had no rewrite adjacency for those hosts, so L3 traffic routed toward
VLAN hosts had nowhere to go.
This PR teaches the neighbor path to recognize VLAN SVI RIFs and program the
neighbor against the bridge-virtual interface (BVI), and hardens the FDB/BVI
bring-up path with return-code checking, rollback, tracking, and diagnostic
logging so the underlying bridge-domain plumbing the fix depends on cannot fail
silently.
Type of change
Approach
What is the motivation for this PR?
Hosts attached to a VLAN reach the rest of the network through the VLAN's SVI
(
Vlan<id>), whose L3 endpoint in VPP is the bridge-virtual interfacebvi<vlanid>. The kernel resolves those host neighbors on theVlan<id>netdev, and neighsyncd/orchagent push them down via SAI. Because these VLAN
neighbors were being dropped before reaching VPP, the BVI never got an
adjacency for them and routed traffic to VLAN hosts was blackholed. This makes
L3-to-VLAN forwarding (e.g. routed uplink→downlink to a host on a VLAN)
work on the VPP platform.
Work item tracking
How did you do it?
vslib/vpp/SwitchVppNbr.cpp(addRemoveIpNbr):PORT_IDlookup.SAI_ROUTER_INTERFACE_TYPE_VLANin addition toPORTandSUB_PORT.PORT_ID(and, for sub-ports,OUTER_VLAN_ID) lookup forthe
PORT/SUB_PORTcases.VLANRIF, resolve the VLAN id (RIFVLAN_IDattr → the VLAN object'sVLAN_IDattr) and target the neighbor atbvi<vlanid>. This builds acomplete rewrite adjacency on the BVI (dst = host MAC, tx =
bvi<vlanid>).BVI→bridge-domain delivery to the specific member port then happens through
the existing L2 FIB (unicast if the host MAC is learned, flood otherwise), so
no explicit l2fib entry is required.
vslib/vpp/SwitchVppFdb.cpp(vpp_create_vlan_member,vpp_create_bvi_interface,vpp_delete_bvi_interface) — hardening of the SVI/bridge-domain infrastructurethe fix relies on:
(
create_sub_interface,set_sw_interface_l2_bridge,set_l2_interface_vlan_tag_rewrite,interface_set_state,create_bvi_interface,configure_lcp_interface) and log descriptive errors.delete_sub_interface,delete_bvi_interface) and returnSAI_STATUS_FAILURE; continue best-efforton softer failures.
swif → bridge-domainmap on create(
swif_bdid_track) and untrack it on delete (swif_bdid_untrack), matchingmember tracking, so FDB-notification / port-invalidation logic sees a
complete view of the bridge domain.
member add and after BVI setup, so a
VLAN_MEMBERthat silently fails to landin the BD is visible in the logs rather than only surfacing as a failed
data-plane test.
How did you verify/test it?
Ran T0 sonic-mgmt testsuite with SONiC-VPP and this fix, verified by the ACL test case improvement:
test_acl.py — the ACL tests drive traffic
uplink<->downlinkthrough theVlan1000SVI, souplink->downlinkcasesdepend on routed traffic reaching a host on the VLAN via the BVI adjacency this
fix programs:
test_acl: 284 passed / 100 failures / 8 errors → 384 passed / 0 failures / 0 errorsAnd no regressions seen in other testcases between the two runs.
Any platform specific information?
SONiC-VPP virtual-switch platform only. Changes are confined to
vslib/vpp(
SwitchVppNbr.cpp,SwitchVppFdb.cpp) and do not affect other ASICplatforms.
Documentation
No documentation/Wiki update required.