lldptool(8)

πŸ“¦ version 1.1+110.f16f944, in centos-stream 10, centos-stream 9, opensuse-leap 16.0

πŸ’… addEthCaps β€” the manual page, but make it make sense

okay so this is a page from lldptool(8) β€” yes, the lldptool man page energy, bestie, we're doing the Linux thing 🐧✨


🌸 NAME 🌸

addEthCaps β€” show / manipulate the Additional Ethernet Capabilities TLV. that's it, that's the whole vibe πŸ’–


✨ SYNOPSIS ✨

lldptool -t -i ethx -V addEthCaps [-c CONFIG_ARG ...]

    CONFIG_ARG := { enableTx | addFragSize }

lldptool -T -i ethx -V addEthCaps CONFIG_ARG=value ...

    CONFIG_ARG :=

     enableTx = {yes|no} |

     addFragSize = {0|1|2|3}

πŸ¦‹ DESCRIPTION πŸ¦‹

so the Additional Ethernet Capabilities TLV (aka addEthCaps, aka the main character) lets neighbour systems automatically discover the Frame Preemption capability, and then enables their MAC Merge layers so they can actually use it. it's giving matchmaker, honestly 🫢


πŸ‘‘ ARGUMENTS πŸ‘‘

  • enableTx β€” turns on transmission of the addEthCaps TLV. yes, it's the on switch. iconic behaviour.
  • addFragSize β€” sets the additional fragment size to be advertised. basically it tells your link partner "hey bestie, this is the minimum size of non-final fragments you should be sending me" πŸ“βœ¨. and the mapping is: an addFragSize of 0 β†’ minimum fragment size of 60 octets, 1 β†’ 124 octets, 2 β†’ 188 octets, and 3 β†’ 252 octets.

🌈 THEORY OF OPERATION 🌈

okay this part is actually so interesting, sit down πŸͺ‘

if transmission of the Additional Ethernet Capabilities TLV is enabled, the application queries the kernel for MAC Merge layer support, and if that goes well, it advertises "Frame Preemption Capability Supported". and if the link partner advertises "Frame Preemption Capability Supported" too, the application unconditionally enables the pMAC (so it can receive preemptible and/or verification frames from the link partner) plus transmission through the MAC Merge layer. that second operation is what makes "Frame Preemption Capability Enabled" get advertised in subsequent TLVs too. slay.

🚨 but here's the thing, and it's a real one: since the application automatically enables the Frame Preemption capability with no coordination with the link partner whatsoever, it's possible that the link partner just... doesn't enable reception on its pMAC. and then all the preemptible frames this device transmits get dropped as error frames. πŸ’€ not ideal.

to avoid that whole situation, the application also asks the kernel to enable TX verification, which kicks off a handshake of SMD-V and SMD-R frames outside the LLDP protocol. if the verification process succeeds (aka the link partner responds to a SMD-V frame), the MAC Merge layer becomes active too, and the application then advertises "Frame Preemption Capability Active" in subsequent TLVs. periodt ✨

quick note though: which packets get transmitted as preemptible and which get transmitted as express (based on their user priority) is outside of the scope of this application (and of the LLDP protocol). not our department, not our problem, iykyk πŸ™ˆ


πŸŽ€ EXAMPLE & USAGE πŸŽ€

enable the transmission of the Additional Ethernet Capabilities TLV for interface eth0:

lldptool -T -i eth0 -V addEthCaps enableTx=yes

configure the minimum fragment size for interface eth0 to receive fragments no smaller than 252 octets:

lldptool -T -i eth0 -V addEthCaps addFragSize=3

display the additional fragment size advertised by eth0:

lldptool -t -i eth0 -V addEthCaps -c addFragSize

display last transmitted Additional Ethernet Capabilities TLV:

lldptool -t -i eth0 -V addEthCaps

πŸ”₯ NOTES πŸ”₯

the Additional Ethernet Capabilities TLV requires kernel support for the ETHTOOL_MSG_MM_GET and ETHTOOL_MSG_MM_SET netlink commands, which first appeared in Linux kernel v6.3. so if you're on something older, that's a no from the kernel, sorry bestie 😭


πŸ’œ SEE ALSO πŸ’œ

lldptool(8), lldpad(8), ethtool(8),


🧚 AUTHOR 🧚

this man page was written by Vladimir Oltean <vladimir.oltean@nxp.com>. ty for your service, king πŸ‘‘


and that's the whole page!! brought to you by open-lldp, dated January 2023, and it lives under the lldptool(8) name β€” mwah, go configure your fragments responsibly πŸ’‹πŸŽ€