@@ -444,6 +444,7 @@ Henrik Amren henrik@nicira.com
Hiroshi Tanaka htanaka@nicira.com
Hiroshi Miyata miyahiro.dazu@gmail.com
Hsin-Yi Shen shenh@vmware.com
+Hui Xiang xianghuir@gmail.com
Hyojoon Kim joonk@gatech.edu
Igor Ganichev iganichev@nicira.com
Igor Sever igor@xorops.com
@@ -2548,9 +2548,37 @@
<group title="Patch Options">
<p>
- Only <code>patch</code> interfaces support these options.
+ These options apply only to <dfn>patch ports</dfn>, that is, interfaces
+ whose <ref column="type"/> column is <code>patch</code>. Patch ports
+ are mainly a way to connect otherwise independent bridges to one
+ another, similar to how one might plug an Ethernet cable (a ``patch
+ cable'') into two physical switches to connect those switches. The
+ effect of plugging a patch port into two switches is conceptually
+ similar to that of plugging the two ends of a Linux <code>veth</code>
+ device into those switches, but the implementation of patch ports makes
+ them much more efficient.
</p>
+ <p>
+ Patch ports may connect two different bridges (the usual case) or the
+ same bridge. In the latter case, take special care to avoid loops,
+ e.g. by programming appropriate flows with OpenFlow. Patch ports do
+ not work if its ends are attached to bridges on different datapaths,
+ e.g. to connect bridges in <code>system</code> and <code>netdev</code>
+ datapaths.
+ </p>
+
+ <p>
+ The following command creates and connects patch ports <code>p0</code>
+ and <code>p1</code> and adds them to bridges <code>br0</code> and
+ <code>br1</code>, respectively:
+ </p>
+
+ <pre>
+ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
+ -- add-port br1 p1 -- set Interface p1 type=patch options:peer=p0
+ </pre>
+
<column name="options" key="peer">
The <ref column="name"/> of the <ref table="Interface"/> for the other
side of the patch. The named <ref table="Interface"/>'s own
Reported-by: Hui Xiang <xianghuir@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> --- AUTHORS.rst | 1 + vswitchd/vswitch.xml | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-)