Skip to content

neighsyncd: support link-local IPv6 on VLAN subinterfaces - #4708

Open
sudharr86 wants to merge 2 commits into
sonic-net:masterfrom
sudharr86:link-local-vlan-subintf
Open

sudharr86 wants to merge 2 commits into
sonic-net:masterfrom
sudharr86:link-local-vlan-subintf

Conversation

@sudharr86

@sudharr86 sudharr86 commented Jun 25, 2026 •

Copy link
Copy Markdown

Summary

Update neighsyncd so IPv6 link-local-only mode is honored for VLAN subinterfaces. The change also uses the common subinterface parser so canonical and short subinterface names are handled consistently.

Why

Neighbor sync already checks link-local-only mode for routed interfaces. VLAN subinterfaces need the same lookup path so their IPv6 link-local behavior is reflected correctly.

Changes

  • Check VLAN subinterface configuration when evaluating link-local-only mode.
  • Reuse the shared subinterface parser for subinterface name handling.
  • Add mock test coverage for VLAN subinterface link-local behavior.

Related

Validation

  • git diff --check upstream/master..HEAD
  • Reviewed the diff for unintended references.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

Copilot AI 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.

Pull request overview

This PR updates neighsyncd to honor IPv6 link-local-only mode for VLAN subinterfaces by reusing the shared subinterface name parser, ensuring consistent behavior across canonical (e.g., Ethernet0.10) and short (e.g., Eth0.10) subinterface names. It also introduces mock unit tests to validate the updated lookup logic against CONFIG_DB’s VLAN_SUB_INTERFACE table.

Changes:

  • Extend NeighSync::isLinkLocalEnabled() to treat valid subinterface names as VLAN_SUB_INTERFACE entries (via swss::subIntf).
  • Build/link subintf support into neighsyncd.
  • Add and register new mock unit tests covering VLAN subinterface link-local-only enable/disable behavior.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/mock_tests/neighsyncd/neighsync_ut.cpp Adds new mock unit tests for link-local-only behavior on VLAN subinterfaces (long and short names).
tests/mock_tests/Makefile.am Registers tests_neighsyncd and defines its build sources/linking.
neighsyncd/neighsync.h Adds CONFIG_DB table handle for VLAN_SUB_INTERFACE.
neighsyncd/neighsync.cpp Uses swss::subIntf parsing to route subinterface link-local-only lookups to VLAN_SUB_INTERFACE.
neighsyncd/Makefile.am Adds lib include path and links subintf.cpp into the daemon build.
.gitignore Ignores the new tests_neighsyncd test binary output.

Comment thread tests/mock_tests/Makefile.am Outdated
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@sudharr86
sudharr86 marked this pull request as ready for review July 2, 2026 13:49
@sudharr86
sudharr86 requested a review from prsunny as a code owner July 2, 2026 13:49
@prsunny

prsunny commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

@sudharr86 , please fix conflicts

@sudharr86
sudharr86 force-pushed the link-local-vlan-subintf branch from 60d2fd4 to 7cf08d4 Compare September 25, 2026 22:37
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@sudharr86

Copy link
Copy Markdown
Author

@prsunny Rebased the branch onto current master and resolved the conflicts in the neighsyncd mock-test files. GitHub now reports the PR as mergeable. I preserved the upstream test coverage while retaining the VLAN subinterface link-local cases. Thanks.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@sudharr86
sudharr86 force-pushed the link-local-vlan-subintf branch from 7cf08d4 to 7caf160 Compare September 25, 2026 22:38
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@croos12

croos12 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@sudharr86 @prsunny are you still looking at this PR?

@sudharr86

Copy link
Copy Markdown
Author

@sudharr86 @prsunny are you still looking at this PR?

Yes I am still on this. Resolved the conflicts last week.

Look up dotted Ethernet and PortChannel subinterfaces in VLAN_SUB_INTERFACE when deciding whether to accept IPv6 link-local neighbors.

This prevents neighsyncd from dropping link-local neighbors learned on VLAN subinterfaces when ipv6_use_link_local_only is enabled.

Signed-off-by: sudharr86 <203154411+sudharr86@users.noreply.github.com>
Use the shared swss::subIntf parser when classifying VLAN subinterfaces for IPv6 link-local neighbor processing.

This accepts both long names such as Ethernet0.10 and short names such as Eth0.10 while rejecting non-SONiC dotted interface names. Add mock tests for the supported and rejected cases.

Signed-off-by: sudharr86 <203154411+sudharr86@users.noreply.github.com>
@sudharr86
sudharr86 force-pushed the link-local-vlan-subintf branch from 7caf160 to 8eff2cd Compare October 2, 2026 22:48
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@sudharr86

Copy link
Copy Markdown
Author

@croos12 @prsunny Rebased again onto current master and resolved the new overlap introduced by #4948 in tests/mock_tests/neighsyncd/neighsync_ut.cpp. The resolution preserves both the upstream non-VLAN recovery tests and this PRs VLAN subinterface link-local tests. GitHub now reports the PR as mergeable. Fresh CI is being requested on the updated head.

@sudharr86

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 4708 in repo sonic-net/sonic-swss

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

11 similar comments
@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi @sonic-net/sonic-swss-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

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.

6 participants