Skip to content

(17b) net: model the optional LLDP TLVs - #1920

Merged
daniel-noland merged 1 commit into
pr/daniel-noland/dpdk-initfrom
pr/daniel-noland/lldp-optional-tlvs
Oct 20, 2026
Merged

daniel-noland merged 1 commit into
pr/daniel-noland/dpdk-initfrom
pr/daniel-noland/lldp-optional-tlvs

Conversation

@daniel-noland

@daniel-noland daniel-noland commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Native LLDP for the gateway. The dataplane owns its NICs, so nothing else can speak LLDP for them, and lldpd/lldpad are 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:

Stacked on (16) #1905, capture. (18) #1907, rate limiting, and (19) #1919, traffic protection, build on top.

This PR: the optional TLVs

The second of three PRs adding net::lldp: the TLVs that may follow the mandatory three.

  • Port description, system name and system description (Text).
  • System capabilities. Reserved bits are preserved, not masked.
  • Management address, with its interface numbering and OID.
  • Organizationally specific TLVs, with the IEEE 802.1 port VLAN ID and VLAN name, and the IEEE 802.3 link aggregation and max frame size subtypes modelled.

Anything not modelled round-trips verbatim: unknown TLV types, OUIs and subtypes. The escape hatches for unmodelled TLVs refuse anything that has a structured representation, which keeps the mapping between octets and values one to one.

Testing

Property tests per TLV, as in the first PR.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 4221047b-85b8-4df1-b359-9d3ce24829d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.18220% with 121 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
net/src/lldp/org.rs 84.77% 55 Missing and 3 partials ⚠️
net/src/lldp/management.rs 85.31% 35 Missing and 2 partials ⚠️
net/src/lldp/capabilities.rs 88.69% 13 Missing ⚠️
net/src/lldp/optional.rs 93.51% 12 Missing ⚠️
net/src/lldp/tlv.rs 90.90% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch 2 times, most recently from 25480aa to 9cf234a Compare October 17, 2026 03:26
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp branch 2 times, most recently from 02506de to abac097 Compare October 17, 2026 05:59
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch 2 times, most recently from 6f7d9c4 to c5e9535 Compare October 17, 2026 06:17
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from c5e9535 to 9133570 Compare October 17, 2026 22:06
@daniel-noland
daniel-noland marked this pull request as ready for review October 18, 2026 18:02
@daniel-noland
daniel-noland requested a review from a team as a code owner October 18, 2026 18:02
@daniel-noland
daniel-noland requested review from qmonnet and removed request for a team October 18, 2026 18:02

@mvachhar mvachhar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

AI-assisted review: This review was drafted with Claude and reviewed by @mvachhar.

Approving. The nested length fields (management address, VLAN name) are all checked before use, so malformed TLVs from a neighbour can't panic, and unknown TLVs round-trip verbatim. Same spec-citation gap as noted on #1906.

@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from 9133570 to 7588f96 Compare October 19, 2026 20:27
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp branch 2 times, most recently from 133e3f0 to 0233907 Compare October 19, 2026 20:36
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from 7588f96 to 1cbf332 Compare October 19, 2026 20:36
@daniel-noland

Copy link
Copy Markdown
Collaborator Author

@mvachhar thanks. Spec citations: see #1906.

@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from 1cbf332 to e051ba4 Compare October 19, 2026 21:15
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp branch 2 times, most recently from 872b12a to e2135c1 Compare October 19, 2026 23:37
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from e051ba4 to 0831d7b Compare October 19, 2026 23:37
The second of three changes adding `net::lldp`: the TLVs which may follow
the mandatory three.  Port and system description, system name, system
capabilities and management address each get a type, as do the IEEE
802.1 and IEEE 802.3 extensions carried in the organizationally specific
TLV.

As with the mandatory TLVs, the subtypes this dataplane has a use for are
decoded and everything else is kept verbatim: an unknown TLV type, OUI
or 802.1/802.3 subtype round trips octet for octet.  The escape hatches
for unmodelled TLVs refuse anything with a structured representation,
which is what keeps the mapping between octets and values one to one.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/lldp-optional-tlvs branch from 0831d7b to 6a28f65 Compare October 20, 2026 01:21
Base automatically changed from pr/daniel-noland/lldp to pr/daniel-noland/dpdk-init October 20, 2026 03:16
@daniel-noland
daniel-noland merged commit 6a28f65 into pr/daniel-noland/dpdk-init Oct 20, 2026
29 of 42 checks passed
@daniel-noland
daniel-noland deleted the pr/daniel-noland/lldp-optional-tlvs branch October 20, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants