Repository navigation
(17g) lldp: fast start, shutdown ordering, and a required datapath namespace - #1925
Draft
daniel-noland wants to merge 3 commits into
Draft
daniel-noland wants to merge 3 commits into
daniel-noland wants to merge 3 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
This was referenced Oct 16, 2026
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
daniel-noland
force-pushed
the
pr/daniel-noland/lldp-receive
branch
from
October 16, 2026 05:47
897dec6 to
87e0037
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/lldp-lifecycle
branch
from
October 16, 2026 05:47
a7a9da1 to
1d2adae
Compare
IEEE 802.1AB-2016 9.2.9: hearing a neighbour we did not know sets newNeighbor, and the transmit timer machine tells it about us at once and then sends fast (txFastInit frames, msgFastTx apart), so a newcomer learns about us as quickly as we learned about it. The transmitter takes a per-port `new_neighbor` watch. A new neighbour while steady sends now and goes fast; while already fast, the send counts as one of the fast ones rather than lengthening the burst; while silent it waits for the port to come up, whose own fast start covers it. The receive task signals the port's transmitter whenever its table reports a neighbour as new, and only then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
On SIGTERM, `drain_in_order` cancelled the workers first and mgmt last. LLDP ran under mgmt, so the shutdown frame it sends on the way out was queued after the datapath had stopped draining the injection queue, and never left: neighbours kept us until our TTL (121 s) ran out. - lifecycle: add a `protocols` subsystem for control-plane protocols that send through the datapath, drained before the workers. - lldp: on stop, wait (at most 500 ms) for the sink to report it has taken everything queued, so the frame has actually left before the workers are cancelled. `FrameSink::is_drained` defaults to true; an mpsc sender is drained when its capacity is back to the maximum. - dataplane: run the LLDP tasks under `protocols`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Init hands both drivers' interfaces a namespace of their own (#1890, and #1929 for the kernel driver), so the datapath namespace is never the one the dataplane runs in. The runtime still skipped the control-plane bridge when it was, a branch left over from before that move: unreachable, and wrong if it were reached, since the bridge is the control plane's only path to the wire (and LLDP's). Treat a shared namespace as the startup failure it is, and always build the bridge. The bridge stays optional through the drivers for now, since the bridge-failure path and the driver tests still pass `None`; making it required belongs with the cleanup of the namespace chapter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
daniel-noland
force-pushed
the
pr/daniel-noland/lldp-lifecycle
branch
from
October 16, 2026 08:43
1d2adae to
5934986
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/lldp-receive
branch
from
October 16, 2026 08:43
87e0037 to
15c4688
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native LLDP for the gateway. The dataplane owns its NICs, so nothing else can speak LLDP for them, and
lldpd/lldpadare hostile to automation. LLDP itself is small, so the dataplane transmits and receives it.This used to be one PR. It is now a stack of seven, each building on the one before:
net: TLV framing and the mandatory TLVsnet: the optional TLVsnet: the LLDPDU andHeaders::parselldp: the transmitter and the neighbour tabledataplane: advertise on every portdataplane: hear neighbours,show lldp neighbors, all-multicastStacked on (16) #1905, capture. (18) #1907, rate limiting, and (19) #1919, traffic protection, build on top.
This PR: fast start, shutdown ordering, and a required datapath namespace
newNeighbor). When the table learns a neighbour, that port's transmitter fast-starts, so the newcomer learns about us as quickly as we learned about it.drain_in_orderused to cancel the workers first, so a shutdown frame sent by a mgmt task never left.lifecyclegains aprotocolssubsystem, drained before the workers. On stop, the transmitter waits up to 500 ms for its injection queue to drain.Testing
lifecycle: protocols see the workers still running while they shut down.Not covered
🤖 Generated with Claude Code