]> git.proxmox.com Git - mirror_ovs.git/blame - lib/dpctl.man
tests: windows ovsdb online compact
[mirror_ovs.git] / lib / dpctl.man
CommitLineData
fceef209
DDP
1.TP
2\*(DX\fBadd\-dp \fIdp\fR [\fInetdev\fR[\fB,\fIoption\fR]...]
3Creates datapath \fIdp\fR, with a local port also named \fIdp\fR.
4This will fail if a network device \fIdp\fR already exists.
5.IP
6If \fInetdev\fRs are specified, \fB\*(PN\fR adds them to the
7new datapath, just as if \fBadd\-if\fR was specified.
8.
9.TP
10\*(DX\fBdel\-dp \fIdp\fR
11Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network
12devices, they are automatically removed.
13.
14.TP
15\*(DX\fBadd\-if \fIdp netdev\fR[\fB,\fIoption\fR]...
16Adds each \fInetdev\fR to the set of network devices datapath
17\fIdp\fR monitors, where \fIdp\fR is the name of an existing
18datapath, and \fInetdev\fR is the name of one of the host's
19network devices, e.g. \fBeth0\fR. Once a network device has been added
20to a datapath, the datapath has complete ownership of the network device's
21traffic and the network device appears silent to the rest of the
22system.
23.IP
24A \fInetdev\fR may be followed by a comma-separated list of options.
25The following options are currently supported:
26.
27.RS
28.IP "\fBtype=\fItype\fR"
29Specifies the type of port to add. The default type is \fBsystem\fR.
30.IP "\fBport_no=\fIport\fR"
31Requests a specific port number within the datapath. If this option is
32not specified then one will be automatically assigned.
33.IP "\fIkey\fB=\fIvalue\fR"
34Adds an arbitrary key-value option to the port's configuration.
35.RE
36.IP
37\fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
38options.
39.
40.IP "\*(DX\fBset\-if \fIdp port\fR[\fB,\fIoption\fR]..."
41Reconfigures each \fIport\fR in \fIdp\fR as specified. An
42\fIoption\fR of the form \fIkey\fB=\fIvalue\fR adds the specified
43key-value option to the port or overrides an existing key's value. An
44\fIoption\fR of the form \fIkey\fB=\fR, that is, without a value,
45deletes the key-value named \fIkey\fR. The type and port number of a
46port cannot be changed, so \fBtype\fR and \fBport_no\fR are only allowed if
47they match the existing configuration.
48.TP
49\*(DX\fBdel\-if \fIdp netdev\fR...
50Removes each \fInetdev\fR from the list of network devices datapath
51\fIdp\fR monitors.
52.
53.TP
54\*(DX\fBdump\-dps\fR
55Prints the name of each configured datapath on a separate line.
56.
57.TP
58.DO "[\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBshow" "\fR[\fIdp\fR...]"
59Prints a summary of configured datapaths, including their datapath
60numbers and a list of ports connected to each datapath. (The local
61port is identified as port 0.) If \fB\-s\fR or \fB\-\-statistics\fR
62is specified, then packet and byte counters are also printed for each
63port.
64.IP
65The datapath numbers consists of flow stats and mega flow mask stats.
66.IP
67The "lookups" row displays three stats related to flow lookup triggered
68by processing incoming packets in the datapath. "hit" displays number
69of packets matches existing flows. "missed" displays the number of
70packets not matching any existing flow and require user space processing.
71"lost" displays number of packets destined for user space process but
72subsequently dropped before reaching userspace. The sum of "hit" and "miss"
73equals to the total number of packets datapath processed.
74.IP
75The "flows" row displays the number of flows in datapath.
76.IP
77The "masks" row displays the mega flow mask stats. This row is omitted
78for datapath not implementing mega flow. "hit" displays the total number
79of masks visited for matching incoming packets. "total" displays number of
80masks in the datapath. "hit/pkt" displays the average number of masks
81visited per packet; the ratio between "hit" and total number of
82packets processed by the datapath".
83.IP
84If one or more datapaths are specified, information on only those
85datapaths are displayed. Otherwise, \fB\*(PN\fR displays information
86about all configured datapaths.
87.SS "DATAPATH FLOW TABLE DEBUGGING COMMANDS"
88The following commands are primarily useful for debugging Open
89vSwitch. The flow table entries (both matches and actions) that they
90work with are not OpenFlow flow entries. Instead, they are different
91and considerably simpler flows maintained by the Open vSwitch kernel
92module. Use \fBovs\-ofctl\fR(8), instead, to work with OpenFlow flow
93entries.
94.
95.PP
96The \fIdp\fR argument to each of these commands is optional when
97exactly one datapath exists, in which case that datapath is the
98default. When multiple datapaths exist, then a datapath name is
99required.
100.
101.TP
102.DO "[\fB\-m \fR| \fB\-\-more\fR]" \*(DX\fBdump\-flows\fR "[\fIdp\fR] [\fBfilter=\fIfilter\fR]"
103Prints to the console all flow entries in datapath \fIdp\fR's flow
104table. Without \fB\-m\fR or \fB\-\-more\fR, output omits match fields
105that a flow wildcards entirely; with \fB\-m\fR or \fB\-\-more\fR,
106output includes all wildcarded fields.
107.IP
108If \fBfilter=\fIfilter\fR is specified, only displays the flows
109that match the \fIfilter\fR. \fIfilter\fR is a flow in the form similiar
110to that accepted by \fBovs\-ofctl\fR(8)'s \fBadd\-flow\fR command. (This is
111not an OpenFlow flow: besides other differences, it never contains wildcards.)
112The \fIfilter\fR is also useful to match wildcarded fields in the datapath
113flow. As an example, \fBfilter='tcp,tp_src=100'\fR will match the
114datapath flow containing '\fBtcp(src=80/0xff00,dst=8080/0xff)\fR'.
115.
116.IP "\*(DX\fBadd\-flow\fR [\fIdp\fR] \fIflow actions\fR"
117.TP
118.DO "[\fB\-\-clear\fR] [\fB\-\-may-create\fR] [\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBmod\-flow\fR" "[\fIdp\fR] \fIflow actions\fR"
119Adds or modifies a flow in \fIdp\fR's flow table that, when a packet
120matching \fIflow\fR arrives, causes \fIactions\fR to be executed.
121.IP
122The \fBadd\-flow\fR command succeeds only if \fIflow\fR does not
123already exist in \fIdp\fR. Contrariwise, \fBmod\-flow\fR without
124\fB\-\-may\-create\fR only modifies the actions for an existing flow.
125With \fB\-\-may\-create\fR, \fBmod\-flow\fR will add a new flow or
126modify an existing one.
127.IP
128If \fB\-s\fR or \fB\-\-statistics\fR is specified, then
d0c4f1dc 129\fBmod\-flow\fR prints the modified flow's statistics. A flow's
fceef209
DDP
130statistics are the number of packets and bytes that have passed
131through the flow, the elapsed time since the flow last processed a
132packet (if ever), and (for TCP flows) the union of the TCP flags
133processed through the flow.
134.IP
d0c4f1dc 135With \fB\-\-clear\fR, \fBmod\-flow\fR zeros out the flow's
fceef209
DDP
136statistics. The statistics printed if \fB\-s\fR or
137\fB\-\-statistics\fR is also specified are those from just before
138clearing the statistics.
139.
140.TP
141.DO "[\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBdel\-flow\fR" "[\fIdp\fR] \fIflow\fR"
142Deletes the flow from \fIdp\fR's flow table that matches \fIflow\fR.
143If \fB\-s\fR or \fB\-\-statistics\fR is specified, then
d0c4f1dc 144\fBdel\-flow\fR prints the deleted flow's statistics.
fceef209 145.
818650e6
JS
146.IP "\*(DX\fBget\-flow\fR [\fIdp\fR] ufid:\fIufid\fR"
147Fetches the flow from \fIdp\fR's flow table with unique identifier \fIufid\fR.
148\fIufid\fR must be specified as a string of 32 hexadecimal characters.
149.
fceef209
DDP
150.IP "\*(DX\fBdel\-flows\fR [\fIdp\fR]"
151Deletes all flow entries from datapath \fIdp\fR's flow table.
dffae65f
DDP
152.SS "CONNECTION TRACKING TABLE DEBUGGING COMMANDS"
153The following commands are primarily useful for debugging the connection
154tracking entries in the datapath.
155.
156.PP
157The \fIdp\fR argument to each of these commands is optional when
158exactly one datapath exists, in which case that datapath is the
159default. When multiple datapaths exist, then a datapath name is
160required.
161.
162.PP
163\fBN.B.\fR(Linux specific): the \fIsystem\fR datapaths (i.e. the Linux
164kernel module Open vSwitch datapaths) share a single connection tracking
165table (which is also used by other kernel subsystems, such as iptables,
166nftables and the regular host stack). Therefore, the following commands
167do not apply specifically to one datapath.
168.
169.TP
170.DO "[\fB\-m\fR | \fB\-\-more\fR] [\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBdump\-conntrack\fR" "[\fIdp\fR] [\fBzone=\fIzone\fR]"
171Prints to the console all the connection entries in the tracker used by
172\fIdp\fR. If \fBzone=\fIzone\fR is specified, only shows the connections
173in \fBzone\fR. With \fB\-\-more\fR, some implementation specific details
174are included. With \fB\-\-statistics\fR timeouts and timestamps are
175added to the output.
7f278d1f
DDP
176.
177.TP
8b6716ae 178\*(DX\fBflush\-conntrack\fR [\fIdp\fR] [\fBzone=\fIzone\fR]
7f278d1f
DDP
179Flushes all the connection entries in the tracker used by \fIdp\fR.
180If \fBzone=\fIzone\fR is specified, only flushes the connections in
181\fBzone\fR.