summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorOri Shoshan <ori.shoshan@guardicore.com>2016-08-14 12:49:00 +0300
committerBen Pfaff <blp@ovn.org>2016-08-14 09:32:36 -0700
commit5b10f305151337aade7335536cdc000dc290c327 (patch)
treead0b1bf8addbba8924d41e4265f0be216d7a6b7c /utilities
parent36283d7884f308507039f5ed253d49c868a5aff0 (diff)
downloadopenvswitch-5b10f305151337aade7335536cdc000dc290c327.tar.gz
ovs-ofctl: Added clarifications and examples to manpage.
Added a few examples and clarifications to the man page to explain points I had difficulty figuring out without reading code/tests. Signed-off-by: Ori Shoshan <ori.shoshan@guardicore.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-ofctl.8.in24
1 files changed, 22 insertions, 2 deletions
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 84057c0e9..cccd2656f 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -2186,16 +2186,23 @@ Adds a match criterion to the new flow.
The first form specifies that \fIfield\fR must match the literal
\fIvalue\fR, e.g. \fBdl_type=0x0800\fR. All of the fields and values
for \fBovs\-ofctl\fR flow syntax are available with their usual
-meanings.
+meanings. Shorthand notation matchers (e.g. \fBip\fR in place of
+\fBdl_type=0x0800\fR) are not currently implemented.
.IP
The second form specifies that \fIfield\fB[\fIstart\fB..\fIend\fB]\fR
in the new flow must match \fIsrc\fB[\fIstart\fB..\fIend\fB]\fR taken
from the flow currently being processed.
+For example, \fINXM_OF_UDP_DST\fB[]\fR=\fINXM_OF_UDP_SRC\fB[]\fR on a
+TCP packet for which the UDP src port is \fB53\fR, creates a flow which
+matches \fINXM_OF_UDP_DST\fB[]\fR=\fB53\fR.
.IP
The third form is a shorthand for the second form. It specifies that
-\fIfield\fB[\fIstart\fB..\fIend\fB]\fR in the new flow must match
+\fIfield\fB[\fIstart\fB..\fIend\fB]\fR in the new flow must match the same
\fIfield\fB[\fIstart\fB..\fIend\fB]\fR taken from the flow currently
being processed.
+For example, \fINXM_OF_TCP_DST\fB[]\fR on a TCP packet
+for which the TCP dst port is \fB80\fR, creates a flow which
+matches \fINXM_OF_TCP_DST\fB[]\fR=\fB80\fR.
.
.IP \fBload:\fIvalue\fB\->\fIdst\fB[\fIstart\fB..\fIend\fB]
.IQ \fBload:\fIsrc\fB[\fIstart\fB..\fIend\fB]\->\fIdst\fB[\fIstart\fB..\fIend\fB]
@@ -3185,6 +3192,19 @@ some traffic has passed through.)
\fBovs\-ofctl dump\-flows br0\fR
Prints the flow entries in the switch.
.
+.TP
+\fBovs\-ofctl add\-flow table=0 actions=learn(table=1,hard_timeout=10, NXM_OF_VLAN_TCI[0..11],output:NXM_OF_IN_PORT[]), resubmit(,1)\fR
+\fBovs\-ofctl add\-flow table=1 priority=0 actions=flood\fR
+Implements a level 2 MAC learning switch using the learn.
+.
+.TP
+\fBovs\-ofctl add\-flow br0 'table=0,priority=0 actions=load:3->NXM_NX_REG0[0..15],learn(table=0,priority=1,idle_timeout=10,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2\fR
+In this use of a learn action, the first packet from each source MAC
+will be sent to port 2. Subsequent packets will be output to port 3,
+with an idle timeout of 10 seconds.
+.
+Additional examples may be found documented as part of related sections.
+.
.SH "SEE ALSO"
.
.BR ovs\-appctl (8),