This ethernet LLDP example illustrates the usage of LLDP IEEE 802.1AB stack with CPSW peripheral.
In this example, the DUT MAC port is connected to a neighbor PC which also have opensource lldp agent. Yang based configuration is also supported. Currently File System is not supported, will be added in future releases.
See also :Ethernet LLDP Stack - API and Integration Guide
Parameter | Value |
---|---|
CPU + OS | r5fss0-0_freertos |
Toolchain | ti-arm-clang |
Board | am64x-evm |
Example folder | examples/networking/tsn/lldp_cpsw_app |
https://github.com/lldpd/lldpd
can be installed follow the guideline. But a quick start can be using docker: Refer Ethernet TSN gPTP Examples to build the lldp example.
Refer Ethernet TSN gPTP Examples for HW Setup.
EVM and PC has to connected directly as shown below using CAT6 or CAT5 cable
PORT1 instead of PORT0 on EVM can be used as well.
Refer :Ethernet LLDP Stack - API and Integration Guide for how to configure LLDP parameters.
With default setting
Capture LLDPDU via wireshark and confirm the TX interval is around 30s
Capture LLDPDU via wireshark and confirm the LLDPDU content is match with configuration params in lldp_init.c
On Linux PC, start opensource LLDP application by:
With default setting
Capture LLDPDU via wireshark and confirm after receive Linux PC LLDPDU, the DUT process fast tx flow by one TX LLDPDU immediately, and follow up by two (tx-fast-init) more LLDPDUs, with one second interval (message-fast-tx).
After receive next LLDPDU from Linux PC, no more fast tx flow happened on DUT side.
Continue 2nd verification, then turn OFF LLDPDU by Ctrl + C
in Linux PC docker command. Verify DUT can detect and delete correct neighbor info include Port and Chassis ID.
DUT log
User can rerun 2nd verification and confirm Fast TX flow happen again.
On Linux PC side, change port description of corresponding port which is connect to DUT. In this example, enp3s0 is used.
DUT log
Configure 3 message-tx-interval values differently each other, like below:
Capture wireshark and verify the tx interval flow for:
Repeat verification #1 -> #4 (The LLDP opensource is using Nearest bridge 01-80-C2-00-00-0E as destination MAC address) and confirm only Nearest bridge Dest MAC address in DUT takes effect.
Ethernet And Networking | Ethernet LLDP Stack - API and Integration Guide