From 6ef305d50c0722ba15647ab1f68a689efb57cb38 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Tosoni Date: Wed, 22 Jan 2020 09:36:30 +0100 Subject: [PATCH] doc, tests: milliseconds tx-interval finishing touch - Added a test in test_lldpcli.py to check that milliseconds delay can be read back in either seconds or milliseconds units. - Updated the manual page for lldpcli; warn about performance issue. - Added an entry in NEWS --- NEWS | 1 + src/client/lldpcli.8.in | 8 ++++++++ tests/integration/test_lldpcli.py | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/NEWS b/NEWS index 903609ff..9c414cf6 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ lldpd (1.0.5) + Stricter on LLDP incoming frames validation. + Add support for VLAN-aware bridges for Linux (no range support). + Add support for 802.3BT (no SNMP support). + + Add support for millisecond-grained tx-interval (Jean-Pierre Tosoni). * Fix: + Don't clear chassis TLV on shutdown LLDPDU. + Don't require/display powerpairs for Dot3 power when device type diff --git a/src/client/lldpcli.8.in b/src/client/lldpcli.8.in index f7def752..53f5b53e 100644 --- a/src/client/lldpcli.8.in +++ b/src/client/lldpcli.8.in @@ -509,6 +509,14 @@ value is 30 seconds. Note: also starts another system based refresh timer on each port to detect changes such as a hostname. This is the value of the tx-interval multiplied by 20. +.Pp +You can specify an +.Cd interval +value in milliseconds by appending a "ms" suffix to the figure (e.g. +"configure lldp tx-interval 1500ms" is 1.5s, not 1500s). In this case +the TTL for received and sent LLDP frames is rounded up to the next +second. Note: the effective interval can be limited by the operating +system capabilities and CPU speed. .Ed .Cd configure diff --git a/tests/integration/test_lldpcli.py b/tests/integration/test_lldpcli.py index 04c58a11..273777a3 100644 --- a/tests/integration/test_lldpcli.py +++ b/tests/integration/test_lldpcli.py @@ -559,6 +559,10 @@ def test_return_code(lldpd1, lldpcli, namespaces): @pytest.mark.parametrize("command, name, expected", [ ("configure system max-neighbors 10", "max-neighbors", 10), + # get integral tx-delay from non-integral value (rounded up value) + ("configure lldp tx-interval 1500ms", "tx-delay", 2), + # get non-integral tx-delay-ms from non-integral value (exact value) + ("configure lldp tx-interval 2500ms", "tx-delay-ms", 2500), ("configure lldp tx-interval 20", "tx-delay", 20), ("configure lldp tx-hold 5", "tx-hold", 5), ("configure lldp portidsubtype ifname", "lldp-portid-type", "ifname"), -- 2.39.5