]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
doc, tests: milliseconds tx-interval finishing touch
authorJean-Pierre Tosoni <jp.tosoni@acksys.fr>
Wed, 22 Jan 2020 08:36:30 +0000 (09:36 +0100)
committerJean-Pierre Tosoni <jp.tosoni@acksys.fr>
Wed, 22 Jan 2020 08:37:47 +0000 (09:37 +0100)
- 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
src/client/lldpcli.8.in
tests/integration/test_lldpcli.py

diff --git a/NEWS b/NEWS
index 903609ff8cdea0ef163cecea71a511e555c681ab..9c414cf602eace9beaf3d1a81f30b7c537d45545 100644 (file)
--- 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
index f7def752c9f1b4bda24ca828c26814e6ec9d86a1..53f5b53eaaf401abc88c9e00d90a1ad5b7421ecf 100644 (file)
@@ -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
index 04c58a11926271f8eaac9c4890bf0a78e550df94..273777a39e8d4b92314c47a9682a8886cee4a349 100644 (file)
@@ -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"),