lldp: time the transmit interval from the system tick

lldp_tick counted main-loop passes, so the 6000 meant for 30 s at
SYS_TICK_HZ ran at whatever rate the loop happened to have, and the
interval moved with httpd and SFP load. Step once per second from the
tick counter like the STP timers do, count seconds to the interval and
derive the TTL from it with the 802.1AB hold multiplier of 4.
This commit is contained in:
d00f committed 2026-10-14 13:06:02 +02:00
1 parent 8224b06f9e
commit bf77a7f1c5
2 files changed
+15 -9

No files matched your search

+3 -2
View File
@@ -7,7 +7,8 @@
#define LLDP_ETHERTYPE 0x88cc
#define LLDP_ETHERTYPE_LENGTH 2
#define LLDP_MAX_FRAME 256
#define LLDP_TX_INTERVAL_TICKS 6000
#define LLDP_TX_INTERVAL_S 30
#define LLDP_HOLD_MULTIPLIER 4
#define LLDP_PORT_ID_TLV_TYPE 2
#define LLDP_PORT_ID_TLV_LENGTH 0x02
@@ -15,7 +16,7 @@
#define LLDP_TTL_TLV_TYPE 3
#define LLDP_TTL_TLV_LENGTH 2
#define LLDP_TTL_TTL_SECONDS 120
#define LLDP_TTL_TTL_SECONDS (LLDP_HOLD_MULTIPLIER * LLDP_TX_INTERVAL_S)
#define LLDP_CHASSIS_ID_TLV_TYPE 1
#define LLDP_CHASSIS_ID_TLV_LENGTH 7