Skip to content

[submodule][202503] Update submodule sonic-swss to the latest HEAD automatically#1488

Merged
mssonicbld merged 1 commit intoAzure:202503from
mssonicbld:submodule-202503-sonic-swss
Aug 9, 2025
Merged

[submodule][202503] Update submodule sonic-swss to the latest HEAD automatically#1488
mssonicbld merged 1 commit intoAzure:202503from
mssonicbld:submodule-202503-sonic-swss

Conversation

@mssonicbld
Copy link
Collaborator

Why I did it

src/sonic-swss

* d1cfece3 - (HEAD -> 202503, origin/202503) Merge pull request #125 from mssonicbld/sonicbld/202503-merge (23 hours ago) [mssonicbld]
* 6bd3ba34 - Merge branch '202412' of https://github.com/Azure/sonic-swss.msft into 202503 (23 hours ago) [Sonic Automation]
* ae7c6b32 - (origin/202412) Enhance return code handling for queryEnumCapabilitiesSai (#124) (2 days ago) [mssonicbld]

How I did it

How to verify it

Description for the changelog

@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld force-pushed the submodule-202503-sonic-swss branch from cd20c2c to 278226a Compare August 9, 2025 06:28
@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 80d3dfc into Azure:202503 Aug 9, 2025
9 of 17 checks passed
mssonicbld added a commit to mssonicbld/sonic-buildimage-msft that referenced this pull request Mar 21, 2026
…#26294)

#### Why I did it

When lldpd starts (or restarts), it sends the first LLDP frames with **MAC addresses as Port IDs** instead of the configured interface aliases (e.g., `Ethernet1/1`). This is because:

1. lldpd starts in paused state and loads its config file (`/etc/lldpd.conf`)
2. The config file only configures the management port (`eth0`) portidsubtype — no front-panel port configs exist
3. After processing all config lines, lldpd internally **auto-resumes** (hardcoded behavior in lldpd's internal lldpcli)
4. The first LLDP frames are sent with default MAC-based Port IDs
5. lldpmgrd starts 2-3 seconds later and reconfigures each port with the correct alias via `lldpcli`
6. This triggers an **MSAP change** (shutdown frame + new frame with correct Port ID) on every port

Peers see transient neighbor flapping: a MAC-based entry appears briefly, then gets replaced by the correct interface name entry. This can trigger monitoring alerts and confuse network management systems (e.g., LLDP-based topology discovery, automated cabling validation).

Related issues:
- Fixes Azure#1488
- Fixes Azure#1457

##### Work item tracking
- Microsoft ADO **37084792**:

#### How I did it

Added port ID subtype configuration for **all front-panel ports** directly in the `lldpd.conf.j2` Jinja2 template. The template iterates over the `PORT` table from ConfigDB and generates `configure ports <name> lldp portidsubtype local <alias>` lines for every port that has an alias defined.

These configuration lines are processed by lldpd during startup config loading, **before** the internal auto-resume fires. This ensures the very first LLDP frame already carries the correct interface alias as Port ID, eliminating the transient MAC-based Port ID window entirely.

The change is additive — lldpmgrd continues to handle dynamic port configuration changes at runtime. When lldpmgrd later processes the same ports, the portidsubtype is already correct, so no MSAP change occurs (only the port description gets added, which is expected).

**Key technical findings from investigation:**
- lldpd starts paused by default (the `pause` directive in config is actually redundant)
- lldpd's internal lldpcli auto-resumes after ALL config file lines are processed — this cannot be prevented via config
- The `resume` call in `waitfor_lldp_ready.sh` (from PR #5493) fires after auto-resume, so it's also redundant
- The `PORT` variable is available in sonic-cfggen template context from ConfigDB's PORT table

#### How to verify it

**Tested on:** Arista-7260CX3-C64 running SONiC.20251110.15 (64 front-panel ports)

**Test procedure:**
1. Applied the template change inside the lldp container
2. Verified template rendering: `sonic-cfggen -d -t /usr/share/sonic/templates/lldpd.conf.j2` — confirmed 67 portidsubtype lines (1 eth0 + 66 Ethernet ports)
3. Started tcpdump on Ethernet0: `tcpdump -i Ethernet0 -e ether proto 0x88cc -v`
4. Restarted lldp service: `systemctl restart lldp`
5. Captured the **very first** LLDP frame from the DUT

**tcpdump results — first frame after restart:**
```
07:38:41.610005 LLDP, length 233
 Chassis ID TLV (1), length 7
 Subtype MAC address (4): ec:8a:48:3c:e4:a8
 Port ID TLV (2), length 12
 Subtype Local (7): Ethernet1/1 <-- CORRECT from first frame!
 Time to Live TLV (3), length 2: TTL 120s
 System Name TLV (5), length 14: bjw-can-7260-8
```

**Before this fix**, the first frame showed:
```
 Port ID TLV (2), length 8
 Subtype MAC address (3): ec:8a:48:3c:e4:a8 <-- MAC address, WRONG
```

**Before:** MAC address as Port ID for 2-3 seconds → MSAP change → correct alias
**After:** Correct alias (`Ethernet1/1`) from the very first LLDP frame → no MSAP change

#### Which release branch to backport (provide reason below if selected)

- [ ] 202305
- [ ] 202311
- [ ] 202405
- [x] 202411
- [x] 202505
- [x] 202511

**Reason:** This race condition affects all SONiC versions using lldpd with the current startup architecture. The transient MAC-based Port ID causes neighbor flapping visible to peers on every LLDP container restart or device boot, which can trigger false alerts in production monitoring systems.

#### Tested branch (Please provide the tested image version)

- [x] SONiC.20251110.15 (master-based, Arista-7260CX3-C64)

#### Description for the changelog

Fix LLDP Port ID showing MAC address instead of interface name during daemon startup by pre-configuring portidsubtype in lldpd.conf.j2 template.

#### Link to config_db schema for YANG module changes

N/A — no ConfigDB or YANG schema changes.

#### A picture of a cute animal (not mandatory but encouraged)

🦔

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
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.

1 participant