From 56abfde8ec72b47f074a96ca0197485a69d7d909 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 5 Nov 2024 15:43:28 +0100 Subject: [PATCH] test: netns: Add missing class documentation to describe TPMRs [skip-ci] --- test/infamy/netns.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/infamy/netns.py b/test/infamy/netns.py index 59a1f6af..3d66ffe1 100644 --- a/test/infamy/netns.py +++ b/test/infamy/netns.py @@ -362,6 +362,19 @@ class Pcap: return tcpdump.stdout class TPMR(IsolatedMacVlans): + """Two-Port MAC Relay + + Creates a network namespace containing two controller interfaces + (`a` and `b`). By default, tc rules are setup to copy all frames + ingressing on `a` to egress on `b`, and vice versa. + + These rules can be removed and reinserted dynamically using the + `block()` and `forward()` methods, respectively. + + This is useful to verify the correctness of fail-over behavior in + various protocols. See ospf_bfd for a usage example. + """ + def __init__(self, a, b): super().__init__(ifmap={ a: "a", b: "b" }, lo=False)