]> git.proxmox.com Git - mirror_ovs.git/blame - vswitchd/ovs-vswitchd.8.in
netdev-dpdk: leverage the mempool offload support
[mirror_ovs.git] / vswitchd / ovs-vswitchd.8.in
CommitLineData
7d9809ef
BP
1.\" -*- nroff -*-
2.de IQ
3. br
4. ns
5. IP "\\$1"
6..
d2cb6c95 7.TH ovs\-vswitchd 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
812560d7 8.\" This program's name:
064af421
BP
9.ds PN ovs\-vswitchd
10.
11.SH NAME
f30f26be 12ovs\-vswitchd \- Open vSwitch daemon
064af421
BP
13.
14.SH SYNOPSIS
80df177a 15\fBovs\-vswitchd \fR[\fIdatabase\fR]
064af421
BP
16.
17.SH DESCRIPTION
299a244b 18A daemon that manages and controls any number of Open vSwitch switches
f30f26be 19on the local machine.
064af421 20.PP
80df177a
BP
21The \fIdatabase\fR argument specifies how \fBovs\-vswitchd\fR connects
22to \fBovsdb\-server\fR. The default is \fBunix:@RUNDIR@/db.sock\fR.
23The following forms are accepted:
6f61c75b 24.so ovsdb/remote-active.man
c9f3f37a 25.so ovsdb/remote-passive.man
064af421 26.PP
76343538
BP
27\fBovs\-vswitchd\fR retrieves its configuration from \fIdatabase\fR at
28startup. It sets up Open vSwitch datapaths and then operates
29switching across each bridge described in its configuration files. As
30the database changes, \fBovs\-vswitchd\fR automatically updates its
31configuration to match.
32.PP
299a244b 33\fBovs\-vswitchd\fR switches may be configured with any of the following
f30f26be 34features:
064af421
BP
35.
36.IP \(bu
37L2 switching with MAC learning.
38.
39.IP \(bu
40NIC bonding with automatic fail-over and source MAC-based TX load
41balancing ("SLB").
42.
43.IP \(bu
44802.1Q VLAN support.
45.
46.IP \(bu
47Port mirroring, with optional VLAN tagging.
48.
49.IP \(bu
50NetFlow v5 flow logging.
51.
52.IP \(bu
d1ae8299 53sFlow(R) monitoring.
72b06300
BP
54.
55.IP \(bu
064af421
BP
56Connectivity to an external OpenFlow controller, such as NOX.
57.
58.PP
59Only a single instance of \fBovs\-vswitchd\fR is intended to run at a time.
f30f26be 60A single \fBovs\-vswitchd\fR can manage any number of switch instances, up
064af421
BP
61to the maximum number of supported Open vSwitch datapaths.
62.PP
f30f26be 63\fBovs\-vswitchd\fR does all the necessary management of Open vSwitch datapaths
064af421
BP
64itself. Thus, external tools, such \fBovs\-dpctl\fR(8), are not needed for
65managing datapaths in conjunction with \fBovs\-vswitchd\fR, and their use
66to modify datapaths when \fBovs\-vswitchd\fR is running can interfere with
67its operation. (\fBovs\-dpctl\fR may still be useful for diagnostics.)
68.PP
69An Open vSwitch datapath kernel module must be loaded for \fBovs\-vswitchd\fR
795752a3
SF
70to be useful. Refer to the documentation for instructions on how to build and
71load the Open vSwitch kernel module.
064af421
BP
72.PP
73.SH OPTIONS
4e312e69 74.IP "\fB\-\-mlockall\fR"
86a06318
BP
75Causes \fBovs\-vswitchd\fR to call the \fBmlockall()\fR function, to
76attempt to lock all of its process memory into physical RAM,
77preventing the kernel from paging any of its memory to disk. This
78helps to avoid networking interruptions due to system memory pressure.
79.IP
80Some systems do not support \fBmlockall()\fR at all, and other systems
81only allow privileged users, such as the superuser, to use it.
82\fBovs\-vswitchd\fR emits a log message if \fBmlockall()\fR is
83unavailable or unsuccessful.
84.
d1279464 85.SS "DPDK Options"
bab69409 86For details on initializing the \fBovs\-vswitchd\fR DPDK datapath,
795752a3 87refer to the documentation or \fBovs\-vswitchd.conf.db\fR(5) for
bab69409 88details.
42dd41ef 89.SS "Daemon Options"
a7ff9bd7
BP
90.ds DD \
91\fBovs\-vswitchd\fR detaches only after it has connected to the \
92database, retrieved the initial configuration, and set up that \
93configuration.
064af421 94.so lib/daemon.man
42dd41ef
GS
95.SS "Service Options"
96.so lib/service.man
ac300505 97.SS "Public Key Infrastructure Options"
6f61c75b
BP
98.so lib/ssl.man
99.so lib/ssl-bootstrap.man
b3fca241 100.SS "Logging Options"
064af421 101.so lib/vlog.man
8a986a0a
GS
102.SS "Other Options"
103.so lib/unixctl.man
064af421 104.so lib/common.man
064af421 105.
b16fdafe
BP
106.SH "RUNTIME MANAGEMENT COMMANDS"
107\fBovs\-appctl\fR(8) can send commands to a running
108\fBovs\-vswitchd\fR process. The currently supported commands are
109described below. The command descriptions assume an understanding of
76343538 110how to configure Open vSwitch.
9e15c889
BP
111.SS "GENERAL COMMANDS"
112.IP "\fBexit\fR"
113Causes \fBovs\-vswitchd\fR to gracefully terminate.
3d657a0a
IS
114.IP "\fBqos/show-types\fR \fIinterface\fR"
115Queries the interface for a list of Quality of Service types that are
116configurable via Open vSwitch for the given \fIinterface\fR.
e8fe3026
EJ
117.IP "\fBqos/show\fR \fIinterface\fR"
118Queries the kernel for Quality of Service configuration and statistics
119associated with the given \fIinterface\fR.
6d13e6dd
PR
120.IP "\fBbfd/show\fR [\fIinterface\fR]"
121Displays detailed information about Bidirectional Forwarding Detection
122configured on \fIinterface\fR. If \fIinterface\fR is not specified,
123then displays detailed information about all interfaces with BFD
124enabled.
125.IP "\fBbfd/set-forwarding\fR [\fIinterface\fR] \fIstatus\fR"
126Force the fault status of the BFD module on \fIinterface\fR (or all
127interfaces if none is given) to be \fIstatus\fR. \fIstatus\fR can be
128"true", "false", or "normal" which reverts to the standard behavior.
ae75dae3 129.IP "\fBcfm/show\fR [\fIinterface\fR]"
20c8e971 130Displays detailed information about Connectivity Fault Management
ae75dae3
JP
131configured on \fIinterface\fR. If \fIinterface\fR is not specified,
132then displays detailed information about all interfaces with CFM
133enabled.
d7243b93
EJ
134.IP "\fBcfm/set-fault\fR [\fIinterface\fR] \fIstatus\fR"
135Force the fault status of the CFM module on \fIinterface\fR (or all
136interfaces if none is given) to be \fIstatus\fR. \fIstatus\fR can be
137"true", "false", or "normal" which reverts to the standard behavior.
fe4a02e4
EJ
138.IP "\fBstp/tcn\fR [\fIbridge\fR]"
139Forces a topology change event on \fIbridge\fR if it's running STP. This
140may cause it to send Topology Change Notifications to its peers and flush
141its MAC table.. If no \fIbridge\fR is given, forces a topology change
142event on all bridges.
5f206eb6 143.IP "\fBstp/show\fR [\fIbridge\fR]"
144Displays detailed information about spanning tree on the \fIbridge\fR. If
145\fIbridge\fR is not specified, then displays detailed information about all
146bridges with STP enabled.
b16fdafe
BP
147.SS "BRIDGE COMMANDS"
148These commands manage bridges.
96e466a3
EJ
149.IP "\fBfdb/flush\fR [\fIbridge\fR]"
150Flushes \fIbridge\fR MAC address learning table, or all learning tables
151if no \fIbridge\fR is given.
b16fdafe
BP
152.IP "\fBfdb/show\fR \fIbridge\fR"
153Lists each MAC address/VLAN pair learned by the specified \fIbridge\fR,
08fdcc12
FL
154along with the port on which it was learned and the age of the entry,
155in seconds.
156.IP "\fBmdb/flush\fR [\fIbridge\fR]"
157Flushes \fIbridge\fR multicast snooping table, or all snooping tables
158if no \fIbridge\fR is given.
159.IP "\fBmdb/show\fR \fIbridge\fR"
160Lists each multicast group/VLAN pair learned by the specified \fIbridge\fR,
b16fdafe
BP
161along with the port on which it was learned and the age of the entry,
162in seconds.
fa05809b
BP
163.IP "\fBbridge/reconnect\fR [\fIbridge\fR]"
164Makes \fIbridge\fR drop all of its OpenFlow controller connections and
165reconnect. If \fIbridge\fR is not specified, then all bridges drop
166their controller connections and reconnect.
167.IP
168This command might be useful for debugging OpenFlow controller issues.
cdd35cff 169.
4e312e69 170.IP "\fBbridge/dump\-flows\fR \fIbridge\fR"
cdd35cff 171Lists all flows in \fIbridge\fR, including those normally hidden to
4e312e69 172commands such as \fBovs\-ofctl dump\-flows\fR. Flows set up by mechanisms
cdd35cff
JP
173such as in-band control and fail-open are hidden from the controller
174since it is not allowed to modify or override them.
b16fdafe
BP
175.SS "BOND COMMANDS"
176These commands manage bonded ports on an Open vSwitch's bridges. To
177understand some of these commands, it is important to understand a
be02e7c3
EJ
178detail of the bonding implementation called ``source load balancing''
179(SLB). Instead of directly assigning Ethernet source addresses to
180slaves, the bonding implementation computes a function that maps an
18148-bit Ethernet source addresses into an 8-bit value (a ``MAC hash''
182value). All of the Ethernet addresses that map to a single 8-bit
183value are then assigned to a single slave.
b16fdafe
BP
184.IP "\fBbond/list\fR"
185Lists all of the bonds, and their slaves, on each bridge.
064af421 186.
c33a8a25
EJ
187.IP "\fBbond/show\fR [\fIport\fR]"
188Lists all of the bond-specific information (updelay, downdelay, time
189until the next rebalance) about the given bonded \fIport\fR, or all
190bonded ports if no \fIport\fR is given. Also lists information about
191each slave: whether it is enabled or disabled, the time to completion
192of an updelay or downdelay if one is in progress, whether it is the
193active slave, the hashes assigned to the slave. Any LACP information
194related to this bond may be found using the \fBlacp/show\fR command.
195.
b16fdafe 196.IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fIslave\fR"
be02e7c3
EJ
197Only valid for SLB bonds. Assigns a given MAC hash to a new slave.
198\fIport\fR specifies the bond port, \fIhash\fR the MAC hash to be
199migrated (as a decimal number between 0 and 255), and \fIslave\fR the
200new slave to be assigned.
b16fdafe
BP
201.IP
202The reassignment is not permanent: rebalancing or fail-over will
203cause the MAC hash to be shifted to a new slave in the usual
204manner.
205.IP
206A MAC hash cannot be migrated to a disabled slave.
4e312e69 207.IP "\fBbond/set\-active\-slave\fR \fIport\fR \fIslave\fR"
b16fdafe
BP
208Sets \fIslave\fR as the active slave on \fIport\fR. \fIslave\fR must
209currently be enabled.
210.IP
211The setting is not permanent: a new active slave will be selected
212if \fIslave\fR becomes disabled.
4e312e69
BP
213.IP "\fBbond/enable\-slave\fR \fIport\fR \fIslave\fR"
214.IQ "\fBbond/disable\-slave\fR \fIport\fR \fIslave\fR"
b16fdafe
BP
215Enables (or disables) \fIslave\fR on the given bond \fIport\fR, skipping any
216updelay (or downdelay).
217.IP
218This setting is not permanent: it persists only until the carrier
219status of \fIslave\fR changes.
672d18b2 220.IP "\fBbond/hash\fR \fImac\fR [\fIvlan\fR] [\fIbasis\fR]"
e58de0e3 221Returns the hash value which would be used for \fImac\fR with \fIvlan\fR
672d18b2 222and \fIbasis\fR if specified.
064af421 223.
5dab8ece 224.IP "\fBlacp/show\fR [\fIport\fR]"
6aa74308
EJ
225Lists all of the LACP related information about the given \fIport\fR:
226active or passive, aggregation key, system id, and system priority. Also
227lists information about each slave: whether it is enabled or disabled,
228whether it is attached or detached, port id and priority, actor
5dab8ece
JP
229information, and partner information. If \fIport\fR is not specified,
230then displays detailed information about all interfaces with CFM
231enabled.
fceef209
DDP
232.SS "DPCTL DATAPATH DEBUGGING COMMANDS"
233The primary way to configure \fBovs\-vswitchd\fR is through the Open
234vSwitch database, e.g. using \fBovs\-vsctl\fR(8). These commands
235provide a debugging interface for managing datapaths. They implement
236the same features (and syntax) as \fBovs\-dpctl\fR(8). Unlike
237\fBovs\-dpctl\fR(8), these commands work with datapaths that are
238integrated into \fBovs\-vswitchd\fR (e.g. the \fBnetdev\fR datapath
239type).
240.PP
241.
242.ds DX \fBdpctl/\fR
243.de DO
244\\$2 \\$1 \\$3
245..
246.so lib/dpctl.man
6aa74308 247.
6553d06b
DDP
248.SS "DPIF-NETDEV COMMANDS"
249These commands are used to expose internal information (mostly statistics)
250about the ``dpif-netdev'' userspace datapath. If there is only one datapath
251(as is often the case, unless \fBdpctl/\fR commands are used), the \fIdp\fR
252argument can be omitted.
253.IP "\fBdpif-netdev/pmd-stats-show\fR [\fIdp\fR]"
254Shows performance statistics for each pmd thread of the datapath \fIdp\fR.
255The special thread ``main'' sums up the statistics of every non pmd thread.
256The sum of ``emc hits'', ``masked hits'' and ``miss'' is the number of
257packets received by the datapath. Cycles are counted using the TSC or similar
258facilities (when available on the platform). To reset these counters use
259\fBdpif-netdev/pmd-stats-clear\fR. The duration of one cycle depends on the
260measuring infrastructure.
261.IP "\fBdpif-netdev/pmd-stats-clear\fR [\fIdp\fR]"
262Resets to zero the per pmd thread performance numbers shown by the
263\fBdpif-netdev/pmd-stats-show\fR command. It will NOT reset datapath or
264bridge statistics, only the values shown by the above command.
ce179f11
IM
265.IP "\fBdpif-netdev/pmd-rxq-show\fR [\fIdp\fR]"
266For each pmd thread of the datapath \fIdp\fR shows list of queue-ids with
267port names, which this thread polls.
6553d06b 268.
27022416 269.so ofproto/ofproto-dpif-unixctl.man
7aa697dd 270.so ofproto/ofproto-unixctl.man
b16fdafe 271.so lib/vlog-unixctl.man
149ff68a 272.so lib/memory-unixctl.man
6901e5e2 273.so lib/coverage-unixctl.man
a36de779 274.so ofproto/ofproto-tnl-unixctl.man
7a7708a0 275.
42ed0063
BP
276.SH "OPENFLOW IMPLEMENTATION"
277.
278.PP
279This section documents aspects of OpenFlow for which the OpenFlow
280specification requires documentation.
281.
282.SS "Packet buffering."
283The OpenFlow specification, version 1.2, says:
284.
285.IP
286Switches that implement buffering are expected to expose, through
287documentation, both the amount of available buffering, and the length
288of time before buffers may be reused.
289.
290.PP
c184807c 291Open vSwitch does not maintains any packet buffers.
42ed0063 292.
51bb26fa
JR
293.SS "Bundle lifetime"
294The OpenFlow specification, version 1.4, says:
295.
296.IP
297If the switch does not receive any OFPT_BUNDLE_CONTROL or
298OFPT_BUNDLE_ADD_MESSAGE message for an opened bundle_id for a switch
299defined time greater than 1s, it may send an ofp_error_msg with
300OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code. If the switch does
301not receive any new message in a bundle apart from echo request and
302replies for a switch defined time greater than 1s, it may send an
303ofp_error_msg with OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code.
304.
305.PP
306Open vSwitch implements idle bundle lifetime of 10 seconds.
307.
7a7708a0
BP
308.SH "LIMITS"
309.
310.PP
311We believe these limits to be accurate as of this writing. These
312limits assume the use of the Linux kernel datapath.
313.
314.IP \(bu
6e587965 315\fBovs\-vswitchd\fR started through \fBovs\-ctl\fR(8) provides a limit of 65535
8ed70321
GS
316file descriptors. The limits on the number of bridges and ports is decided by
317the availability of file descriptors. With the Linux kernel datapath, creation
6e587965
MS
318of a single bridge consumes three file descriptors and adding a port consumes
319"n-handler-threads" file descriptors per bridge port. Performance will degrade
320beyond 1,024 ports per bridge due to fixed hash table sizing. Other platforms
321may have different limitations.
7a7708a0
BP
322.
323.IP \(bu
2be9d4f0
BP
3242,048 MAC learning entries per bridge, by default. (This is
325configurable via \fBother\-config:mac\-table\-size\fR in the
326\fBBridge\fR table. See \fBovs\-vswitchd.conf.db\fR(5) for details.)
7a7708a0
BP
327.
328.IP \(bu
329Kernel flows are limited only by memory available to the kernel.
330Performance will degrade beyond 1,048,576 kernel flows per bridge with
331a 32-bit kernel, beyond 262,144 with a 64-bit kernel.
332(\fBovs\-vswitchd\fR should never install anywhere near that many
333flows.)
334.
335.IP \(bu
336OpenFlow flows are limited only by available memory. Performance is
337linear in the number of unique wildcard patterns. That is, an
338OpenFlow table that contains many flows that all match on the same
339fields in the same way has a constant-time lookup, but a table that
340contains many flows that match on different fields requires lookup
341time linear in the number of flows.
342.
343.IP \(bu
344255 ports per bridge participating in 802.1D Spanning Tree Protocol.
345.
346.IP \(bu
34732 mirrors per bridge.
348.
349.IP \(bu
35015 bytes for the name of a port. (This is a Linux kernel limitation.)
351.
064af421
BP
352.SH "SEE ALSO"
353.BR ovs\-appctl (8),
795752a3 354.BR ovsdb\-server (1).