2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

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>
This commit is contained in:
Ori Shoshan
2016-08-14 12:49:00 +03:00
committed by Ben Pfaff
parent 36283d7884
commit 5b10f30515
2 changed files with 23 additions and 2 deletions

View File

@@ -173,6 +173,7 @@ Nithin Raju nithin@vmware.com
Niti Rohilla niti.rohilla@tcs.com
Numan Siddique nusiddiq@redhat.com
Ofer Ben-Yacov ofer.benyacov@gmail.com
Ori Shoshan ori.shoshan@guardicore.com
Padmanabhan Krishnan kprad1@yahoo.com
Panu Matilainen pmatilai@redhat.com
Paraneetharan Chandrasekaran paraneetharanc@gmail.com

View File

@@ -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),