Skip to content

Commit

Permalink
ovs-ofctl: Added clarifications and examples to manpage.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Ori Shoshan authored and blp committed Aug 14, 2016
1 parent 36283d7 commit 5b10f30
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Nithin Raju [email protected]
Niti Rohilla [email protected]
Numan Siddique [email protected]
Ofer Ben-Yacov [email protected]
Ori Shoshan [email protected]
Padmanabhan Krishnan [email protected]
Panu Matilainen [email protected]
Paraneetharan Chandrasekaran [email protected]
Expand Down
24 changes: 22 additions & 2 deletions utilities/ovs-ofctl.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 5b10f30

Please sign in to comment.