Skip to content

Commit 7c9afef

Browse files
stephenfinblp
authored andcommitted
doc: Populate 'topics' section
There are many docs that don't need to kept at the top level, along with many more hidden in random folders. Move them all. This also allows us to add the '-W' flag to Sphinx, ensuring unindexed docs result in build failures. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Ben Pfaff <blp@ovn.org>
1 parent 43f317f commit 7c9afef

35 files changed

+147
-118
lines changed

Documentation/automake.mk

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
docs += \
2-
Documentation/group-selection-method-property.txt \
3-
Documentation/OVSDB-replication.rst
2+
Documentation/group-selection-method-property.txt
43

54
EXTRA_DIST += \
65
Documentation/_static/logo.png \
@@ -22,6 +21,16 @@ EXTRA_DIST += \
2221
Documentation/intro/install/xenserver.rst \
2322
Documentation/tutorials/index.rst \
2423
Documentation/topics/index.rst \
24+
Documentation/topics/bonding.rst \
25+
Documentation/topics/datapath.rst \
26+
Documentation/topics/design.rst \
27+
Documentation/topics/dpdk.rst \
28+
Documentation/topics/high-availability.rst \
29+
Documentation/topics/integration.rst \
30+
Documentation/topics/openflow.rst \
31+
Documentation/topics/ovsdb-replication.rst \
32+
Documentation/topics/porting.rst \
33+
Documentation/topics/windows.rst \
2534
Documentation/howto/index.rst \
2635
Documentation/howto/docker.rst \
2736
Documentation/howto/kvm.rst \
@@ -58,8 +67,7 @@ SPHINXBUILDDIR = $(srcdir)/Documentation/_build
5867
# Internal variables.
5968
PAPEROPT_a4 = -D latex_paper_size=a4
6069
PAPEROPT_letter = -D latex_paper_size=letter
61-
# TODO(stephenfin): Add '-W' flag here once we've integrated required docs
62-
ALLSPHINXOPTS = -d $(SPHINXBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINXSRCDIR)
70+
ALLSPHINXOPTS = -W -d $(SPHINXBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINXSRCDIR)
6371

6472
.PHONY: htmldocs
6573
htmldocs:

Documentation/howto/openstack-containers.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ example.
4545

4646
* When VM-A is created on a hypervisor, its VIF gets added to the Open vSwitch
4747
integration bridge. This creates a row in the Interface table of the
48-
``Open_vSwitch`` database. As explained in the `integration guide`, the
49-
vif-id associated with the VM network interface gets added in the
50-
``external_ids:iface-id`` column of the newly created row in the Interface
51-
table.
48+
``Open_vSwitch`` database. As explained in the :doc:`integration guide
49+
</topics/integration>`, the vif-id associated with the VM network interface
50+
gets added in the ``external_ids:iface-id`` column of the newly created row
51+
in the Interface table.
5252

5353
* Since VM-A belongs to a logical network, it gets an IP address. This IP
5454
address is used to spawn containers (either manually or through container

Documentation/intro/install/netbsd.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ As all executables installed with pkgsrc are placed in ``/usr/pkg/bin/``
5858
directory, it might be a good idea to add it to your PATH.
5959

6060
Open vSwitch on NetBSD is currently "userspace switch" implementation in the
61-
sense described in :doc:`userspace` and the `porting guide`.
61+
sense described in :doc:`userspace` and :doc:`/topics/porting`.

vswitchd/INTERNALS.rst Documentation/topics/bonding.rst

+16-22
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,9 @@
2121

2222
Avoid deeper levels because they do not render well.
2323

24-
======================
25-
ovs-vswitchd Internals
26-
======================
27-
28-
This document describes some of the internals of the ovs-vswitchd process. It
29-
is not complete. It tends to be updated on demand, so if you have questions
30-
about the vswitchd implementation, ask them and perhaps we'll add some
31-
appropriate documentation here.
32-
33-
Most of the ovs-vswitchd implementation is in ``vswitchd/bridge.c``, so code
34-
references below should be assumed to refer to that file except as otherwise
35-
specified.
36-
24+
=======
3725
Bonding
38-
-------
26+
=======
3927

4028
Bonding allows two or more interfaces (the "slaves") to share network traffic.
4129
From a high-level point of view, bonded interfaces act like a single port, but
@@ -55,8 +43,15 @@ Ethernet source address. This is useful only if the traffic over the bond has
5543
multiple Ethernet source addresses, for example if network traffic from
5644
multiple VMs are multiplexed over the bond.
5745

46+
.. note::
47+
48+
Most of the ovs-vswitchd implementation is in ``vswitchd/bridge.c``, so code
49+
references below should be assumed to refer to that file except as otherwise
50+
specified.
51+
52+
5853
Enabling and Disabling Slaves
59-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
-----------------------------
6055

6156
When a bond is created, a slave is initially enabled or disabled based on
6257
whether carrier is detected on the NIC (see ``iface_create()``). After that, a
@@ -86,7 +81,7 @@ connected to a physical switch; vswitchd should probably provide a way to
8681
disable or configure it in other scenarios.)
8782

8883
Bond Packet Input
89-
~~~~~~~~~~~~~~~~~
84+
-----------------
9085

9186
Bonding accepts unicast packets on any bond slave. This can occasionally cause
9287
packet duplication for the first few packets sent to a given MAC, if the
@@ -118,7 +113,7 @@ remaining slave whose interface name is first alphabetically, but this is by no
118113
means guaranteed.
119114

120115
Bond Packet Output
121-
~~~~~~~~~~~~~~~~~~
116+
------------------
122117

123118
When a packet is sent out a bond port, the bond slave actually used is selected
124119
based on the packet's source MAC and VLAN tag (see ``choose_output_iface()``).
@@ -143,12 +138,12 @@ Currently, "significantly more loaded" means that H must carry at least 1 Mbps
143138
more traffic, and that traffic must be at least 3% greater than L's.
144139

145140
Bond Balance Modes
146-
~~~~~~~~~~~~~~~~~~
141+
------------------
147142

148143
Each bond balancing mode has different considerations, described below.
149144

150145
LACP Bonding
151-
++++++++++++
146+
~~~~~~~~~~~~
152147

153148
LACP bonding requires the remote switch to implement LACP, but it is otherwise
154149
very simple in that, after LACP negotiation is complete, there is no need for
@@ -169,7 +164,7 @@ configuration is complete. An option "lacp-fallback-ab" exists to provide such
169164
behavior on openvswitch.
170165

171166
Active Backup Bonding
172-
+++++++++++++++++++++
167+
~~~~~~~~~~~~~~~~~~~~~
173168

174169
Active Backup bonds send all traffic out one "active" slave until that slave
175170
becomes unavailable. Since they are significantly less complicated than SLB
@@ -178,7 +173,7 @@ the only bond mode which supports attaching each slave to a different upstream
178173
switch.
179174

180175
SLB Bonding
181-
+++++++++++
176+
~~~~~~~~~~~
182177

183178
SLB bonding allows a limited form of load balancing without the remote switch's
184179
knowledge or cooperation. The basics of SLB are simple. SLB assigns each
@@ -241,4 +236,3 @@ SLB bonding has the following complications:
241236
for a MAC+VLAN from which a gratuitous ARP was received from a non-SLB bond
242237
port. For 5 seconds, a locked MAC learning table entry will not be updated
243238
based on a gratuitous ARP received on a SLB bond.
244-
File renamed without changes.
File renamed without changes.

Documentation/topics/dpdk.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
..
2+
Licensed under the Apache License, Version 2.0 (the "License"); you may
3+
not use this file except in compliance with the License. You may obtain
4+
a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
License for the specific language governing permissions and limitations
12+
under the License.
13+
14+
Convention for heading levels in Open vSwitch documentation:
15+
16+
======= Heading 0 (reserved for the title in a document)
17+
------- Heading 1
18+
~~~~~~~ Heading 2
19+
+++++++ Heading 3
20+
''''''' Heading 4
21+
22+
Avoid deeper levels because they do not render well.
23+
24+
================
25+
DPDK Integration
26+
================
27+
28+
**TODO**
File renamed without changes.

Documentation/topics/index.rst

+15
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,18 @@ that way.
3232

3333
.. toctree::
3434
:maxdepth: 2
35+
36+
design
37+
datapath
38+
integration
39+
porting
40+
openflow
41+
bonding
42+
ovsdb-replication
43+
dpdk
44+
windows
45+
46+
.. toctree::
47+
:maxdepth: 2
48+
49+
high-availability

IntegrationGuide.rst Documentation/topics/integration.rst

+21-28
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Integration Guide for Centralized Control
2828
This document describes how to integrate Open vSwitch onto a new platform to
2929
expose the state of the switch and attached devices for centralized control.
3030
(If you are looking to port the switching components of Open vSwitch to a new
31-
platform, please see the PORTING document.) The focus of this guide is on
32-
hypervisors, but many of the interfaces are useful for hardware switches, as
33-
well. The XenServer integration is the most mature implementation, so most of
34-
the examples are drawn from it.
31+
platform, refer to :doc:`porting`) The focus of this guide is on hypervisors,
32+
but many of the interfaces are useful for hardware switches, as well. The
33+
XenServer integration is the most mature implementation, so most of the
34+
examples are drawn from it.
3535

3636
The externally visible interface to this integration is platform-agnostic. We
3737
encourage anyone who integrates Open vSwitch to use the same interface, because
@@ -204,11 +204,11 @@ contents. At all times, the data can be transacted only from the active server.
204204
When the active server dies for some reason, entire OVN operations will be
205205
stalled.
206206

207-
`Pacemaker <http://clusterlabs.org/pacemaker.html>`_ is a cluster resource
207+
`Pacemaker <http://clusterlabs.org/pacemaker.html>`__ is a cluster resource
208208
manager which can manage a defined set of resource across a set of clustered
209209
nodes. Pacemaker manages the resource with the help of the resource agents.
210-
One among the resource agent is
211-
`OCF <http://www.linux-ha.org/wiki/OCF_Resource_Agents>`_
210+
One among the resource agent is `OCF
211+
<http://www.linux-ha.org/wiki/OCF_Resource_Agents>`__
212212

213213
OCF is nothing but a shell script which accepts a set of actions and returns an
214214
appropriate status code.
@@ -217,48 +217,41 @@ With the help of the OCF resource agent ovn/utilities/ovndb-servers.ocf, one
217217
can defined a resource for the pacemaker such that pacemaker will always
218218
maintain one running active server at any time.
219219

220-
After creating a pacemaker cluster, use the following commands to create
221-
one active and multiple backup servers for OVN databases.
220+
After creating a pacemaker cluster, use the following commands to create one
221+
active and multiple backup servers for OVN databases::
222222

223-
::
224-
225-
pcs resource create ovndb_servers ocf:ovn:ovndb-servers \
223+
$ pcs resource create ovndb_servers ocf:ovn:ovndb-servers \
226224
master_ip=x.x.x.x \
227225
ovn_ctl=<path of the ovn-ctl script> \
228226
op monitor interval="10s" \
229227
op monitor role=Master interval="15s"
230-
231-
pcs resource master ovndb_servers-master ovndb_servers \
228+
$ pcs resource master ovndb_servers-master ovndb_servers \
232229
meta notify="true"
233230

234-
The `master_ip` and `ovn_ctl` are the parameters that will be used by the
235-
OCF script. `ovn_ctl` is optional, if not given, it assumes a default value of
231+
The `master_ip` and `ovn_ctl` are the parameters that will be used by the OCF
232+
script. `ovn_ctl` is optional, if not given, it assumes a default value of
236233
/usr/share/openvswitch/scripts/ovn-ctl. `master_ip` is the IP address on which
237234
the active database server is expected to be listening.
238235

239-
Whenever the active server dies, pacemaker is responsible to promote one of
240-
the backup servers to be active. Both ovn-controller and ovn-northd needs the
236+
Whenever the active server dies, pacemaker is responsible to promote one of the
237+
backup servers to be active. Both ovn-controller and ovn-northd needs the
241238
ip-address at which the active server is listening. With pacemaker changing the
242239
node at which the active server is run, it is not efficient to instruct all the
243240
ovn-controllers and the ovn-northd to listen to the latest active server's
244241
ip-address.
245242

246243
This problem can be solved by using a native ocf resource agent
247-
`ocf:heartbeat:IPaddr2`. The IPAddr2 resource agent is just a resource with an
248-
ip-address. When we colocate this resource with the active server, pacemaker
244+
``ocf:heartbeat:IPaddr2``. The IPAddr2 resource agent is just a resource with
245+
an ip-address. When we colocate this resource with the active server, pacemaker
249246
will enable the active server to be connected with a single ip-address all the
250247
time. This is the ip-address that needs to be given as the parameter while
251248
creating the `ovndb_servers` resource.
252249

253250
Use the following command to create the IPAddr2 resource and colocate it
254-
with the active server.
251+
with the active server::
255252

256-
::
257-
258-
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=x.x.x.x \
253+
$ pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=x.x.x.x \
259254
op monitor interval=30s
260-
261-
pcs constraint order VirtualIP then ovndb_servers-master
262-
263-
pcs constraint colocation add master ovndb_servers-master with VirtualIP \
255+
$ pcs constraint order VirtualIP then ovndb_servers-master
256+
$ pcs constraint colocation add master ovndb_servers-master with VirtualIP \
264257
score=INFINITY

OPENFLOW.rst Documentation/topics/openflow.rst

+16-12
Original file line numberDiff line numberDiff line change
@@ -395,21 +395,25 @@ How to contribute
395395
If you plan to contribute code for a feature, please let everyone know on
396396
ovs-dev before you start work. This will help avoid duplicating work.
397397

398-
Please consider the following:
398+
Consider the following:
399399

400-
* Testing. Please test your code.
400+
* Testing.
401401

402-
* Unit tests. Please consider writing some. The tests directory has many
403-
examples that you can use as a starting point.
402+
Please test your code.
404403

405-
* ovs-ofctl. If you add a feature that is useful for some ovs-ofctl command
406-
then you should add support for it there.
404+
* Unit tests.
407405

408-
* Documentation. If you add a user-visible feature, then you should document
409-
it in the appropriate manpage and mention it in NEWS as well.
406+
Consider writing some. The tests directory has many examples that you can
407+
use as a starting point.
410408

411-
* Coding style (see the `coding style guide <CodingStyle.rst>`__ file at the top
412-
of the source tree).
409+
* ovs-ofctl.
413410

414-
* The `patch submission guidelines <CONTRIBUTING.rst>`__. I recommend using
415-
"git send-email", which automatically follows a lot of those guidelines.
411+
If you add a feature that is useful for some ovs-ofctl command then you
412+
should add support for it there.
413+
414+
* Documentation.
415+
416+
If you add a user-visible feature, then you should document it in the
417+
appropriate manpage and mention it in NEWS as well.
418+
419+
Refer to :doc:`/internals/contributing/index` for more information.
File renamed without changes.

PORTING.rst Documentation/topics/porting.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,11 @@ Porting Strategies
141141
After a netdev provider has been implemented for a system's network devices,
142142
you may choose among three basic porting strategies.
143143

144-
.. TODO(stephenfin): Update the link to the installation guide when this is
145-
moved
146-
147144
The lowest-effort strategy is to use the "userspace switch" implementation
148145
built into Open vSwitch. This ought to work, without writing any more code, as
149146
long as the netdev provider that you implemented supports receiving packets.
150147
It yields poor performance, however, because every packet passes through the
151-
ovs-vswitchd process. See the `userspace installation guide` for instructions
148+
ovs-vswitchd process. Refer to :doc:`/intro/install/userspace` for instructions
152149
on how to configure a userspace switch.
153150

154151
If the userspace switch is not the right choice for your port, then you will
File renamed without changes.

FAQ.rst

+9-7
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ Q: Does Open vSwitch only work on Linux?
7979

8080
Q: What's involved with porting Open vSwitch to a new platform or switching ASIC?
8181

82-
A: The `porting document <PORTING.rst>`__ describes how one would go about
83-
porting Open vSwitch to a new operating system or hardware platform.
82+
A: The `porting document <Documentation/development-guide/porting.rst>`__
83+
describes how one would go about porting Open vSwitch to a new operating
84+
system or hardware platform.
8485

8586
Q: Why would I use Open vSwitch instead of the Linux bridge?
8687

@@ -1588,9 +1589,10 @@ Q: What versions of OpenFlow does Open vSwitch support?
15881589
(Open vSwitch 2.2 had an experimental implementation of OpenFlow 1.4 that
15891590
could cause crashes. We don't recommend enabling it.)
15901591

1591-
The `OpenFlow guide <OPENFLOW.rst>`__ tracks support for OpenFlow 1.1 and
1592-
later features. When support for OpenFlow 1.4 and 1.5 is solidly
1593-
implemented, Open vSwitch will enable those version by default.
1592+
The `OpenFlow guide <Documentation/development-guide/openflow.rst>`__
1593+
tracks support for OpenFlow 1.1 and later features. When support for
1594+
OpenFlow 1.4 and 1.5 is solidly implemented, Open vSwitch will enable those
1595+
version by default.
15941596

15951597
Q: Does Open vSwitch support MPLS?
15961598

@@ -1651,8 +1653,8 @@ going through.
16511653
greater than 65535 (the maximum priority that can be set with
16521654
OpenFlow).
16531655

1654-
The DESIGN file at the top level of the Open vSwitch source
1655-
distribution describes the in-band model in detail.
1656+
The ``Documentation/topics/design`` doc describes the in-band model in
1657+
detail.
16561658

16571659
If your controllers are not actually in-band (e.g. they are on
16581660
localhost via 127.0.0.1, or on a separate network), then you should

Makefile.am

-4
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,8 @@ PYCOV_CLEAN_FILES = build-aux/check-structs,cover
6868
docs = \
6969
AUTHORS.rst \
7070
CONTRIBUTING.rst \
71-
DESIGN.rst \
7271
FAQ.rst \
73-
IntegrationGuide.rst \
7472
MAINTAINERS.rst \
75-
OPENFLOW.rst \
76-
PORTING.rst \
7773
README.rst \
7874
WHY-OVS.rst
7975
EXTRA_DIST = \

0 commit comments

Comments
 (0)