summaryrefslogtreecommitdiff
path: root/lib/rstp-common.h
Commit message (Collapse)AuthorAgeFilesLines
* rstp: Eliminate BPDU padding and uninitialized bytes.Ben Pfaff2018-06-051-1/+0
| | | | | | | | | | | | | | | | When the RSTP implementation sent BPDUs, it failed to initialize some of their bytes. None of the code initialized an array of 7 padding bytes, and some of it also failed to initialize the version1_length field. In addition, the padding bytes confused some implementations that did not correctly ignore extra bytes. This commit fixes both problems, by removing the padding bytes and initializing every byte in outgoing messages. Reported-by: David van Moolenbroek <dvmoolenbroek@aimvalley.nl> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-June/046864.html Tested-by: David van Moolenbroek <dvmoolenbroek@aimvalley.nl> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rstp: Add rstp port name for human reading.nickcooper-zhangtonghao2017-06-081-0/+1
| | | | | | | | | | This patch is useful to debug rstp subsystem and log the port name instead of port number. This patch will also be used to display rstp info for next patches. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Acked-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-221-1/+1
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Remove lib/list.h completely.Ben Warren2016-03-301-1/+1
| | | | | | | | All code is now in include/openvswitch/list.h. Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* AUTHORS: Add Carlo AndreottiDaniele Venturino2015-12-141-1/+2
| | | | | | | | | | | Carlo was involved in the testing and validation processes of the Rapid Spanning Tree Implementation. I also updated the Copyright string in some files. Signed-off by: Daniele Venturino <daniele.venturino@m3s.it> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dp-packet: Remove ofpbuf dependency.Pravin B Shelar2015-03-031-1/+1
| | | | | | | | | | | | | Currently dp-packet make use of ofpbuf for managing packet buffers. That complicates ofpbuf, by making dp-packet independent of ofpbuf both libraries can be optimized for their own use case. This avoids mapping operation between ofpbuf and dp_packet in datapath upcalls. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* list: Rename struct list to struct ovs_listThomas Graf2014-12-151-1/+1
| | | | | | | struct list is a common name and can't be used in public headers. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* rstp: shift learned MAC addresses to new Root port.Jarno Rajahalme2014-11-191-0/+4
| | | | | | | | | | | All MAC addresses previously learned on a Root Port can be moved to an Alternate Port that becomes the new Root Port; i.e., Dynamic Filtering Entries for those addresses may be modified to show the new Root Port as their source, reducing the need to flood frames when recovering from some component failures. 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-state-machines: Rename ALTERNATE_AGREED state as ALTERNATE_AGREED_EXEC.Daniele Venturino2014-11-141-1/+1
| | | | | | | | All other similar port_role_transition_sm states are named according to this pattern. Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* rstp: Add 'rstp-admin-p2p-mac' and 'rstp-admin-port-state' setters.Jarno Rajahalme2014-11-141-6/+0
| | | | | | | | | | | | | | | | 'rstp-admin-port-state' is the Administrative Bridge Port state variable defined in the 802.1D-2004 standard. It can be set to include or exclude a port from the active topology by management (section 7.4). operPointToPointMAC and 'rstp-admin-p2p-mac' are a pair of parameters that permit inspection of, and control over, the administrative and operational state of the point-to-point status of the MAC entity by the MAC Relay Entity. adminPointToPointMAC can be set by management and its value is reflected on operPointToPointMAC. Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* lib/rstp-common: Remove double spaces.Daniele Venturino2014-09-101-9/+9
| | | | Signed-off by: Daniele Venturino <daniele.venturino@m3s.it> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* lib/rstp: Use hmap instead of a list for ports.Jarno Rajahalme2014-09-091-2/+3
| | | | | | Finding a given port is faster. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
* lib/rstp: Eliminate ports_count.Jarno Rajahalme2014-09-091-1/+0
| | | | | | It was only used to guard against unintialized list. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
* lib/rstp: Remove lock recursion.Jarno Rajahalme2014-09-091-1/+1
| | | | | | | Change the RSTP send_bpdu interface so that a recursive mutex is not needed. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
* lib/rstp: More robust thread safety.Jarno Rajahalme2014-09-091-100/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/rstp: Better debug messages, style fixes.Jarno Rajahalme2014-09-091-9/+2
| | | | | | | Remove unused struct rstp_priority_vector4 definition, fix coding style, fix sparse warnings. 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/+884
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>