6 .TH ovs\-dpctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
10 ovs\-dpctl \- administer Open vSwitch datapaths
14 [\fIoptions\fR] \fIcommand \fR[\fIswitch\fR] [\fIargs\fR\&...]
18 The \fBovs\-dpctl\fR program can create, modify, and delete Open vSwitch
19 datapaths. A single machine may host any number of datapaths.
21 A newly created datapath is associated with only one network device, a
22 virtual network device sometimes called the datapath's ``local port''.
23 A newly created datapath is not, however, associated with any of the
24 host's other network devices. To intercept and process traffic on a
25 given network device, use the \fBadd\-if\fR command to explicitly add
26 that network device to the datapath.
28 If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead
31 Most \fBovs\-dpctl\fR commands that work with datapaths take an
32 argument that specifies the name of the datapath. Datapath names take
33 the form [\fItype\fB@\fR]\fIname\fR, where \fIname\fR is the network
34 device associated with the datapath's local port. If \fItype\fR is
35 given, it specifies the datapath provider of \fIname\fR, otherwise the
36 default provider \fBsystem\fR is assumed.
38 The following commands manage datapaths.
41 \fBadd\-dp \fIdp\fR [\fInetdev\fR[\fB,\fIoption\fR]...]
42 Creates datapath \fIdp\fR, with a local port also named \fIdp\fR.
43 This will fail if a network device \fIdp\fR already exists.
45 If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the
46 new datapath, just as if \fBadd\-if\fR was specified.
50 Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network
51 devices, they are automatically removed.
54 \fBadd\-if \fIdp netdev\fR[\fB,\fIoption\fR]...
55 Adds each \fInetdev\fR to the set of network devices datapath
56 \fIdp\fR monitors, where \fIdp\fR is the name of an existing
57 datapath, and \fInetdev\fR is the name of one of the host's
58 network devices, e.g. \fBeth0\fR. Once a network device has been added
59 to a datapath, the datapath has complete ownership of the network device's
60 traffic and the network device appears silent to the rest of the
63 A \fInetdev\fR may be followed by a comma-separated list of options.
64 The following options are currently supported:
67 .IP "\fBtype=\fItype\fR"
68 Specifies the type of port to add. The default type is \fBsystem\fR.
69 .IP "\fBport_no=\fIport\fR"
70 Requests a specific port number within the datapath. If this option is
71 not specified then one will be automatically assigned.
72 .IP "\fIkey\fB=\fIvalue\fR"
73 Adds an arbitrary key-value option to the port's configuration.
76 \fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
79 .IP "\fBset\-if \fIdp port\fR[\fB,\fIoption\fR]..."
80 Reconfigures each \fIport\fR in \fIdp\fR as specified. An
81 \fIoption\fR of the form \fIkey\fB=\fIvalue\fR adds the specified
82 key-value option to the port or overrides an existing key's value. An
83 \fIoption\fR of the form \fIkey\fB=\fR, that is, without a value,
84 deletes the key-value named \fIkey\fR. The type and port number of a
85 port cannot be changed, so \fBtype\fR and \fBport_no\fR are only allowed if
86 they match the existing configuration.
88 \fBdel\-if \fIdp netdev\fR...
89 Removes each \fInetdev\fR from the list of network devices datapath
94 Prints the name of each configured datapath on a separate line.
97 [\fB\-s\fR | \fB\-\-statistics\fR] \fBshow \fR[\fIdp\fR...]
98 Prints a summary of configured datapaths, including their datapath
99 numbers and a list of ports connected to each datapath. (The local
100 port is identified as port 0.) If \fB\-s\fR or \fB\-\-statistics\fR
101 is specified, then packet and byte counters are also printed for each
104 The datapath numbers consists of flow stats and mega flow mask stats.
106 The "lookups" row displays three stats related to flow lookup triggered
107 by processing incoming packets in the datapath. "hit" displays number
108 of packets matches existing flows. "missed" displays the number of
109 packets not matching any existing flow and require user space processing.
110 "lost" displays number of packets destined for user space process but
111 subsequently dropped before reaching userspace. The sum of "hit" and "miss"
112 equals to the total number of packets datapath processed.
114 The "flows" row displays the number of flows in datapath.
116 The "masks" row displays the mega flow mask stats. This row is omitted
117 for datapath not implementing mega flow. "hit" displays the total number
118 of masks visited for matching incoming packets. "total" displays number of
119 masks in the datapath. "hit/pkt" displays the average number of masks
120 visited per packet; the ratio between "hit" and total number of
121 packets processed by the datapath".
123 If one or more datapaths are specified, information on only those
124 datapaths are displayed. Otherwise, \fBovs\-dpctl\fR displays information
125 about all configured datapaths.
126 .SS "DEBUGGING COMMANDS"
127 The following commands are primarily useful for debugging Open
128 vSwitch. The flow table entries (both matches and actions) that they
129 work with are not OpenFlow flow entries. Instead, they are different
130 and considerably simpler flows maintained by the Open vSwitch kernel
131 module. Use \fBovs\-ofctl\fR(8), instead, to work with OpenFlow flow
135 The \fIdp\fR argument to each of these commands is optional when
136 exactly one datapath exists, in which case that datapath is the
137 default. When multiple datapaths exist, then a datapath name is
140 .IP "[\fB\-m \fR| \fB\-\-more\fR] \fBdump\-flows\fR [\fIdp\fR] [\fBfilter=\fIfilter\fR]"
141 Prints to the console all flow entries in datapath \fIdp\fR's flow
142 table. Without \fB\-m\fR or \fB\-\-more\fR, output omits match fields
143 that a flow wildcards entirely; with \fB\-m\fR or \fB\-\-more\fR,
144 output includes all wildcarded fields.
146 If \fBfilter=\fIfilter\fR is specified, only displays the flows
147 that match the \fIfilter\fR. \fIfilter\fR is a flow in the form similiar
148 to that accepted by \fBovs\-ofctl\fR(8)'s \fBadd\-flow\fR command. (This is
149 not an OpenFlow flow: besides other differences, it never contains wildcards.)
150 The \fIfilter\fR is also useful to match wildcarded fields in the datapath
151 flow. As an example, \fBfilter='tcp,tp_src=100'\fR will match the
152 datapath flow containing '\fBtcp(src=80/0xff00,dst=8080/0xff)\fR'.
154 .IP "\fBadd\-flow\fR [\fIdp\fR] \fIflow actions\fR"
155 .IQ "[\fB\-\-clear\fR] [\fB\-\-may-create\fR] [\fB\-s\fR | \fB\-\-statistics\fR] \fBmod\-flow\fR [\fIdp\fR] \fIflow actions\fR"
156 Adds or modifies a flow in \fIdp\fR's flow table that, when a packet
157 matching \fIflow\fR arrives, causes \fIactions\fR to be executed.
159 The \fBadd\-flow\fR command succeeds only if \fIflow\fR does not
160 already exist in \fIdp\fR. Contrariwise, \fBmod\-flow\fR without
161 \fB\-\-may\-create\fR only modifies the actions for an existing flow.
162 With \fB\-\-may\-create\fR, \fBmod\-flow\fR will add a new flow or
163 modify an existing one.
165 If \fB\-s\fR or \fB\-\-statistics\fR is specified, then
166 \fBmod\-flows\fR prints the modified flow's statistics. A flow's
167 statistics are the number of packets and bytes that have passed
168 through the flow, the elapsed time since the flow last processed a
169 packet (if ever), and (for TCP flows) the union of the TCP flags
170 processed through the flow.
172 With \fB\-\-clear\fR, \fBmod\-flows\fR zeros out the flow's
173 statistics. The statistics printed if \fB\-s\fR or
174 \fB\-\-statistics\fR is also specified are those from just before
175 clearing the statistics.
177 .IP "[\fB\-s\fR | \fB\-\-statistics\fR] \fBdel\-flow\fR [\fIdp\fR] \fIflow\fR"
178 Deletes the flow from \fIdp\fR's flow table that matches \fIflow\fR.
179 If \fB\-s\fR or \fB\-\-statistics\fR is specified, then
180 \fBmod\-flows\fR prints the deleted flow's statistics.
182 .IP "\fBdel\-flows\fR [\fIdp\fR]"
183 Deletes all flow entries from datapath \fIdp\fR's flow table.
187 .IQ "\fB\-\-statistics\fR"
188 Causes the \fBshow\fR command to print packet and byte counters for
189 each port within the datapaths that it shows.
193 Increases the verbosity of \fBdump\-flows\fR output.
196 .IQ "\fB\-\-timeout=\fIsecs\fR"
197 Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds. If
198 the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR
207 .BR ovs\-vswitchd (8)