summaryrefslogtreecommitdiff
path: root/tests/rstp.at
Commit message (Collapse)AuthorAgeFilesLines
* ofproto-dpif: Make ofproto/trace output easier to read.Ben Pfaff2017-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "ovs-appctl ofproto/trace" is invaluable for debugging, but as the users of Open vSwitch have evolved it has failed to keep up with the times. It's pretty easy to design OpenFlow tables and pipelines that resubmit dozens of times. Each resubmit causes an additional tab of indentation, so the output wraps around, sometimes again and again, and makes the output close to unreadable. ovn-trace pioneered better formatting for tracing in OVN logical datapaths, mostly by not increasing indentation for tail recursion, which in practice gets rid of almost all indentation. This commit experiments with redoing ofproto/trace the same way. Try looking at, for example, the testsuite output for test 2282 "ovn -- 3 HVs, 3 LRs connected via LS, source IP based routes". Without this commit, it indents 61 levels (488 spaces!). With this commit, it indents 1 level (4 spaces) and it's possible to actually understand what's going on almost at a glance. To see this for yourself, try the following command either with or without this commit (but be sure to keep the change to ovn.at that adds an ofproto/trace to the test): make check TESTSUITEFLAGS='-d 2282' && less tests/testsuite.dir/2282/testsuite.log Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Lance Richardson <lrichard@redhat.com> Acked-by: Justin Pettit <jpettit@ovn.org>
* ofproto-macros: Change STRIP_USED and STRIP_UID to shell functions.Ben Pfaff2016-01-281-7/+0
| | | | | | | | | | | There's no need for these to be macros; shell functions are conceptually cleaner and make the generated testsuite smaller. Also remove conflicting definition of STRIP_USED from rstp.at. It wasn't actually used anywhere in that file. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* rstp: Refactor rstp_port_set_administrative_bridge_port__().Jarno Rajahalme2014-11-141-0/+5
| | | | | | | | | | | | Invoke move_rstp__() in rstp_port_set_administrative_bridge_port__() if port is not initializing. This is necessary in a test that checks that a Port becoming alternate/backup/disabled stops learning and forwarding. The move_rstp__() call is necessary to immediatly disable learning and forwarding on that port. Without this, the test fails. Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* rstp.at: Fix intermittent test failure.Alex Wang2014-09-251-0/+2
| | | | | | | | | | | | Sub-test "RSTP - dummy interface" checks the ovs-vswitchd.log output immediately after command execution. The check may fail if the write of new log is delayed by the IO thread. This commit fixes the above issue by waiting for the ovs-vswitchd.log output. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com>
* lib/rstp: More robust thread safety.Jarno Rajahalme2014-09-091-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code expects there to be a single thread that is responsible for creating rstp and creating and deleting rstp_port objects. rstp objects are also deleted from other threads, as managed by reference counting. rstp port objects are not reference counted, which means that references to rstp ports may only be held while holding the rstp mutex, or by the thread that creates and deletes them. This patch adds reference counting to RSTP ports, which allows ports to be passed from ofproto-dpif to ofproto-dpif-xlate without using the RSTP port number. This simplifies RSTP port reconfiguration, as the port need not be resynchronized with xlate if just the port number changes. This also avoids lookups on the processing of RSTP BPDUs. This patch also: 1. Exposes the rstp mutex so that related thread safety annotations can be used also within rstp-state-machines.c. 2. Internal variants of most setter an getter functions are defined, suffixed with two underscores. These are annotated to be callable only when the mutex is held. 3. Port setters were only called in a specific pattern. The new external port setter combines them in a single rspt_port_set() function. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
* lib/stp,rstp: Add unit more unit tests.Jarno Rajahalme2014-09-091-0/+86
| | | | | | | | Existing STP and RSTP test cases only test the protocols with test utilities. These tests test them as part of OVS using the netdev-dummy device. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
* Rapid Spanning Tree Protocol (IEEE 802.1D).Daniele Venturino2014-09-091-0/+149
This is the v5 from June 12th, 2014, rebased to OVS master, further changes in following patches. Signed-off by: Daniele Venturino <daniele.venturino@m3s.it> Signed-off by: Martino Fornasa <mf@fornasa.it> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>