Skip to content

Preserve static neighbors during interface reload - #335

Open
ezhk wants to merge 2 commits into
mainfrom
agent/preserve-static-neighbors-on-reload
Open

Preserve static neighbors during interface reload#335
ezhk wants to merge 2 commits into
mainfrom
agent/preserve-static-neighbors-on-reload

Conversation

@ezhk

@ezhk ezhk commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve configured static neighbors while interface generations switch
  • remap neighbor keys using the previous interface generation
  • make deferred neighbor-table updates own their OS and static-entry data
  • add a regression test covering an interface ID change

Root cause

neighbor_update_interfaces switched and garbage-collected the previous interface map before DumpOSNeighbors rebuilt the neighbor table. Static entries could no longer be translated to the new interface IDs, so the rebuild could publish a table without them during an asynchronous reload and packets were dropped.

The deferred generation update also captured the dump and static-entry vectors by reference. The callback now owns those vectors so they remain valid until it runs.

Impact

Reloads retain existing static neighbors while new interface IDs are applied, avoiding transient packet loss such as the first-packet miss in 049_balancer_reload.

Validation

  • full yanet-dataplane-unittest-neighbor: 3 tests passed
  • autotest/units/001_one_port/049_balancer_reload: passed all packet stages
  • dataplane target rebuilt successfully
  • git diff --check: clean

@ezhk
ezhk marked this pull request as ready for review August 4, 2026 13:12
@ezhk
ezhk requested a review from GeorgyKirichenko as a code owner August 4, 2026 13:12
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.

1 participant