2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00
ovs/ofproto/ofproto-dpif-unixctl.man
Daniele Di Proietto fceef20952 dpctl: add ovs-appctl dpctl/* commands to talk to dpif-netdev
This commit introduces multiple appctl commands (dpctl/*)

They are needed to interact with userspace datapaths (dpif-netdev), because the
ovs-dpctl command runs in a separate process and cannot see the userspace
datapaths inside vswitchd.

This change moves most of the code of utilities/ovs-dpctl.c in lib/dpctl.c.

Both the ovs-dpctl command and the ovs-appctl dpctl/* commands make calls to
lib/dpctl.c functions, to interact with datapaths.

The code from utilities/ovs-dpctl.c has been moved to lib/dpctl.c and has been
changed for different reasons:
   - An exit() call in the old code made perfectly sense. Now (since the code
     can be run inside vswitchd) it would terminate the daemon. Same reasoning
     can be applied to ovs_fatal_*() calls.
   - The lib/dpctl.c code _should_ not leak memory.
   - All the print* have been replaced with a function pointer provided by the
     caller, since this code can be run in the ovs-dpctl process (in which
     case we need to print to stdout) or in response to a unixctl request (and
     in this case we need to send everything through a socket, using JSON
     encapsulation).

The syntax is
   ovs-appctl dpctl/(COMMAND) [OPTIONS] [PARAMETERS]
while the ovs-dpctl syntax (which _should_ remain the same after this change)
is
   ovs-dpctl [OPTIONS] (COMMAND) [PARAMETERS]

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
[blp@nicira.com made stylistic and documentation changes]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-04 14:32:13 -07:00

35 lines
1.5 KiB
Groff

.SS "DATAPATH DEBUGGING COMMANDS"
These commands query and modify datapaths. They are are similar to
\fBovs\-dpctl\fR(8) commands. \fBdpif/show\fR has the additional
functionality, beyond \fBdpctl/show\fR of printing OpenFlow port
numbers. The other commands are redundant and will be removed in a
future release.
.
.IP "\fBdpif/dump\-dps\fR"
Prints the name of each configured datapath on a separate line.
.
.IP "\fBdpif/show\fR"
Prints a summary of configured datapaths, including statistics and a
list of connected ports. The port information includes the OpenFlow
port number, datapath port number, and the type. (The local port is
identified as OpenFlow port 65534.)
.
.IP "\fBdpif/dump\-flows\fR [\fB\-m\fR] \fIdp\fR"
Prints to the console all flow entries in datapath \fIdp\fR's
flow table. Without \fB\-m\fR, output omits match fields that a flow
wildcards entirely; with \fB\-m\fR output includes all wildcarded fields.
.IP
This command is primarily useful for debugging Open vSwitch. The flow
table entries that it displays are not OpenFlow flow entries. Instead,
they are different and considerably simpler flows maintained by the
datapath module. If you wish to see the OpenFlow flow entries, use
\fBovs\-ofctl dump\-flows\fR.
.
.IP "\fBdpif/del\-flows \fIdp\fR"
Deletes all flow entries from datapath \fIdp\fR's flow table and
underlying datapath implementation (e.g., kernel datapath module).
.IP
This command is primarily useful for debugging Open vSwitch. As
discussed in \fBdpif/dump\-flows\fR, these entries are
not OpenFlow flow entries.