Skip to content

Commit 2b9c6ff

Browse files
authored
[action] [PR:24752] [lldp] Increase lldp netlink buffer limits to fix neighbors missing on swss restart (#1894)
Fixes "No buffer space available" issue in lldp during swss restart that casues neighbors to disappear in lldp. #### Why I did it When enough neighbors exit for a switch (>211), LLDP will stop reporting the last few neighbors after swss restarts. This happens even though the tcp packets from those neighbors are still arriving over the ports. This is because the netlink buffer is filled up when the restart occurs and the netlink delete messages are not received by lldp, this leads to the service not including the new neighbors over those ports, which will persist until lldp is restarted: root@sonic:/home/admin# docker exec -it lldp lldpcli show interfaces | grep -A 5 Ethernet520 Interface: Ethernet520 Administrative status: RX and TX Chassis: ChassisID: mac SysName: sonic SysDescr: SONiC Software Version: SONiC.202412_RC Interface: Ethernet520 Administrative status: RX and TX Chassis: ChassisID: mac SysName: sonic SysDescr: SONiC Software Version: SONiC.202412_RC root@sonic:/home/admin# show lldp table | grep "Ethernet520" root@sonic:/home/admin# LLDP buffer errors: syslog.1:2025 Dec 4 14:39:20.084820 sonic WARNING lldp#lldpd[30]: unable to receive netlink answer: No buffer space available syslog.1:2025 Dec 4 14:39:20.0850sonic INFO lldp#supervisord: lldpd 2025-12-04T14:39:20 [WARN/netlink] unable to receive netlink answer: No buffer space available #### How I did it By increasing both the minimum and maximum netlink receive buffer in LLDP I was able to fix this issue #### How to verify it Run: show lldp table systemctl restart swss Check without the change to see if the lldp buffer cannot handle all of the neighbors, then install a version of Sonic with the change to check that the larger buffer fixes this issue. #### Which release branch to backport (provide reason below if selected) - [x] 202412 - [x] 202505 #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> Increase lldp netlink buffer limits to fix neighbors missing on swss restart #### A picture of a cute animal (not mandatory but encouraged) ![3A7F956F-45C8-45FF-9CFE-FD168414887C_1_105_c](https://github.com/user-attachments/assets/edc90a39-0b08-436e-a5e0-a1aa1489a90b)
1 parent f829e66 commit 2b9c6ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lldpd/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
3333

3434
# Build source and Debian packages
3535
ifeq ($(CROSS_BUILD_ENVIRON), y)
36-
env "with_netlink_receive_bufsize=1024*1024" CFLAGS="-I $$CROSS_PERL_CORE_PATH" dpkg-buildpackage -rfakeroot -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
36+
env "with_netlink_receive_bufsize=2*1024*1024" "with_netlink_max_receive_bufsize=4*1024*1024" CFLAGS="-I $$CROSS_PERL_CORE_PATH" dpkg-buildpackage -rfakeroot -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
3737
else
38-
env "with_netlink_receive_bufsize=1024*1024" dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
38+
env "with_netlink_receive_bufsize=2*1024*1024" "with_netlink_max_receive_bufsize=4*1024*1024" dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
3939
endif
4040
popd
4141

0 commit comments

Comments
 (0)