diff mbox

[ovs-dev] dpctl: add examples to the manpage

Message ID 20170321203201.24803-1-aconole@redhat.com
State Accepted
Delegated to: Joe Stringer
Headers show

Commit Message

Aaron Conole March 21, 2017, 8:32 p.m. UTC
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/dpctl.man | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff mbox

Patch

diff --git a/lib/dpctl.man b/lib/dpctl.man
index 2fcbc94..c5fdaa7 100644
--- a/lib/dpctl.man
+++ b/lib/dpctl.man
@@ -136,7 +136,42 @@  With \fB\-\-clear\fR, \fBmod\-flow\fR zeros out the flow's
 statistics.  The statistics printed if \fB\-s\fR or
 \fB\-\-statistics\fR is also specified are those from just before
 clearing the statistics.
+.IP "NOTE:"
+\fIflow\fR and \fIactions\fR do not match the syntax used with the
+\fBovs\-ofctl\fR \fBadd\-flow\fR command.
 .
+.IP "Usage Examples:"
+.RS 4
+.PP
+\fBForward ARP between ports 3 and 4 on datapath myDP\fR
+.RS 4
+.nf
+ovs-dpctl add-flow myDP \\
+.
+  "in_port(3),eth(),eth_type(0x0806),arp()" 4
+.
+ovs-dpctl add-flow myDP \\
+.
+  "in_port(4),eth(),eth_type(0x0806),arp()" 3
+.
+.RE
+.fi
+.PP
+\fBForward all IPv4 traffic between two addresses on ports 1 and 2\fR
+.RS 4
+.nf
+ovs-dpctl add-flow myDP \\
+.
+  "in_port(1),eth(),eth_type(0x800),\\
+   ipv4(src=172.31.110.4,dst=172.31.110.5)" 2
+.
+ovs-dpctl add-flow myDP \\
+.
+  "in_port(2),eth(),eth_type(0x800),\\
+   ipv4(src=172.31.110.5,dst=172.31.110.4)" 1
+.
+.RE
+.RE
 .TP
 .DO "[\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBdel\-flow\fR" "[\fIdp\fR] \fIflow\fR"
 Deletes the flow from \fIdp\fR's flow table that matches \fIflow\fR.