Skip to content

[action] [PR:4674] [fdbsyncd]: Make VXLAN FDB delete idempotent#247

Merged
tahmed-dev merged 1 commit into
Azure:202606from
mssonicbld:cherry/msft-202606/4674
Jun 25, 2026
Merged

[action] [PR:4674] [fdbsyncd]: Make VXLAN FDB delete idempotent#247
tahmed-dev merged 1 commit into
Azure:202606from
mssonicbld:cherry/msft-202606/4674

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

What I did

Make duplicate VXLAN FDB delete handling idempotent in fdbsyncd by lowering the missing-entry path in FdbSync::macDelVxlan() from error-level logging to info-level logging.

This fixes the regression introduced by PR #4615 where an expected later kernel delete for a VXLAN FDB entry could log:

macDelVxlan: DEL_KEY <key> entry doesn't exist

That message was treated as a syslog error by loganalyzer in sonic-buildimage PR sonic-net/sonic-buildimage#27663, causing vxlan/test_vxlan_decap.py::test_vxlan_decap[Enabled] to fail even though the VXLAN decap dataplane test body passed.

Why I did it

When a remote/VXLAN-learned MAC is replaced by a local MAC, updateLocalMac() intentionally removes the entry from the VXLAN FDB cache. A later kernel delete event for the same VXLAN FDB entry is expected and should be a no-op, not an error.

Before PR #4615, this missing-cache-entry delete path was silently ignored. This change restores the idempotent behavior while still leaving an info-level trace for debugging.

How I did it

  • Changed the missing-entry log in FdbSync::macDelVxlan() from SWSS_LOG_ERROR to SWSS_LOG_INFO.
  • Extended the existing TestMacDelVxlan C++/GMock test to call macDelVxlan() twice and verify the cache remains empty after the duplicate delete.

How I verified it

Validated from sonic-buildimage using the official SONiC bookworm slave build flow:

BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb-clean
BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb

Results from target/debs/bookworm/swss_1.0.0_amd64.deb.log:

  • swss_1.0.0_amd64.deb built successfully.
  • dh_auto_test ran.
  • orchagent/p4orch/tests: 770 passed, 3 skipped, 0 failed, 0 errors.
  • tests/mock_tests: 1071 passed, 1 skipped, 0 failed, 0 errors.
  • tests: 70 passed, 0 failed, 0 errors.

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

#### What I did
Make duplicate VXLAN FDB delete handling idempotent in `fdbsyncd` by lowering the missing-entry path in `FdbSync::macDelVxlan()` from error-level logging to info-level logging.

This fixes the regression introduced by PR #4615 where an expected later kernel delete for a VXLAN FDB entry could log:

```text
macDelVxlan: DEL_KEY <key> entry doesn't exist
```

That message was treated as a syslog error by loganalyzer in `sonic-buildimage` PR sonic-net/sonic-buildimage#27663, causing `vxlan/test_vxlan_decap.py::test_vxlan_decap[Enabled]` to fail even though the VXLAN decap dataplane test body passed.

#### Why I did it
When a remote/VXLAN-learned MAC is replaced by a local MAC, `updateLocalMac()` intentionally removes the entry from the VXLAN FDB cache. A later kernel delete event for the same VXLAN FDB entry is expected and should be a no-op, not an error.

Before PR #4615, this missing-cache-entry delete path was silently ignored. This change restores the idempotent behavior while still leaving an info-level trace for debugging.

#### How I did it
- Changed the missing-entry log in `FdbSync::macDelVxlan()` from `SWSS_LOG_ERROR` to `SWSS_LOG_INFO`.
- Extended the existing `TestMacDelVxlan` C++/GMock test to call `macDelVxlan()` twice and verify the cache remains empty after the duplicate delete.

#### How I verified it
Validated from `sonic-buildimage` using the official SONiC bookworm slave build flow:

```bash
BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb-clean
BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb
```

Results from `target/debs/bookworm/swss_1.0.0_amd64.deb.log`:
- `swss_1.0.0_amd64.deb` built successfully.
- `dh_auto_test` ran.
- `orchagent/p4orch/tests`: 770 passed, 3 skipped, 0 failed, 0 errors.
- `tests/mock_tests`: 1071 passed, 1 skipped, 0 failed, 0 errors.
- `tests`: 70 passed, 0 failed, 0 errors.

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Original PR: sonic-net/sonic-swss#4674

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@tahmed-dev tahmed-dev merged commit 75220e5 into Azure:202606 Jun 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants