datapath: Use proper buffer size in nla_memcpy
[cascardo/ovs.git] / vswitchd / vswitch.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database name="ovs-vswitchd.conf.db" title="Open vSwitch Configuration Database">
3   <p>
4     A database with this schema holds the configuration for one Open
5     vSwitch daemon.  The top-level configuration for the daemon is the
6     <ref table="Open_vSwitch"/> table, which must have exactly one
7     record.  Records in other tables are significant only when they
8     can be reached directly or indirectly from the <ref
9     table="Open_vSwitch"/> table.  Records that are not reachable from
10     the <ref table="Open_vSwitch"/> table are automatically deleted
11     from the database, except for records in a few distinguished
12     ``root set'' tables.
13   </p>
14
15   <h2>Common Columns</h2>
16
17   <p>
18     Most tables contain two special columns, named <code>other_config</code>
19     and <code>external_ids</code>.  These columns have the same form and
20     purpose each place that they appear, so we describe them here to save space
21     later.
22   </p>
23
24   <dl>
25     <dt><code>other_config</code>: map of string-string pairs</dt>
26     <dd>
27       <p>
28         Key-value pairs for configuring rarely used features.  Supported keys,
29         along with the forms taken by their values, are documented individually
30         for each table.
31       </p>
32       <p>
33         A few tables do not have <code>other_config</code> columns because no
34         key-value pairs have yet been defined for them.
35       </p>
36     </dd>
37
38     <dt><code>external_ids</code>: map of string-string pairs</dt>
39     <dd>
40       Key-value pairs for use by external frameworks that integrate with Open
41       vSwitch, rather than by Open vSwitch itself.  System integrators should
42       either use the Open vSwitch development mailing list to coordinate on
43       common key-value definitions, or choose key names that are likely to be
44       unique.  In some cases, where key-value pairs have been defined that are
45       likely to be widely useful, they are documented individually for each
46       table.
47     </dd>
48   </dl>
49
50   <table name="Open_vSwitch" title="Open vSwitch configuration.">
51     Configuration for an Open vSwitch daemon.  There must be exactly
52     one record in the <ref table="Open_vSwitch"/> table.
53
54     <group title="Configuration">
55       <column name="bridges">
56         Set of bridges managed by the daemon.
57       </column>
58
59       <column name="ssl">
60         SSL used globally by the daemon.
61       </column>
62
63       <column name="external_ids" key="system-id">
64         A unique identifier for the Open vSwitch's physical host.
65         The form of the identifier depends on the type of the host.
66         On a Citrix XenServer, this will likely be the same as
67         <ref column="external_ids" key="xs-system-uuid"/>.
68       </column>
69
70       <column name="external_ids" key="xs-system-uuid">
71         The Citrix XenServer universally unique identifier for the physical
72         host as displayed by <code>xe host-list</code>.
73       </column>
74
75       <column name="external_ids" key="hostname">
76         The hostname for the host running Open vSwitch.
77       </column>
78
79       <column name="other_config" key="stats-update-interval"
80               type='{"type": "integer", "minInteger": 5000}'>
81         <p>
82           Interval for updating statistics to the database, in milliseconds.
83           This option will affect the update of the <code>statistics</code>
84           column in the following tables: <code>Port</code>, <code>Interface
85           </code>, <code>Mirror</code>.
86         </p>
87         <p>
88           Default value is 5000 ms.
89         </p>
90         <p>
91           Getting statistics more frequently can be achieved via OpenFlow.
92         </p>
93       </column>
94
95       <column name="other_config" key="flow-restore-wait"
96               type='{"type": "boolean"}'>
97         <p>
98           When <code>ovs-vswitchd</code> starts up, it has an empty flow table
99           and therefore it handles all arriving packets in its default fashion
100           according to its configuration, by dropping them or sending them to
101           an OpenFlow controller or switching them as a standalone switch.
102           This behavior is ordinarily desirable.  However, if
103           <code>ovs-vswitchd</code> is restarting as part of a ``hot-upgrade,''
104           then this leads to a relatively long period during which packets are
105           mishandled.
106         </p>
107         <p>
108           This option allows for improvement.  When <code>ovs-vswitchd</code>
109           starts with this value set as <code>true</code>, it will neither
110           flush or expire previously set datapath flows nor will it send and
111           receive any packets to or from the datapath.  When this value is
112           later set to <code>false</code>, <code>ovs-vswitchd</code> will
113           start receiving packets from the datapath and re-setup the flows.
114         </p>
115         <p>
116           Thus, with this option, the procedure for a hot-upgrade of
117           <code>ovs-vswitchd</code> becomes roughly the following:
118         </p>
119         <ol>
120           <li>
121             Stop <code>ovs-vswitchd</code>.
122           </li>
123           <li>
124             Set <ref column="other_config" key="flow-restore-wait"/>
125             to <code>true</code>.
126           </li>
127           <li>
128             Start <code>ovs-vswitchd</code>.
129           </li>
130           <li>
131             Use <code>ovs-ofctl</code> (or some other program, such as an
132             OpenFlow controller) to restore the OpenFlow flow table
133             to the desired state.
134           </li>
135           <li>
136             Set <ref column="other_config" key="flow-restore-wait"/>
137             to <code>false</code> (or remove it entirely from the database).
138           </li>
139         </ol>
140         <p>
141           The <code>ovs-ctl</code>'s ``restart'' and ``force-reload-kmod''
142           functions use the above config option during hot upgrades.
143         </p>
144       </column>
145
146       <column name="other_config" key="flow-limit"
147               type='{"type": "integer", "minInteger": 0}'>
148         <p>
149           The maximum
150           number of flows allowed in the datapath flow table.  Internally OVS
151           will choose a flow limit which will likely be lower than this number,
152           based on real time network conditions. Tweaking this value is
153           discouraged unless you know exactly what you're doing.
154         </p>
155         <p>
156           The default is 200000.
157         </p>
158       </column>
159
160       <column name="other_config" key="max-idle"
161               type='{"type": "integer", "minInteger": 500}'>
162         <p>
163           The maximum time (in ms) that idle flows will remain cached in the
164           datapath. Internally OVS will check the validity and activity for
165           datapath flows regularly and may expire flows quicker than this
166           number, based on real time network conditions. Tweaking this
167           value is discouraged unless you know exactly what you're doing.
168         </p>
169         <p>
170           The default is 10000.
171         </p>
172       </column>
173
174       <column name="other_config" key="dpdk-init"
175               type='{"type": "boolean"}'>
176         <p>
177           Set this value to <code>true</code> to enable runtime support for
178           DPDK ports. The vswitch must have compile-time support for DPDK as
179           well.
180         </p>
181         <p>
182           The default value is <code>false</code>. Changing this value requires
183           restarting the daemon
184         </p>
185         <p>
186           If this value is <code>false</code> at startup, any dpdk ports which
187           are configured in the bridge will fail due to memory errors.
188         </p>
189       </column>
190
191       <column name="other_config" key="dpdk-lcore-mask"
192               type='{"type": "integer", "minInteger": 1}'>
193         <p>
194           Specifies the CPU cores where dpdk lcore threads should be spawned.
195           The DPDK lcore threads are used for DPDK library tasks, such as
196           library internal message processing, logging, etc. Value should be in
197           the form of a hex string (so '0x123') similar to the 'taskset' mask
198           input.
199         </p>
200         <p>
201           The lowest order bit corresponds to the first CPU core.  A set bit
202           means the corresponding core is available and an lcore thread will be
203           created and pinned to it.  If the input does not cover all cores,
204           those uncovered cores are considered not set.
205         </p>
206         <p>
207           For performance reasons, it is best to set this to a single core on
208           the system, rather than allow lcore threads to float.
209         </p>
210         <p>
211           If not specified, the value will be determined by choosing the lowest
212           CPU core from initial cpu affinity list. Otherwise, the value will be
213           passed directly to the DPDK library.
214         </p>
215       </column>
216
217       <column name="other_config" key="pmd-cpu-mask">
218         <p>
219           Specifies CPU mask for setting the cpu affinity of PMD (Poll
220           Mode Driver) threads.  Value should be in the form of hex string,
221           similar to the dpdk EAL '-c COREMASK' option input or the 'taskset'
222           mask input.
223         </p>
224         <p>
225           The lowest order bit corresponds to the first CPU core.  A set bit
226           means the corresponding core is available and a pmd thread will be
227           created and pinned to it.  If the input does not cover all cores,
228           those uncovered cores are considered not set.
229         </p>
230         <p>
231           If not specified, one pmd thread will be created for each numa node
232           and pinned to any available core on the numa node by default.
233         </p>
234       </column>
235
236       <column name="other_config" key="dpdk-alloc-mem"
237               type='{"type": "integer", "minInteger": 0}'>
238         <p>
239           Specifies the amount of memory to preallocate from the hugepage pool,
240           regardless of socket. It is recommended that dpdk-socket-mem is used
241           instead.
242         </p>
243         <p>
244           If not specified, the value is 0. Changing this value requires
245           restarting the daemon.
246         </p>
247       </column>
248
249       <column name="other_config" key="dpdk-socket-mem"
250               type='{"type": "string"}'>
251         <p>
252           Specifies the amount of memory to preallocate from the hugepage pool,
253           on a per-socket basis.
254         </p>
255         <p>
256           The specifier is a comma-separated string, in ascending order of CPU
257           socket (ex: 1024,2048,4096,8192 would set socket 0 to preallocate
258           1024MB, socket 1 to preallocate 2048MB, etc.)
259         </p>
260         <p>
261           If not specified, the default value is 1024,0. Changing this value
262           requires restarting the daemon.
263         </p>
264       </column>
265
266       <column name="other_config" key="dpdk-hugepage-dir"
267               type='{"type": "string"}'>
268         <p>
269           Specifies the path to the hugetlbfs mount point.
270         </p>
271         <p>
272           If not specified, this will be guessed by the DPDK library (default
273           is /dev/hugepages). Changing this value requires restarting the
274           daemon.
275         </p>
276       </column>
277
278       <column name="other_config" key="dpdk-extra"
279               type='{"type": "string"}'>
280         <p>
281           Specifies additional eal command line arguments for DPDK.
282         </p>
283         <p>
284           The default is empty. Changing this value requires restarting the
285           daemon
286         </p>
287       </column>
288
289       <column name="other_config" key="cuse-dev-name"
290               type='{"type": "string"}'>
291         <p>
292           Specifies the name of the vhost-cuse character device to open for
293           vhost-cuse support.
294         </p>
295         <p>
296           The default is vhost-net. Changing this value requires restarting
297           the daemon.
298         </p>
299       </column>
300
301       <column name="other_config" key="vhost-sock-dir"
302               type='{"type": "string"}'>
303         <p>
304           Specifies the path to the vhost-user unix domain socket files. This
305           path must exist and be a subdirectory tree of the Open vSwitch
306           run directory.
307         </p>
308         <p>
309           Defaults to the working directory of the application. Changing this
310           value requires restarting the daemon.
311         </p>
312       </column>
313
314       <column name="other_config" key="n-handler-threads"
315               type='{"type": "integer", "minInteger": 1}'>
316         <p>
317           Specifies the number of threads for software datapaths to use for
318           handling new flows.  The default the number of online CPU cores minus
319           the number of revalidators.
320         </p>
321         <p>
322           This configuration is per datapath.  If you have more than one
323           software datapath (e.g. some <code>system</code> bridges and some
324           <code>netdev</code> bridges), then the total number of threads is
325           <code>n-handler-threads</code> times the number of software
326           datapaths.
327         </p>
328       </column>
329
330       <column name="other_config" key="n-revalidator-threads"
331               type='{"type": "integer", "minInteger": 1}'>
332         <p>
333           Specifies the number of threads for software datapaths to use for
334           revalidating flows in the datapath.  Typically, there is a direct
335           correlation between the number of revalidator threads, and the number
336           of flows allowed in the datapath.  The default is the number of cpu
337           cores divided by four plus one.  If <code>n-handler-threads</code> is
338           set, the default changes to the number of cpu cores minus the number
339           of handler threads.
340         </p>
341         <p>
342           This configuration is per datapath.  If you have more than one
343           software datapath (e.g. some <code>system</code> bridges and some
344           <code>netdev</code> bridges), then the total number of threads is
345           <code>n-handler-threads</code> times the number of software
346           datapaths.
347         </p>
348       </column>
349     </group>
350
351     <group title="Status">
352       <column name="next_cfg">
353         Sequence number for client to increment.  When a client modifies
354         any part of the database configuration and wishes to wait for
355         Open vSwitch to finish applying the changes, it may increment
356         this sequence number.
357       </column>
358
359       <column name="cur_cfg">
360         Sequence number that Open vSwitch sets to the current value of
361         <ref column="next_cfg"/> after it finishes applying a set of
362         configuration changes.
363       </column>
364
365       <group title="Statistics">
366         <p>
367           The <code>statistics</code> column contains key-value pairs that
368           report statistics about a system running an Open vSwitch.  These are
369           updated periodically (currently, every 5 seconds).  Key-value pairs
370           that cannot be determined or that do not apply to a platform are
371           omitted.
372         </p>
373
374         <column name="other_config" key="enable-statistics"
375                 type='{"type": "boolean"}'>
376           Statistics are disabled by default to avoid overhead in the common
377           case when statistics gathering is not useful.  Set this value to
378           <code>true</code> to enable populating the <ref column="statistics"/>
379           column or to <code>false</code> to explicitly disable it.
380         </column>
381
382         <column name="statistics" key="cpu"
383                 type='{"type": "integer", "minInteger": 1}'>
384           <p>
385             Number of CPU processors, threads, or cores currently online and
386             available to the operating system on which Open vSwitch is running,
387             as an integer.  This may be less than the number installed, if some
388             are not online or if they are not available to the operating
389             system.
390           </p>
391           <p>
392             Open vSwitch userspace processes are not multithreaded, but the
393             Linux kernel-based datapath is.
394           </p>
395         </column>
396
397         <column name="statistics" key="load_average">
398           A comma-separated list of three floating-point numbers,
399           representing the system load average over the last 1, 5, and 15
400           minutes, respectively.
401         </column>
402
403         <column name="statistics" key="memory">
404           <p>
405             A comma-separated list of integers, each of which represents a
406             quantity of memory in kilobytes that describes the operating
407             system on which Open vSwitch is running.  In respective order,
408             these values are:
409           </p>
410
411           <ol>
412             <li>Total amount of RAM allocated to the OS.</li>
413             <li>RAM allocated to the OS that is in use.</li>
414             <li>RAM that can be flushed out to disk or otherwise discarded
415             if that space is needed for another purpose.  This number is
416             necessarily less than or equal to the previous value.</li>
417             <li>Total disk space allocated for swap.</li>
418             <li>Swap space currently in use.</li>
419           </ol>
420
421           <p>
422             On Linux, all five values can be determined and are included.  On
423             other operating systems, only the first two values can be
424             determined, so the list will only have two values.
425           </p>
426         </column>
427
428         <column name="statistics" key="process_NAME">
429           <p>
430             One such key-value pair, with <code>NAME</code> replaced by
431             a process name, will exist for each running Open vSwitch
432             daemon process, with <var>name</var> replaced by the
433             daemon's name (e.g. <code>process_ovs-vswitchd</code>).  The
434             value is a comma-separated list of integers.  The integers
435             represent the following, with memory measured in kilobytes
436             and durations in milliseconds:
437           </p>
438
439           <ol>
440             <li>The process's virtual memory size.</li>
441             <li>The process's resident set size.</li>
442             <li>The amount of user and system CPU time consumed by the
443             process.</li>
444             <li>The number of times that the process has crashed and been
445             automatically restarted by the monitor.</li>
446             <li>The duration since the process was started.</li>
447             <li>The duration for which the process has been running.</li>
448           </ol>
449
450           <p>
451             The interpretation of some of these values depends on whether the
452             process was started with the <option>--monitor</option>.  If it
453             was not, then the crash count will always be 0 and the two
454             durations will always be the same.  If <option>--monitor</option>
455             was given, then the crash count may be positive; if it is, the
456             latter duration is the amount of time since the most recent crash
457             and restart.
458           </p>
459
460           <p>
461             There will be one key-value pair for each file in Open vSwitch's
462             ``run directory'' (usually <code>/var/run/openvswitch</code>)
463             whose name ends in <code>.pid</code>, whose contents are a
464             process ID, and which is locked by a running process.  The
465             <var>name</var> is taken from the pidfile's name.
466           </p>
467
468           <p>
469             Currently Open vSwitch is only able to obtain all of the above
470             detail on Linux systems.  On other systems, the same key-value
471             pairs will be present but the values will always be the empty
472             string.
473           </p>
474         </column>
475
476         <column name="statistics" key="file_systems">
477           <p>
478             A space-separated list of information on local, writable file
479             systems.  Each item in the list describes one file system and
480             consists in turn of a comma-separated list of the following:
481           </p>
482
483           <ol>
484             <li>Mount point, e.g. <code>/</code> or <code>/var/log</code>.
485             Any spaces or commas in the mount point are replaced by
486             underscores.</li>
487             <li>Total size, in kilobytes, as an integer.</li>
488             <li>Amount of storage in use, in kilobytes, as an integer.</li>
489           </ol>
490
491           <p>
492             This key-value pair is omitted if there are no local, writable
493             file systems or if Open vSwitch cannot obtain the needed
494             information.
495           </p>
496         </column>
497       </group>
498     </group>
499
500     <group title="Version Reporting">
501       <p>
502         These columns report the types and versions of the hardware and
503         software running Open vSwitch.  We recommend in general that software
504         should test whether specific features are supported instead of relying
505         on version number checks.  These values are primarily intended for
506         reporting to human administrators.
507       </p>
508
509       <column name="ovs_version">
510         The Open vSwitch version number, e.g. <code>1.1.0</code>.
511       </column>
512
513       <column name="db_version">
514         <p>
515           The database schema version number in the form
516           <code><var>major</var>.<var>minor</var>.<var>tweak</var></code>,
517           e.g. <code>1.2.3</code>.  Whenever the database schema is changed in
518           a non-backward compatible way (e.g. deleting a column or a table),
519           <var>major</var> is incremented.  When the database schema is changed
520           in a backward compatible way (e.g. adding a new column),
521           <var>minor</var> is incremented.  When the database schema is changed
522           cosmetically (e.g. reindenting its syntax), <var>tweak</var> is
523           incremented.
524         </p>
525
526         <p>
527           The schema version is part of the database schema, so it can also be
528           retrieved by fetching the schema using the Open vSwitch database
529           protocol.
530         </p>
531       </column>
532
533       <column name="system_type">
534         <p>
535           An identifier for the type of system on top of which Open vSwitch
536           runs, e.g. <code>XenServer</code> or <code>KVM</code>.
537         </p>
538         <p>
539           System integrators are responsible for choosing and setting an
540           appropriate value for this column.
541         </p>
542       </column>
543
544       <column name="system_version">
545         <p>
546           The version of the system identified by <ref column="system_type"/>,
547           e.g. <code>5.6.100-39265p</code> on XenServer 5.6.100 build 39265.
548         </p>
549         <p>
550           System integrators are responsible for choosing and setting an
551           appropriate value for this column.
552         </p>
553       </column>
554
555     </group>
556
557     <group title="Capabilities">
558       <p>
559         These columns report capabilities of the Open vSwitch instance.
560       </p>
561       <column name="datapath_types">
562         <p>
563           This column reports the different dpifs registered with the system.
564           These are the values that this instance supports in the <ref
565           column="datapath_type" table="Bridge"/> column of the <ref
566           table="Bridge"/> table.
567         </p>
568       </column>
569       <column name="iface_types">
570         <p>
571           This column reports the different netdevs registered with the system.
572           These are the values that this instance supports in the <ref
573           column="type" table="Interface"/> column of the <ref
574           table="Interface"/> table.
575         </p>
576       </column>
577     </group>
578
579     <group title="Database Configuration">
580       <p>
581         These columns primarily configure the Open vSwitch database
582         (<code>ovsdb-server</code>), not the Open vSwitch switch
583         (<code>ovs-vswitchd</code>).  The OVSDB database also uses the <ref
584         column="ssl"/> settings.
585       </p>
586
587       <p>
588         The Open vSwitch switch does read the database configuration to
589         determine remote IP addresses to which in-band control should apply.
590       </p>
591
592       <column name="manager_options">
593         Database clients to which the Open vSwitch database server should
594         connect or to which it should listen, along with options for how these
595         connection should be configured.  See the <ref table="Manager"/> table
596         for more information.
597       </column>
598     </group>
599
600     <group title="Common Columns">
601       The overall purpose of these columns is described under <code>Common
602       Columns</code> at the beginning of this document.
603
604       <column name="other_config"/>
605       <column name="external_ids"/>
606     </group>
607   </table>
608
609   <table name="Bridge">
610     <p>
611       Configuration for a bridge within an
612       <ref table="Open_vSwitch"/>.
613     </p>
614     <p>
615       A <ref table="Bridge"/> record represents an Ethernet switch with one or
616       more ``ports,'' which are the <ref table="Port"/> records pointed to by
617       the <ref table="Bridge"/>'s <ref column="ports"/> column.
618     </p>
619
620     <group title="Core Features">
621       <column name="name">
622         <p>
623           Bridge identifier.  Must be unique among the names of ports,
624           interfaces, and bridges on a host.
625         </p>
626
627         <p>
628           The name must be alphanumeric and must not contain forward or
629           backward slashes.  The name of a bridge is also the name of an <ref
630           table="Interface"/> (and a <ref table="Port"/>) within the bridge, so
631           the restrictions on the <ref table="Interface" column="name"/> column
632           in the <ref table="Interface"/> table, particularly on length, also
633           apply to bridge names.  Refer to the documentation for <ref
634           table="Interface"/> names for details.
635         </p>
636       </column>
637
638       <column name="ports">
639         Ports included in the bridge.
640       </column>
641
642       <column name="mirrors">
643         Port mirroring configuration.
644       </column>
645
646       <column name="netflow">
647         NetFlow configuration.
648       </column>
649
650       <column name="sflow">
651         sFlow(R) configuration.
652       </column>
653
654       <column name="ipfix">
655         IPFIX configuration.
656       </column>
657
658       <column name="flood_vlans">
659         <p>
660           VLAN IDs of VLANs on which MAC address learning should be disabled,
661           so that packets are flooded instead of being sent to specific ports
662           that are believed to contain packets' destination MACs.  This should
663           ordinarily be used to disable MAC learning on VLANs used for
664           mirroring (RSPAN VLANs).  It may also be useful for debugging.
665         </p>
666         <p>
667           SLB bonding (see the <ref table="Port" column="bond_mode"/> column in
668           the <ref table="Port"/> table) is incompatible with
669           <code>flood_vlans</code>.  Consider using another bonding mode or
670           a different type of mirror instead.
671         </p>
672       </column>
673
674       <column name="auto_attach">
675         Auto Attach configuration.
676       </column>
677     </group>
678
679     <group title="OpenFlow Configuration">
680       <column name="controller">
681         <p>
682           OpenFlow controller set.  If unset, then no OpenFlow controllers
683           will be used.
684         </p>
685
686         <p>
687           If there are primary controllers, removing all of them clears the
688           flow table.  If there are no primary controllers, adding one also
689           clears the flow table.  Other changes to the set of controllers, such
690           as adding or removing a service controller, adding another primary
691           controller to supplement an existing primary controller, or removing
692           only one of two primary controllers, have no effect on the flow
693           table.
694         </p>
695       </column>
696
697       <column name="flow_tables">
698         Configuration for OpenFlow tables.  Each pair maps from an OpenFlow
699         table ID to configuration for that table.
700       </column>
701
702       <column name="fail_mode">
703         <p>When a controller is configured, it is, ordinarily, responsible
704         for setting up all flows on the switch.  Thus, if the connection to
705         the controller fails, no new network connections can be set up.
706         If the connection to the controller stays down long enough,
707         no packets can pass through the switch at all.  This setting
708         determines the switch's response to such a situation.  It may be set
709         to one of the following:
710         <dl>
711           <dt><code>standalone</code></dt>
712           <dd>If no message is received from the controller for three
713           times the inactivity probe interval
714           (see <ref column="inactivity_probe"/>), then Open vSwitch
715           will take over responsibility for setting up flows.  In
716           this mode, Open vSwitch causes the bridge to act like an
717           ordinary MAC-learning switch.  Open vSwitch will continue
718           to retry connecting to the controller in the background
719           and, when the connection succeeds, it will discontinue its
720           standalone behavior.</dd>
721           <dt><code>secure</code></dt>
722           <dd>Open vSwitch will not set up flows on its own when the
723           controller connection fails or when no controllers are
724           defined.  The bridge will continue to retry connecting to
725           any defined controllers forever.</dd>
726         </dl>
727         </p>
728         <p>
729           The default is <code>standalone</code> if the value is unset, but
730           future versions of Open vSwitch may change the default.
731         </p>
732         <p>
733           The <code>standalone</code> mode can create forwarding loops on a
734           bridge that has more than one uplink port unless STP is enabled.  To
735           avoid loops on such a bridge, configure <code>secure</code> mode or
736           enable STP (see <ref column="stp_enable"/>).
737         </p>
738         <p>When more than one controller is configured,
739         <ref column="fail_mode"/> is considered only when none of the
740         configured controllers can be contacted.</p>
741         <p>
742           Changing <ref column="fail_mode"/> when no primary controllers are
743           configured clears the flow table.
744         </p>
745       </column>
746
747       <column name="datapath_id">
748         Reports the OpenFlow datapath ID in use.  Exactly 16 hex digits.
749         (Setting this column has no useful effect.  Set <ref
750         column="other-config" key="datapath-id"/> instead.)
751       </column>
752
753       <column name="datapath_version">
754         <p>
755           Reports the version number of the Open vSwitch datapath in use.
756           This allows management software to detect and report discrepancies
757           between Open vSwitch userspace and datapath versions.  (The <ref
758           column="ovs_version" table="Open_vSwitch"/> column in the <ref
759           table="Open_vSwitch"/> reports the Open vSwitch userspace version.)
760           The version reported depends on the datapath in use:
761         </p>
762
763         <ul>
764           <li>
765             When the kernel module included in the Open vSwitch source tree is
766             used, this column reports the Open vSwitch version from which the
767             module was taken.
768           </li>
769
770           <li>
771             When the kernel module that is part of the upstream Linux kernel is
772             used, this column reports <code>&lt;unknown&gt;</code>.
773           </li>
774
775           <li>
776             When the datapath is built into the <code>ovs-vswitchd</code>
777             binary, this column reports <code>&lt;built-in&gt;</code>.  A
778             built-in datapath is by definition the same version as the rest of
779             the Open VSwitch userspace.
780           </li>
781
782           <li>
783             Other datapaths (such as the Hyper-V kernel datapath) currently
784             report <code>&lt;unknown&gt;</code>.
785           </li>
786         </ul>
787
788         <p>
789           A version discrepancy between <code>ovs-vswitchd</code> and the
790           datapath in use is not normally cause for alarm.  The Open vSwitch
791           kernel datapaths for Linux and Hyper-V, in particular, are designed
792           for maximum inter-version compatibility: any userspace version works
793           with with any kernel version.  Some reasons do exist to insist on
794           particular user/kernel pairings.  First, newer kernel versions add
795           new features, that can only be used by new-enough userspace, e.g.
796           VXLAN tunneling requires certain minimal userspace and kernel
797           versions.  Second, as an extension to the first reason, some newer
798           kernel versions add new features for enhancing performance that only
799           new-enough userspace versions can take advantage of.
800         </p>
801       </column>
802
803       <column name="other_config" key="datapath-id">
804         Exactly 16 hex digits to set the OpenFlow datapath ID to a specific
805         value.  May not be all-zero.
806       </column>
807
808       <column name="other_config" key="dp-desc">
809         Human readable description of datapath.  It it a maximum 256
810         byte-long free-form string to describe the datapath for
811         debugging purposes, e.g. <code>switch3 in room 3120</code>.
812       </column>
813
814       <column name="other_config" key="disable-in-band"
815               type='{"type": "boolean"}'>
816         If set to <code>true</code>, disable in-band control on the bridge
817         regardless of controller and manager settings.
818       </column>
819
820       <column name="other_config" key="in-band-queue"
821               type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
822         A queue ID as a nonnegative integer.  This sets the OpenFlow queue ID
823         that will be used by flows set up by in-band control on this bridge.
824         If unset, or if the port used by an in-band control flow does not have
825         QoS configured, or if the port does not have a queue with the specified
826         ID, the default queue is used instead.
827       </column>
828
829       <column name="protocols">
830         <p>
831           List of OpenFlow protocols that may be used when negotiating
832           a connection with a controller.  OpenFlow 1.0, 1.1, 1.2, and
833           1.3 are enabled by default if this column is empty.
834         </p>
835
836         <p>
837           OpenFlow 1.4, 1.5, and 1.6 are not enabled by default because their
838           implementations are missing features.  In addition, the OpenFlow 1.6
839           specification is still under development and thus subject to change.
840         </p>
841       </column>
842     </group>
843
844     <group title="Spanning Tree Configuration">
845       <p>
846         The IEEE 802.1D Spanning Tree Protocol (STP) is a network protocol
847         that ensures loop-free topologies.  It allows redundant links to
848         be included in the network to provide automatic backup paths if
849         the active links fails.
850       </p>
851
852       <p>
853         These settings configure the slower-to-converge but still widely
854         supported version of Spanning Tree Protocol, sometimes known as
855         802.1D-1998.  Open vSwitch also supports the newer Rapid Spanning Tree
856         Protocol (RSTP), documented later in the section titled <code>Rapid
857         Spanning Tree Configuration</code>.
858       </p>
859
860       <group title="STP Configuration">
861         <column name="stp_enable" type='{"type": "boolean"}'>
862           <p>
863             Enable spanning tree on the bridge.  By default, STP is disabled
864             on bridges.  Bond, internal, and mirror ports are not supported
865             and will not participate in the spanning tree.
866           </p>
867
868           <p>
869             STP and RSTP are mutually exclusive.  If both are enabled, RSTP
870             will be used.
871           </p>
872         </column>
873
874         <column name="other_config" key="stp-system-id">
875           The bridge's STP identifier (the lower 48 bits of the bridge-id)
876           in the form
877           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
878           By default, the identifier is the MAC address of the bridge.
879         </column>
880
881         <column name="other_config" key="stp-priority"
882                 type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
883           The bridge's relative priority value for determining the root
884           bridge (the upper 16 bits of the bridge-id).  A bridge with the
885           lowest bridge-id is elected the root.  By default, the priority
886           is 0x8000.
887         </column>
888
889         <column name="other_config" key="stp-hello-time"
890                 type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
891           The interval between transmissions of hello messages by
892           designated ports, in seconds.  By default the hello interval is
893           2 seconds.
894         </column>
895
896         <column name="other_config" key="stp-max-age"
897                 type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
898           The maximum age of the information transmitted by the bridge
899           when it is the root bridge, in seconds.  By default, the maximum
900           age is 20 seconds.
901         </column>
902
903         <column name="other_config" key="stp-forward-delay"
904                 type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
905           The delay to wait between transitioning root and designated
906           ports to <code>forwarding</code>, in seconds.  By default, the
907           forwarding delay is 15 seconds.
908         </column>
909
910         <column name="other_config" key="mcast-snooping-aging-time"
911                 type='{"type": "integer", "minInteger": 1}'>
912           <p>
913             The maximum number of seconds to retain a multicast snooping entry for
914             which no packets have been seen.  The default is currently 300
915             seconds (5 minutes).  The value, if specified, is forced into a
916             reasonable range, currently 15 to 3600 seconds.
917           </p>
918         </column>
919
920         <column name="other_config" key="mcast-snooping-table-size"
921                 type='{"type": "integer", "minInteger": 1}'>
922           <p>
923             The maximum number of multicast snooping addresses to learn.  The
924             default is currently 2048.  The value, if specified, is forced into
925             a reasonable range, currently 10 to 1,000,000.
926           </p>
927         </column>
928         <column name="other_config" key="mcast-snooping-disable-flood-unregistered"
929                 type='{"type": "boolean"}'>
930           <p>
931             If set to <code>false</code>, unregistered multicast packets are forwarded
932             to all ports.
933             If set to <code>true</code>, unregistered multicast packets are forwarded
934             to ports connected to multicast routers.
935           </p>
936         </column>
937       </group>
938
939       <group title="STP Status">
940         <p>
941           These key-value pairs report the status of 802.1D-1998.  They are
942           present only if STP is enabled (via the <ref column="stp_enable"/>
943           column).
944         </p>
945         <column name="status" key="stp_bridge_id">
946           The bridge ID used in spanning tree advertisements, in the form
947           <var>xxxx</var>.<var>yyyyyyyyyyyy</var> where the <var>x</var>s are
948           the STP priority, the <var>y</var>s are the STP system ID, and each
949           <var>x</var> and <var>y</var> is a hex digit.
950         </column>
951         <column name="status" key="stp_designated_root">
952           The designated root for this spanning tree, in the same form as <ref
953           column="status" key="stp_bridge_id"/>.  If this bridge is the root,
954           this will have the same value as <ref column="status"
955           key="stp_bridge_id"/>, otherwise it will differ.
956         </column>
957         <column name="status" key="stp_root_path_cost">
958           The path cost of reaching the designated bridge.  A lower number is
959           better.  The value is 0 if this bridge is the root, otherwise it is
960           higher.
961         </column>
962       </group>
963     </group>
964
965     <group title="Rapid Spanning Tree">
966       <p>
967         Rapid Spanning Tree Protocol (RSTP), like STP, is a network protocol
968         that ensures loop-free topologies.  RSTP superseded STP with the
969         publication of 802.1D-2004.  Compared to STP, RSTP converges more
970         quickly and recovers more quickly from failures.
971       </p>
972
973       <group title="RSTP Configuration">
974         <column name="rstp_enable" type='{"type": "boolean"}'>
975           <p>
976             Enable Rapid Spanning Tree on the bridge.  By default, RSTP is disabled
977             on bridges.  Bond, internal, and mirror ports are not supported
978             and will not participate in the spanning tree.
979           </p>
980
981           <p>
982             STP and RSTP are mutually exclusive.  If both are enabled, RSTP
983             will be used.
984           </p>
985         </column>
986
987         <column name="other_config" key="rstp-address">
988           The bridge's RSTP address (the lower 48 bits of the bridge-id)
989           in the form
990           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
991           By default, the address is the MAC address of the bridge.
992         </column>
993
994         <column name="other_config" key="rstp-priority"
995                 type='{"type": "integer", "minInteger": 0, "maxInteger": 61440}'>
996           The bridge's relative priority value for determining the root
997           bridge (the upper 16 bits of the bridge-id).  A bridge with the
998           lowest bridge-id is elected the root.  By default, the priority
999           is 0x8000 (32768).  This value needs to be a multiple of 4096,
1000           otherwise it's rounded to the nearest inferior one.
1001         </column>
1002
1003         <column name="other_config" key="rstp-ageing-time"
1004                 type='{"type": "integer", "minInteger": 10, "maxInteger": 1000000}'>
1005           The Ageing Time parameter for the Bridge.  The default value
1006           is 300 seconds.
1007         </column>
1008
1009         <column name="other_config" key="rstp-force-protocol-version"
1010                 type='{"type": "integer"}'>
1011           The Force Protocol Version parameter for the Bridge.  This
1012           can take the value 0 (STP Compatibility mode) or 2
1013           (the default, normal operation).
1014         </column>
1015
1016         <column name="other_config" key="rstp-max-age"
1017                 type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
1018           The maximum age of the information transmitted by the Bridge
1019           when it is the Root Bridge.  The default value is 20.
1020         </column>
1021
1022         <column name="other_config" key="rstp-forward-delay"
1023                 type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
1024           The delay used by STP Bridges to transition Root and Designated
1025           Ports to Forwarding.  The default value is 15.
1026         </column>
1027
1028         <column name="other_config" key="rstp-transmit-hold-count"
1029                 type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
1030           The Transmit Hold Count used by the Port Transmit state machine
1031           to limit transmission rate.  The default value is 6.
1032         </column>
1033       </group>
1034
1035       <group title="RSTP Status">
1036         <p>
1037           These key-value pairs report the status of 802.1D-2004.  They are
1038           present only if RSTP is enabled (via the <ref column="rstp_enable"/>
1039           column).
1040         </p>
1041         <column name="rstp_status" key="rstp_bridge_id">
1042           The bridge ID used in rapid spanning tree advertisements, in the form
1043           <var>x</var>.<var>yyy</var>.<var>zzzzzzzzzzzz</var> where
1044           <var>x</var> is the RSTP priority, the <var>y</var>s are a locally
1045           assigned system ID extension, the <var>z</var>s are the STP system
1046           ID, and each <var>x</var>, <var>y</var>, or <var>z</var> is a hex
1047           digit.
1048         </column>
1049         <column name="rstp_status" key="rstp_root_id">
1050           The root of this spanning tree, in the same form as <ref
1051           column="rstp_status" key="rstp_bridge_id"/>.  If this bridge is the
1052           root, this will have the same value as <ref column="rstp_status"
1053           key="rstp_bridge_id"/>, otherwise it will differ.
1054         </column>
1055         <column name="rstp_status" key="rstp_root_path_cost"
1056                 type='{"type": "integer", "minInteger": 0}'>
1057           The path cost of reaching the root.  A lower number is better.  The
1058           value is 0 if this bridge is the root, otherwise it is higher.
1059         </column>
1060         <column name="rstp_status" key="rstp_designated_id">
1061           The RSTP designated ID, in the same form as <ref column="rstp_status"
1062           key="rstp_bridge_id"/>.
1063         </column>
1064         <column name="rstp_status" key="rstp_designated_port_id">
1065           The RSTP designated port ID, as a 4-digit hex number.
1066         </column>
1067         <column name="rstp_status" key="rstp_bridge_port_id">
1068           The RSTP bridge port ID, as a 4-digit hex number.
1069         </column>
1070       </group>
1071     </group>
1072
1073     <group title="Multicast Snooping Configuration">
1074       Multicast snooping (RFC 4541) monitors the Internet Group Management
1075       Protocol (IGMP) and Multicast Listener Discovery traffic between hosts
1076       and multicast routers.  The switch uses what IGMP and MLD snooping
1077       learns to forward multicast traffic only to interfaces that are connected
1078       to interested receivers.  Currently it supports IGMPv1, IGMPv2, IGMPv3,
1079       MLDv1 and MLDv2 protocols.
1080
1081       <column name="mcast_snooping_enable">
1082         Enable multicast snooping on the bridge. For now, the default
1083         is disabled.
1084       </column>
1085     </group>
1086
1087     <group title="Other Features">
1088       <column name="datapath_type">
1089         Name of datapath provider.  The kernel datapath has type
1090         <code>system</code>.  The userspace datapath has type
1091         <code>netdev</code>.  A manager may refer to the <ref
1092         table="Open_vSwitch" column="datapath_types"/> column of the <ref
1093         table="Open_vSwitch"/> table for a list of the types accepted by this
1094         Open vSwitch instance.
1095       </column>
1096
1097       <column name="external_ids" key="bridge-id">
1098         A unique identifier of the bridge.  On Citrix XenServer this will
1099         commonly be the same as
1100         <ref column="external_ids" key="xs-network-uuids"/>.
1101       </column>
1102
1103       <column name="external_ids" key="xs-network-uuids">
1104         Semicolon-delimited set of universally unique identifier(s) for the
1105         network with which this bridge is associated on a Citrix XenServer
1106         host.  The network identifiers are RFC 4122 UUIDs as displayed by,
1107         e.g., <code>xe network-list</code>.
1108       </column>
1109
1110       <column name="other_config" key="hwaddr">
1111         An Ethernet address in the form
1112         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1113         to set the hardware address of the local port and influence the
1114         datapath ID.
1115       </column>
1116
1117       <column name="other_config" key="forward-bpdu"
1118               type='{"type": "boolean"}'>
1119
1120         <p>
1121           Controls forwarding of BPDUs and other network control frames when
1122           NORMAL action is invoked.  When this option is <code>false</code> or
1123           unset, frames with reserved Ethernet addresses (see table below) will
1124           not be forwarded.  When this option is <code>true</code>, such frames
1125           will not be treated specially.
1126         </p>
1127
1128         <p>
1129           The above general rule has the following exceptions:
1130         </p>
1131
1132         <ul>
1133           <li>
1134             If STP is enabled on the bridge (see the <ref column="stp_enable"
1135             table="Bridge"/> column in the <ref table="Bridge"/> table), the
1136             bridge processes all received STP packets and never passes them to
1137             OpenFlow or forwards them.  This is true even if STP is disabled on
1138             an individual port.
1139           </li>
1140
1141           <li>
1142             If LLDP is enabled on an interface (see the <ref column="lldp"
1143             table="Interface"/> column in the <ref table="Interface"/> table),
1144             the interface processes received LLDP packets and never passes them
1145             to OpenFlow or forwards them.
1146           </li>
1147         </ul>
1148
1149         <p>
1150           Set this option to <code>true</code> if the Open vSwitch bridge
1151           connects different Ethernet networks and is not configured to
1152           participate in STP.
1153         </p>
1154
1155         <p>
1156           This option affects packets with the following destination MAC
1157           addresses:
1158         </p>
1159
1160         <dl>
1161           <dt><code>01:80:c2:00:00:00</code></dt>
1162           <dd>IEEE 802.1D Spanning Tree Protocol (STP).</dd>
1163
1164           <dt><code>01:80:c2:00:00:01</code></dt>
1165           <dd>IEEE Pause frame.</dd>
1166
1167           <dt><code>01:80:c2:00:00:0<var>x</var></code></dt>
1168           <dd>Other reserved protocols.</dd>
1169
1170           <dt><code>00:e0:2b:00:00:00</code></dt>
1171           <dd>Extreme Discovery Protocol (EDP).</dd>
1172
1173           <dt>
1174             <code>00:e0:2b:00:00:04</code> and <code>00:e0:2b:00:00:06</code>
1175           </dt>
1176           <dd>Ethernet Automatic Protection Switching (EAPS).</dd>
1177
1178           <dt><code>01:00:0c:cc:cc:cc</code></dt>
1179           <dd>
1180             Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP),
1181             Dynamic Trunking Protocol (DTP), Port Aggregation Protocol (PAgP),
1182             and others.
1183           </dd>
1184
1185           <dt><code>01:00:0c:cc:cc:cd</code></dt>
1186           <dd>Cisco Shared Spanning Tree Protocol PVSTP+.</dd>
1187
1188           <dt><code>01:00:0c:cd:cd:cd</code></dt>
1189           <dd>Cisco STP Uplink Fast.</dd>
1190
1191           <dt><code>01:00:0c:00:00:00</code></dt>
1192           <dd>Cisco Inter Switch Link.</dd>
1193
1194           <dt><code>01:00:0c:cc:cc:c<var>x</var></code></dt>
1195           <dd>Cisco CFM.</dd>
1196         </dl>
1197       </column>
1198
1199       <column name="other_config" key="mac-aging-time"
1200               type='{"type": "integer", "minInteger": 1}'>
1201         <p>
1202           The maximum number of seconds to retain a MAC learning entry for
1203           which no packets have been seen.  The default is currently 300
1204           seconds (5 minutes).  The value, if specified, is forced into a
1205           reasonable range, currently 15 to 3600 seconds.
1206         </p>
1207
1208         <p>
1209           A short MAC aging time allows a network to more quickly detect that a
1210           host is no longer connected to a switch port.  However, it also makes
1211           it more likely that packets will be flooded unnecessarily, when they
1212           are addressed to a connected host that rarely transmits packets.  To
1213           reduce the incidence of unnecessary flooding, use a MAC aging time
1214           longer than the maximum interval at which a host will ordinarily
1215           transmit packets.
1216         </p>
1217       </column>
1218
1219       <column name="other_config" key="mac-table-size"
1220               type='{"type": "integer", "minInteger": 1}'>
1221         <p>
1222           The maximum number of MAC addresses to learn.  The default is
1223           currently 2048.  The value, if specified, is forced into a reasonable
1224           range, currently 10 to 1,000,000.
1225         </p>
1226       </column>
1227     </group>
1228
1229     <group title="Common Columns">
1230       The overall purpose of these columns is described under <code>Common
1231       Columns</code> at the beginning of this document.
1232
1233       <column name="other_config"/>
1234       <column name="external_ids"/>
1235     </group>
1236   </table>
1237   
1238   <table name="Port" table="Port or bond configuration.">
1239     <p>A port within a <ref table="Bridge"/>.</p>
1240     <p>Most commonly, a port has exactly one ``interface,'' pointed to by its
1241     <ref column="interfaces"/> column.  Such a port logically
1242     corresponds to a port on a physical Ethernet switch.  A port
1243     with more than one interface is a ``bonded port'' (see
1244     <ref group="Bonding Configuration"/>).</p>
1245     <p>Some properties that one might think as belonging to a port are actually
1246     part of the port's <ref table="Interface"/> members.</p>
1247
1248     <column name="name">
1249       Port name.  For a non-bonded port, this should be the same as its
1250       interface's name.  Port names must otherwise be unique among the names of
1251       ports, interfaces, and bridges on a host.  Because port and interfaces
1252       names are usually the same, the restrictions on the <ref
1253       table="Interface" column="name"/> column in the <ref table="Interface"/>
1254       table, particularly on length, also apply to port names.  Refer to the
1255       documentation for <ref table="Interface"/> names for details.
1256     </column>
1257
1258     <column name="interfaces">
1259       The port's interfaces.  If there is more than one, this is a
1260       bonded Port.
1261     </column>
1262
1263     <group title="VLAN Configuration">
1264       <p>Bridge ports support the following types of VLAN configuration:</p>
1265       <dl>
1266         <dt>trunk</dt>
1267         <dd>
1268           <p>
1269             A trunk port carries packets on one or more specified VLANs
1270             specified in the <ref column="trunks"/> column (often, on every
1271             VLAN).  A packet that ingresses on a trunk port is in the VLAN
1272             specified in its 802.1Q header, or VLAN 0 if the packet has no
1273             802.1Q header.  A packet that egresses through a trunk port will
1274             have an 802.1Q header if it has a nonzero VLAN ID.
1275           </p>
1276
1277           <p>
1278             Any packet that ingresses on a trunk port tagged with a VLAN that
1279             the port does not trunk is dropped.
1280           </p>
1281         </dd>
1282
1283         <dt>access</dt>
1284         <dd>
1285           <p>
1286             An access port carries packets on exactly one VLAN specified in the
1287             <ref column="tag"/> column.  Packets egressing on an access port
1288             have no 802.1Q header.
1289           </p>
1290
1291           <p>
1292             Any packet with an 802.1Q header with a nonzero VLAN ID that
1293             ingresses on an access port is dropped, regardless of whether the
1294             VLAN ID in the header is the access port's VLAN ID.
1295           </p>
1296         </dd>
1297
1298         <dt>native-tagged</dt>
1299         <dd>
1300           A native-tagged port resembles a trunk port, with the exception that
1301           a packet without an 802.1Q header that ingresses on a native-tagged
1302           port is in the ``native VLAN'' (specified in the <ref column="tag"/>
1303           column).
1304         </dd>
1305
1306         <dt>native-untagged</dt>
1307         <dd>
1308           A native-untagged port resembles a native-tagged port, with the
1309           exception that a packet that egresses on a native-untagged port in
1310           the native VLAN will not have an 802.1Q header.
1311         </dd>
1312       </dl>
1313       <p>
1314         A packet will only egress through bridge ports that carry the VLAN of
1315         the packet, as described by the rules above.
1316       </p>
1317
1318       <column name="vlan_mode">
1319         <p>
1320           The VLAN mode of the port, as described above.  When this column is
1321           empty, a default mode is selected as follows:
1322         </p>
1323         <ul>
1324           <li>
1325             If <ref column="tag"/> contains a value, the port is an access
1326             port.  The <ref column="trunks"/> column should be empty.
1327           </li>
1328           <li>
1329             Otherwise, the port is a trunk port.  The <ref column="trunks"/>
1330             column value is honored if it is present.
1331           </li>
1332         </ul>
1333       </column>
1334
1335       <column name="tag">
1336         <p>
1337           For an access port, the port's implicitly tagged VLAN.  For a
1338           native-tagged or native-untagged port, the port's native VLAN.  Must
1339           be empty if this is a trunk port.
1340         </p>
1341       </column>
1342
1343       <column name="trunks">
1344         <p>
1345           For a trunk, native-tagged, or native-untagged port, the 802.1Q VLAN
1346           or VLANs that this port trunks; if it is empty, then the port trunks
1347           all VLANs.  Must be empty if this is an access port.
1348         </p>
1349         <p>
1350           A native-tagged or native-untagged port always trunks its native
1351           VLAN, regardless of whether <ref column="trunks"/> includes that
1352           VLAN.
1353         </p>
1354       </column>
1355
1356       <column name="other_config" key="priority-tags"
1357               type='{"type": "boolean"}'>
1358         <p>
1359           An 802.1Q header contains two important pieces of information: a VLAN
1360           ID and a priority.  A frame with a zero VLAN ID, called a
1361           ``priority-tagged'' frame, is supposed to be treated the same way as
1362           a frame without an 802.1Q header at all (except for the priority).
1363         </p>
1364
1365         <p>
1366           However, some network elements ignore any frame that has 802.1Q
1367           header at all, even when the VLAN ID is zero.  Therefore, by default
1368           Open vSwitch does not output priority-tagged frames, instead omitting
1369           the 802.1Q header entirely if the VLAN ID is zero.  Set this key to
1370           <code>true</code> to enable priority-tagged frames on a port.
1371         </p>
1372
1373         <p>
1374           Regardless of this setting, Open vSwitch omits the 802.1Q header on
1375           output if both the VLAN ID and priority would be zero.
1376         </p>
1377
1378         <p>
1379           All frames output to native-tagged ports have a nonzero VLAN ID, so
1380           this setting is not meaningful on native-tagged ports.
1381         </p>
1382       </column>
1383     </group>
1384
1385     <group title="Bonding Configuration">
1386       <p>A port that has more than one interface is a ``bonded port.'' Bonding
1387       allows for load balancing and fail-over.</p>
1388
1389       <p>
1390         The following types of bonding will work with any kind of upstream
1391         switch.  On the upstream switch, do not configure the interfaces as a
1392         bond:
1393       </p>
1394
1395       <dl>
1396         <dt><code>balance-slb</code></dt>
1397         <dd>
1398           Balances flows among slaves based on source MAC address and output
1399           VLAN, with periodic rebalancing as traffic patterns change.
1400         </dd>
1401
1402         <dt><code>active-backup</code></dt>
1403         <dd>
1404           Assigns all flows to one slave, failing over to a backup slave when
1405           the active slave is disabled.  This is the only bonding mode in which
1406           interfaces may be plugged into different upstream switches.
1407         </dd>
1408       </dl>
1409
1410       <p>
1411         The following modes require the upstream switch to support 802.3ad with
1412         successful LACP negotiation. If LACP negotiation fails and
1413         other-config:lacp-fallback-ab is true, then <code>active-backup</code>
1414         mode is used:
1415       </p>
1416
1417       <dl>
1418         <dt><code>balance-tcp</code></dt>
1419         <dd>
1420           Balances flows among slaves based on L2, L3, and L4 protocol
1421           information such as destination MAC address, IP address, and TCP
1422           port.
1423         </dd>
1424       </dl>
1425
1426       <p>These columns apply only to bonded ports.  Their values are
1427       otherwise ignored.</p>
1428
1429       <column name="bond_mode">
1430         <p>The type of bonding used for a bonded port.  Defaults to
1431         <code>active-backup</code> if unset.
1432         </p>
1433       </column>
1434
1435       <column name="other_config" key="bond-hash-basis"
1436               type='{"type": "integer"}'>
1437         An integer hashed along with flows when choosing output slaves in load
1438         balanced bonds.  When changed, all flows will be assigned different
1439         hash values possibly causing slave selection decisions to change.  Does
1440         not affect bonding modes which do not employ load balancing such as
1441         <code>active-backup</code>.
1442       </column>
1443
1444       <group title="Link Failure Detection">
1445         <p>
1446           An important part of link bonding is detecting that links are down so
1447           that they may be disabled.  These settings determine how Open vSwitch
1448           detects link failure.
1449         </p>
1450
1451         <column name="other_config" key="bond-detect-mode"
1452                 type='{"type": "string", "enum": ["set", ["carrier", "miimon"]]}'>
1453           The means used to detect link failures.  Defaults to
1454           <code>carrier</code> which uses each interface's carrier to detect
1455           failures.  When set to <code>miimon</code>, will check for failures
1456           by polling each interface's MII.
1457         </column>
1458
1459         <column name="other_config" key="bond-miimon-interval"
1460                 type='{"type": "integer"}'>
1461           The interval, in milliseconds, between successive attempts to poll
1462           each interface's MII.  Relevant only when <ref column="other_config"
1463           key="bond-detect-mode"/> is <code>miimon</code>.
1464         </column>
1465
1466         <column name="bond_updelay">
1467           <p>
1468             The number of milliseconds for which the link must stay up on an
1469             interface before the interface is considered to be up.  Specify
1470             <code>0</code> to enable the interface immediately.
1471           </p>
1472
1473           <p>
1474             This setting is honored only when at least one bonded interface is
1475             already enabled.  When no interfaces are enabled, then the first
1476             bond interface to come up is enabled immediately.
1477           </p>
1478         </column>
1479
1480         <column name="bond_downdelay">
1481           The number of milliseconds for which the link must stay down on an
1482           interface before the interface is considered to be down.  Specify
1483           <code>0</code> to disable the interface immediately.
1484         </column>
1485       </group>
1486
1487       <group title="LACP Configuration">
1488         <p>
1489           LACP, the Link Aggregation Control Protocol, is an IEEE standard that
1490           allows switches to automatically detect that they are connected by
1491           multiple links and aggregate across those links.  These settings
1492           control LACP behavior.
1493         </p>
1494
1495         <column name="lacp">
1496           Configures LACP on this port.  LACP allows directly connected
1497           switches to negotiate which links may be bonded.  LACP may be enabled
1498           on non-bonded ports for the benefit of any switches they may be
1499           connected to.  <code>active</code> ports are allowed to initiate LACP
1500           negotiations.  <code>passive</code> ports are allowed to participate
1501           in LACP negotiations initiated by a remote switch, but not allowed to
1502           initiate such negotiations themselves.  If LACP is enabled on a port
1503           whose partner switch does not support LACP, the bond will be
1504           disabled, unless other-config:lacp-fallback-ab is set to true.
1505           Defaults to <code>off</code> if unset.
1506         </column>
1507
1508         <column name="other_config" key="lacp-system-id">
1509           The LACP system ID of this <ref table="Port"/>.  The system ID of a
1510           LACP bond is used to identify itself to its partners.  Must be a
1511           nonzero MAC address. Defaults to the bridge Ethernet address if
1512           unset.
1513         </column>
1514
1515         <column name="other_config" key="lacp-system-priority"
1516                 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
1517           The LACP system priority of this <ref table="Port"/>.  In LACP
1518           negotiations, link status decisions are made by the system with the
1519           numerically lower priority.
1520         </column>
1521
1522         <column name="other_config" key="lacp-time"
1523                 type='{"type": "string", "enum": ["set", ["fast", "slow"]]}'>
1524           <p>
1525             The LACP timing which should be used on this <ref table="Port"/>.
1526             By default <code>slow</code> is used.  When configured to be
1527             <code>fast</code> LACP heartbeats are requested at a rate of once
1528             per second causing connectivity problems to be detected more
1529             quickly.  In <code>slow</code> mode, heartbeats are requested at a
1530             rate of once every 30 seconds.
1531           </p>
1532         </column>
1533
1534         <column name="other_config" key="lacp-fallback-ab"
1535                 type='{"type": "boolean"}'>
1536           <p>
1537             Determines the behavior of openvswitch bond in LACP mode. If
1538             the partner switch does not support LACP, setting this option
1539             to <code>true</code> allows openvswitch to fallback to
1540             active-backup. If the option is set to <code>false</code>, the
1541             bond will be disabled. In both the cases, once the partner switch
1542             is configured to LACP mode, the bond will use LACP.
1543           </p>
1544         </column>
1545       </group>
1546
1547       <group title="Rebalancing Configuration">
1548         <p>
1549           These settings control behavior when a bond is in
1550           <code>balance-slb</code> or <code>balance-tcp</code> mode.
1551         </p>
1552
1553         <column name="other_config" key="bond-rebalance-interval"
1554                 type='{"type": "integer", "minInteger": 0, "maxInteger": 10000}'>
1555           For a load balanced bonded port, the number of milliseconds between
1556           successive attempts to rebalance the bond, that is, to move flows
1557           from one interface on the bond to another in an attempt to keep usage
1558           of each interface roughly equal.  If zero, load balancing is disabled
1559           on the bond (link failure still cause flows to move).  If
1560           less than 1000ms, the rebalance interval will be 1000ms.
1561         </column>
1562       </group>
1563
1564       <column name="bond_fake_iface">
1565         For a bonded port, whether to create a fake internal interface with the
1566         name of the port.  Use only for compatibility with legacy software that
1567         requires this.
1568       </column>
1569     </group>
1570
1571     <group title="Spanning Tree Protocol">
1572       <p>
1573         The configuration here is only meaningful, and the status is only
1574         populated, when 802.1D-1998 Spanning Tree Protocol is enabled on the
1575         port's <ref column="Bridge"/> with its <ref column="stp_enable"/>
1576         column.
1577       </p>
1578
1579       <group title="STP Configuration">
1580         <column name="other_config" key="stp-enable"
1581                 type='{"type": "boolean"}'>
1582           When STP is enabled on a bridge, it is enabled by default on all of
1583           the bridge's ports except bond, internal, and mirror ports (which do
1584           not work with STP).  If this column's value is <code>false</code>,
1585           STP is disabled on the port.
1586         </column>
1587
1588         <column name="other_config" key="stp-port-num"
1589                 type='{"type": "integer", "minInteger": 1, "maxInteger": 255}'>
1590           The port number used for the lower 8 bits of the port-id.  By
1591           default, the numbers will be assigned automatically.  If any
1592           port's number is manually configured on a bridge, then they
1593           must all be.
1594         </column>
1595
1596         <column name="other_config" key="stp-port-priority"
1597                 type='{"type": "integer", "minInteger": 0, "maxInteger": 255}'>
1598           The port's relative priority value for determining the root
1599           port (the upper 8 bits of the port-id).  A port with a lower
1600           port-id will be chosen as the root port.  By default, the
1601           priority is 0x80.
1602         </column>
1603
1604         <column name="other_config" key="stp-path-cost"
1605                 type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
1606           Spanning tree path cost for the port.  A lower number indicates
1607           a faster link.  By default, the cost is based on the maximum
1608           speed of the link.
1609         </column>
1610       </group>
1611
1612       <group title="STP Status">
1613         <column name="status" key="stp_port_id">
1614           The port ID used in spanning tree advertisements for this port, as 4
1615           hex digits.  Configuring the port ID is described in the
1616           <code>stp-port-num</code> and <code>stp-port-priority</code> keys of
1617           the <code>other_config</code> section earlier.
1618         </column>
1619         <column name="status" key="stp_state"
1620                 type='{"type": "string", "enum": ["set",
1621                       ["disabled", "listening", "learning",
1622                       "forwarding", "blocking"]]}'>
1623           STP state of the port.
1624         </column>
1625         <column name="status" key="stp_sec_in_state"
1626                 type='{"type": "integer", "minInteger": 0}'>
1627           The amount of time this port has been in the current STP state, in
1628           seconds.
1629         </column>
1630         <column name="status" key="stp_role"
1631                 type='{"type": "string", "enum": ["set",
1632                       ["root", "designated", "alternate"]]}'>
1633           STP role of the port.
1634         </column>
1635       </group>
1636     </group>
1637
1638     <group title="Rapid Spanning Tree Protocol">
1639       <p>
1640         The configuration here is only meaningful, and the status and
1641         statistics are only populated, when 802.1D-1998 Spanning Tree Protocol
1642         is enabled on the port's <ref column="Bridge"/> with its <ref
1643         column="stp_enable"/> column.
1644       </p>
1645
1646       <group title="RSTP Configuration">
1647         <column name="other_config" key="rstp-enable"
1648                 type='{"type": "boolean"}'>
1649           When RSTP is enabled on a bridge, it is enabled by default on all of
1650           the bridge's ports except bond, internal, and mirror ports (which do
1651           not work with RSTP).  If this column's value is <code>false</code>,
1652           RSTP is disabled on the port.
1653         </column>
1654
1655         <column name="other_config" key="rstp-port-priority"
1656                 type='{"type": "integer", "minInteger": 0, "maxInteger": 240}'>
1657           The port's relative priority value for determining the root port, in
1658           multiples of 16.  By default, the port priority is 0x80 (128).  Any
1659           value in the lower 4 bits is rounded off.  The significant upper 4
1660           bits become the upper 4 bits of the port-id.  A port with the lowest
1661           port-id is elected as the root.
1662         </column>
1663
1664         <column name="other_config" key="rstp-port-num"
1665                 type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
1666           The local RSTP port number, used as the lower 12 bits of the port-id.
1667           By default the port numbers are assigned automatically, and typically
1668           may not correspond to the OpenFlow port numbers.  A port with the
1669           lowest port-id is elected as the root.
1670         </column>
1671
1672         <column name="other_config" key="rstp-port-path-cost"
1673                 type='{"type": "integer"}'>
1674           The port path cost.  The Port's contribution, when it is
1675           the Root Port, to the Root Path Cost for the Bridge.  By default the
1676           cost is automatically calculated from the port's speed.
1677         </column>
1678
1679         <column name="other_config" key="rstp-port-admin-edge"
1680                 type='{"type": "boolean"}'>
1681           The admin edge port parameter for the Port.  Default is
1682           <code>false</code>.
1683         </column>
1684
1685         <column name="other_config" key="rstp-port-auto-edge"
1686                 type='{"type": "boolean"}'>
1687           The auto edge port parameter for the Port.  Default is
1688           <code>true</code>.
1689         </column>
1690
1691         <column name="other_config" key="rstp-port-mcheck"
1692                 type='{"type": "boolean"}'>
1693           <p>
1694             The mcheck port parameter for the Port.  Default is
1695             <code>false</code>.  May be set to force the Port Protocol
1696             Migration state machine to transmit RST BPDUs for a
1697             MigrateTime period, to test whether all STP Bridges on the
1698             attached LAN have been removed and the Port can continue to
1699             transmit RSTP BPDUs.  Setting mcheck has no effect if the
1700             Bridge is operating in STP Compatibility mode.
1701           </p>
1702           <p>
1703             Changing the value from <code>true</code> to
1704             <code>false</code> has no effect, but needs to be done if
1705             this behavior is to be triggered again by subsequently
1706             changing the value from <code>false</code> to
1707             <code>true</code>.
1708           </p>
1709         </column>
1710       </group>
1711
1712       <group title="RSTP Status">
1713         <column name="rstp_status" key="rstp_port_id">
1714           The port ID used in spanning tree advertisements for this port, as 4
1715           hex digits.  Configuring the port ID is described in the
1716           <code>rstp-port-num</code> and <code>rstp-port-priority</code> keys
1717           of the <code>other_config</code> section earlier.
1718         </column>
1719         <column name="rstp_status" key="rstp_port_role"
1720                 type='{"type": "string", "enum": ["set",
1721                       ["Root", "Designated", "Alternate", "Backup", "Disabled"]]}'>
1722           RSTP role of the port.
1723         </column>
1724         <column name="rstp_status" key="rstp_port_state"
1725                 type='{"type": "string", "enum": ["set",
1726                       ["Disabled", "Learning", "Forwarding", "Discarding"]]}'>
1727           RSTP state of the port.
1728         </column>
1729         <column name="rstp_status" key="rstp_designated_bridge_id">
1730           The port's RSTP designated bridge ID, in the same form as <ref
1731           column="rstp_status" key="rstp_bridge_id"/> in the <ref
1732           table="Bridge"/> table.
1733         </column>
1734         <column name="rstp_status" key="rstp_designated_port_id">
1735           The port's RSTP designated port ID, as 4 hex digits.
1736         </column>
1737         <column name="rstp_status" key="rstp_designated_path_cost"
1738                 type='{"type": "integer"}'>
1739           The port's RSTP designated path cost.  Lower is better.
1740         </column>
1741       </group>
1742
1743       <group title="RSTP Statistics">
1744         <column name="rstp_statistics" key="rstp_tx_count">
1745           Number of RSTP BPDUs transmitted through this port.
1746         </column>
1747         <column name="rstp_statistics" key="rstp_rx_count">
1748           Number of valid RSTP BPDUs received by this port.
1749         </column>
1750         <column name="rstp_statistics" key="rstp_error_count">
1751           Number of invalid RSTP BPDUs received by this port.
1752         </column>
1753         <column name="rstp_statistics" key="rstp_uptime">
1754           The duration covered by the other RSTP statistics, in seconds.
1755         </column>
1756       </group>
1757     </group>
1758
1759     <group title="Multicast Snooping">
1760       <column name="other_config" key="mcast-snooping-flood"
1761               type='{"type": "boolean"}'>
1762         <p>
1763           If set to <code>true</code>, multicast packets (except Reports) are
1764           unconditionally forwarded to the specific port.
1765         </p>
1766       </column>
1767       <column name="other_config" key="mcast-snooping-flood-reports"
1768               type='{"type": "boolean"}'>
1769         <p>
1770           If set to <code>true</code>, multicast Reports are unconditionally
1771           forwarded to the specific port.
1772         </p>
1773       </column>
1774     </group>
1775
1776     <group title="Other Features">
1777       <column name="qos">
1778         Quality of Service configuration for this port.
1779       </column>
1780
1781       <column name="mac">
1782         The MAC address to use for this port for the purpose of choosing the
1783         bridge's MAC address.  This column does not necessarily reflect the
1784         port's actual MAC address, nor will setting it change the port's actual
1785         MAC address.
1786       </column>
1787
1788       <column name="fake_bridge">
1789         Does this port represent a sub-bridge for its tagged VLAN within the
1790         Bridge?  See ovs-vsctl(8) for more information.
1791       </column>
1792
1793       <column name="external_ids" key="fake-bridge-id-*">
1794         External IDs for a fake bridge (see the <ref column="fake_bridge"/>
1795         column) are defined by prefixing a <ref table="Bridge"/> <ref
1796         table="Bridge" column="external_ids"/> key with
1797         <code>fake-bridge-</code>,
1798         e.g. <code>fake-bridge-xs-network-uuids</code>.
1799       </column>
1800
1801       <column name="other_config" key="transient"
1802               type='{"type": "boolean"}'>
1803         <p>
1804           If set to <code>true</code>, the port will be removed when
1805           <code>ovs-ctl start --delete-transient-ports</code> is used.
1806         </p>
1807       </column>
1808     </group>
1809
1810     <column name="bond_active_slave">
1811       For a bonded port, record the mac address of the current active slave.
1812     </column>
1813
1814     <group title="Port Statistics">
1815       <p>
1816         Key-value pairs that report port statistics.  The update period
1817         is controlled by <ref column="other_config"
1818         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
1819       </p>
1820       <group title="Statistics: STP transmit and receive counters">
1821         <column name="statistics" key="stp_tx_count">
1822           Number of STP BPDUs sent on this port by the spanning
1823           tree library.
1824         </column>
1825         <column name="statistics" key="stp_rx_count">
1826           Number of STP BPDUs received on this port and accepted by the
1827           spanning tree library.
1828         </column>
1829         <column name="statistics" key="stp_error_count">
1830           Number of bad STP BPDUs received on this port.  Bad BPDUs
1831           include runt packets and those with an unexpected protocol ID.
1832         </column>
1833       </group>
1834     </group>
1835
1836     <group title="Common Columns">
1837       The overall purpose of these columns is described under <code>Common
1838       Columns</code> at the beginning of this document.
1839
1840       <column name="other_config"/>
1841       <column name="external_ids"/>
1842     </group>
1843   </table>
1844
1845   <table name="Interface" title="One physical network device in a Port.">
1846     An interface within a <ref table="Port"/>.
1847
1848     <group title="Core Features">
1849       <column name="name">
1850         <p>
1851           Interface name.  Should be alphanumeric.  For non-bonded port, this
1852           should be the same as the port name.  It must otherwise be unique
1853           among the names of ports, interfaces, and bridges on a host.
1854         </p>
1855
1856         <p>
1857           The maximum length of an interface name depends on the underlying
1858           datapath:
1859         </p>
1860
1861         <ul>
1862           <li>
1863             The names of interfaces implemented as Linux and BSD network
1864             devices, including interfaces with type <code>internal</code>,
1865             <code>tap</code>, or <code>system</code> plus the different types
1866             of tunnel ports, are limited to 15 bytes. Windows limits these
1867             names to 255 bytes.
1868           </li>
1869
1870           <li>
1871             The names of patch ports are not used in the underlying datapath,
1872             so operating system restrictions do not apply.  Thus, they may have
1873             arbitrary length.
1874           </li>
1875         </ul>
1876
1877         <p>
1878           Regardless of other restrictions, OpenFlow only supports 15-byte
1879           names, which means that <code>ovs-ofctl</code> and OpenFlow
1880           controllers will show names truncated to 15 bytes.
1881         </p>
1882       </column>
1883
1884       <column name="ifindex">
1885         A positive interface index as defined for SNMP MIB-II in RFCs 1213 and
1886         2863, if the interface has one, otherwise 0.  The ifindex is useful for
1887         seamless integration with protocols such as SNMP and sFlow.
1888       </column>
1889
1890       <column name="mac_in_use">
1891         The MAC address in use by this interface.
1892       </column>
1893
1894       <column name="mac">
1895         <p>Ethernet address to set for this interface.  If unset then the
1896         default MAC address is used:</p>
1897         <ul>
1898           <li>For the local interface, the default is the lowest-numbered MAC
1899           address among the other bridge ports, either the value of the
1900           <ref table="Port" column="mac"/> in its <ref table="Port"/> record,
1901           if set, or its actual MAC (for bonded ports, the MAC of its slave
1902           whose name is first in alphabetical order).  Internal ports and
1903           bridge ports that are used as port mirroring destinations (see the
1904           <ref table="Mirror"/> table) are ignored.</li>
1905           <li>For other internal interfaces, the default MAC is randomly
1906           generated.</li>
1907           <li>External interfaces typically have a MAC address associated with
1908           their hardware.</li>
1909         </ul>
1910         <p>Some interfaces may not have a software-controllable MAC
1911         address.</p>
1912       </column>
1913
1914       <column name="error">
1915         If the configuration of the port failed, as indicated by -1 in <ref
1916         column="ofport"/>, Open vSwitch sets this column to an error
1917         description in human readable form.  Otherwise, Open vSwitch clears
1918         this column.
1919       </column>
1920
1921       <group title="OpenFlow Port Number">
1922         <p>
1923           When a client adds a new interface, Open vSwitch chooses an OpenFlow
1924           port number for the new port.  If the client that adds the port fills
1925           in <ref column="ofport_request"/>, then Open vSwitch tries to use its
1926           value as the OpenFlow port number.  Otherwise, or if the requested
1927           port number is already in use or cannot be used for another reason,
1928           Open vSwitch automatically assigns a free port number.  Regardless of
1929           how the port number was obtained, Open vSwitch then reports in <ref
1930           column="ofport"/> the port number actually assigned.
1931         </p>
1932
1933         <p>
1934           Open vSwitch limits the port numbers that it automatically assigns to
1935           the range 1 through 32,767, inclusive.  Controllers therefore have
1936           free use of ports 32,768 and up.
1937         </p>
1938
1939         <column name="ofport">
1940           <p>
1941             OpenFlow port number for this interface.  Open vSwitch sets this
1942             column's value, so other clients should treat it as read-only.
1943           </p>
1944           <p>
1945             The OpenFlow ``local'' port (<code>OFPP_LOCAL</code>) is 65,534.
1946             The other valid port numbers are in the range 1 to 65,279,
1947             inclusive.  Value -1 indicates an error adding the interface.
1948           </p>
1949         </column>
1950
1951         <column name="ofport_request"
1952                 type='{"type": "integer", "minInteger": 1, "maxInteger": 65279}'>
1953           <p>
1954             Requested OpenFlow port number for this interface.
1955           </p>
1956
1957           <p>
1958             A client should ideally set this column's value in the same
1959             database transaction that it uses to create the interface.  Open
1960             vSwitch version 2.1 and later will honor a later request for a
1961             specific port number, althuogh it might confuse some controllers:
1962             OpenFlow does not have a way to announce a port number change, so
1963             Open vSwitch represents it over OpenFlow as a port deletion
1964             followed immediately by a port addition.
1965           </p>
1966
1967           <p>
1968             If <ref column="ofport_request"/> is set or changed to some other
1969             port's automatically assigned port number, Open vSwitch chooses a
1970             new port number for the latter port.
1971           </p>
1972         </column>
1973       </group>
1974     </group>
1975
1976     <group title="System-Specific Details">
1977       <column name="type">
1978         <p>
1979           The interface type.  The types supported by a particular instance of
1980           Open vSwitch are listed in the <ref table="Open_vSwitch"
1981           column="iface_types"/> column in the <ref table="Open_vSwitch"/>
1982           table.  The following types are defined:
1983         </p>
1984
1985         <dl>
1986           <dt><code>system</code></dt>
1987           <dd>An ordinary network device, e.g. <code>eth0</code> on Linux.
1988           Sometimes referred to as ``external interfaces'' since they are
1989           generally connected to hardware external to that on which the Open
1990           vSwitch is running.  The empty string is a synonym for
1991           <code>system</code>.</dd>
1992
1993           <dt><code>internal</code></dt>
1994           <dd>A simulated network device that sends and receives traffic.  An
1995           internal interface whose <ref column="name"/> is the same as its
1996           bridge's <ref table="Open_vSwitch" column="name"/> is called the
1997           ``local interface.''  It does not make sense to bond an internal
1998           interface, so the terms ``port'' and ``interface'' are often used
1999           imprecisely for internal interfaces.</dd>
2000
2001           <dt><code>tap</code></dt>
2002           <dd>A TUN/TAP device managed by Open vSwitch.</dd>
2003
2004           <dt><code>geneve</code></dt>
2005           <dd>
2006             An Ethernet over Geneve (<code>http://tools.ietf.org/html/draft-ietf-nvo3-geneve</code>)
2007             IPv4/IPv6 tunnel.
2008
2009             A description of how to match and set Geneve options can be found
2010             in the <code>ovs-ofctl</code> manual page.
2011           </dd>
2012
2013           <dt><code>gre</code></dt>
2014           <dd>
2015             An Ethernet over RFC 2890 Generic Routing Encapsulation over IPv4/IPv6
2016             tunnel.
2017           </dd>
2018
2019           <dt><code>ipsec_gre</code></dt>
2020           <dd>
2021             An Ethernet over RFC 2890 Generic Routing Encapsulation over IPv4/IPv6
2022             IPsec tunnel.
2023           </dd>
2024
2025           <dt><code>vxlan</code></dt>
2026           <dd>
2027             <p>
2028               An Ethernet tunnel over the UDP-based VXLAN protocol described in
2029               RFC 7348.
2030             </p>
2031             <p>
2032               Open vSwitch uses IANA-assigned UDP destination port 4789.  The
2033               source port used for VXLAN traffic varies on a per-flow basis
2034               and is in the ephemeral port range.
2035             </p>
2036           </dd>
2037
2038           <dt><code>lisp</code></dt>
2039           <dd>
2040             <p>
2041               A layer 3 tunnel over the experimental, UDP-based Locator/ID
2042               Separation Protocol (RFC 6830).
2043             </p>
2044             <p>
2045               Only IPv4 and IPv6 packets are supported by the protocol, and
2046               they are sent and received without an Ethernet header.  Traffic
2047               to/from LISP ports is expected to be configured explicitly, and
2048               the ports are not intended to participate in learning based
2049               switching.  As such, they are always excluded from packet
2050               flooding.
2051             </p>
2052           </dd>
2053
2054           <dt><code>stt</code></dt>
2055           <dd>
2056             The Stateless TCP Tunnel (STT) is particularly useful when tunnel
2057             endpoints are in end-systems, as it utilizes the capabilities of
2058             standard network interface cards to improve performance.  STT utilizes
2059             a TCP-like header inside the IP header. It is stateless, i.e., there is
2060             no TCP connection state of any kind associated with the tunnel.  The
2061             TCP-like header is used to leverage the capabilities of existing
2062             network interface cards, but should not be interpreted as implying
2063             any sort of connection state between endpoints.
2064             Since the STT protocol does not engage in the usual TCP 3-way handshake,
2065             so it will have difficulty traversing stateful firewalls.
2066             The protocol is documented at
2067             https://tools.ietf.org/html/draft-davie-stt
2068
2069             All traffic uses a default destination port of 7471.
2070           </dd>
2071
2072           <dt><code>patch</code></dt>
2073           <dd>
2074             A pair of virtual devices that act as a patch cable.
2075           </dd>
2076
2077           <dt><code>null</code></dt>
2078           <dd>An ignored interface. Deprecated and slated for removal in
2079           February 2013.</dd>
2080         </dl>
2081       </column>
2082     </group>
2083
2084     <group title="Tunnel Options">
2085       <p>
2086         These options apply to interfaces with <ref column="type"/> of
2087         <code>geneve</code>, <code>gre</code>, <code>ipsec_gre</code>,
2088         <code>vxlan</code>, <code>lisp</code> and <code>stt</code>.
2089       </p>
2090
2091       <p>
2092         Each tunnel must be uniquely identified by the combination of <ref
2093         column="type"/>, <ref column="options" key="remote_ip"/>, <ref
2094         column="options" key="local_ip"/>, and <ref column="options"
2095         key="in_key"/>.  If two ports are defined that are the same except one
2096         has an optional identifier and the other does not, the more specific
2097         one is matched first.  <ref column="options" key="in_key"/> is
2098         considered more specific than <ref column="options" key="local_ip"/> if
2099         a port defines one and another port defines the other.
2100       </p>
2101
2102       <column name="options" key="remote_ip">
2103         <p>Required.  The remote tunnel endpoint, one of:</p>
2104
2105         <ul>
2106           <li>
2107             An IPv4 or IPv6 address (not a DNS name), e.g. <code>192.168.0.123</code>.
2108             Only unicast endpoints are supported.
2109           </li>
2110           <li>
2111             The word <code>flow</code>.  The tunnel accepts packets from any
2112             remote tunnel endpoint.  To process only packets from a specific
2113             remote tunnel endpoint, the flow entries may match on the
2114             <code>tun_src</code> or <code>tun_ipv6_src</code>field.  When
2115             sending packets to a <code>remote_ip=flow</code> tunnel, the flow
2116             actions must explicitly set the <code>tun_dst</code> or
2117             <code>tun_ipv6_dst</code> field to the IP address of the desired
2118             remote tunnel endpoint, e.g. with a <code>set_field</code> action.
2119           </li>
2120         </ul>
2121
2122         <p>
2123           The remote tunnel endpoint for any packet received from a tunnel
2124           is available in the <code>tun_src</code> field for matching in the
2125           flow table.
2126         </p>
2127       </column>
2128
2129       <column name="options" key="local_ip">
2130         <p>
2131           Optional.  The tunnel destination IP that received packets must
2132           match.  Default is to match all addresses.  If specified, may be one
2133           of:
2134         </p>
2135
2136         <ul>
2137           <li>
2138             An IPv4/IPv6 address (not a DNS name), e.g. <code>192.168.12.3</code>.
2139           </li>
2140           <li>
2141             The word <code>flow</code>.  The tunnel accepts packets sent to any
2142             of the local IP addresses of the system running OVS.  To process
2143             only packets sent to a specific IP address, the flow entries may
2144             match on the <code>tun_dst</code> or <code>tun_ipv6_dst</code> field.
2145             When sending packets to a <code>local_ip=flow</code> tunnel, the flow
2146             actions may explicitly set the <code>tun_src</code> or <code>tun_ipv6_src</code>
2147             field to the desired IP address, e.g. with a <code>set_field</code> action.
2148             However, while routing the tunneled packet out, the local system may
2149             override the specified address with the local IP address configured for the
2150             outgoing system interface.
2151
2152             <p>
2153               This option is valid only for tunnels also configured with the
2154               <code>remote_ip=flow</code> option.
2155             </p>
2156           </li>
2157         </ul>
2158
2159         <p>
2160           The tunnel destination IP address for any packet received from a
2161           tunnel is available in the <code>tun_dst</code> or <code>tun_ipv6_dst</code>
2162           field for matching in the flow table.
2163         </p>
2164       </column>
2165
2166       <column name="options" key="in_key">
2167         <p>Optional.  The key that received packets must contain, one of:</p>
2168
2169         <ul>
2170           <li>
2171             <code>0</code>.  The tunnel receives packets with no key or with a
2172             key of 0.  This is equivalent to specifying no <ref column="options"
2173             key="in_key"/> at all.
2174           </li>
2175           <li>
2176             A positive 24-bit (for Geneve, VXLAN, and LISP), 32-bit (for GRE)
2177             or 64-bit (for STT) number.  The tunnel receives only
2178             packets with the specified key.
2179           </li>
2180           <li>
2181             The word <code>flow</code>.  The tunnel accepts packets with any
2182             key.  The key will be placed in the <code>tun_id</code> field for
2183             matching in the flow table.  The <code>ovs-ofctl</code> manual page
2184             contains additional information about matching fields in OpenFlow
2185             flows.
2186           </li>
2187         </ul>
2188
2189         <p>
2190         </p>
2191       </column>
2192
2193       <column name="options" key="out_key">
2194         <p>Optional.  The key to be set on outgoing packets, one of:</p>
2195
2196         <ul>
2197           <li>
2198             <code>0</code>.  Packets sent through the tunnel will have no key.
2199             This is equivalent to specifying no <ref column="options"
2200             key="out_key"/> at all.
2201           </li>
2202           <li>
2203             A positive 24-bit (for Geneve, VXLAN and LISP), 32-bit (for GRE) or
2204             64-bit (for STT) number.  Packets sent through the tunnel
2205             will have the specified key.
2206           </li>
2207           <li>
2208             The word <code>flow</code>.  Packets sent through the tunnel will
2209             have the key set using the <code>set_tunnel</code> Nicira OpenFlow
2210             vendor extension (0 is used in the absence of an action).  The
2211             <code>ovs-ofctl</code> manual page contains additional information
2212             about the Nicira OpenFlow vendor extensions.
2213           </li>
2214         </ul>
2215       </column>
2216
2217       <column name="options" key="key">
2218         Optional.  Shorthand to set <code>in_key</code> and
2219         <code>out_key</code> at the same time.
2220       </column>
2221
2222       <column name="options" key="tos">
2223         Optional.  The value of the ToS bits to be set on the encapsulating
2224         packet.  ToS is interpreted as DSCP and ECN bits, ECN part must be
2225         zero.  It may also be the word <code>inherit</code>, in which case
2226         the ToS will be copied from the inner packet if it is IPv4 or IPv6
2227         (otherwise it will be 0).  The ECN fields are always inherited.
2228         Default is 0.
2229       </column>
2230
2231       <column name="options" key="ttl">
2232         Optional.  The TTL to be set on the encapsulating packet.  It may also
2233         be the word <code>inherit</code>, in which case the TTL will be copied
2234         from the inner packet if it is IPv4 or IPv6 (otherwise it will be the
2235         system default, typically 64).  Default is the system default TTL.
2236       </column>
2237
2238       <column name="options" key="df_default"
2239               type='{"type": "boolean"}'>
2240         Optional.  If enabled, the Don't Fragment bit will be set on tunnel
2241         outer headers to allow path MTU discovery. Default is enabled; set
2242         to <code>false</code> to disable.
2243       </column>
2244
2245       <group title="Tunnel Options: vxlan only">
2246
2247         <column name="options" key="exts">
2248           <p>Optional.  Comma separated list of optional VXLAN extensions to
2249           enable. The following extensions are supported:</p>
2250
2251           <ul>
2252             <li>
2253               <code>gbp</code>: VXLAN-GBP allows to transport the group policy
2254               context of a packet across the VXLAN tunnel to other network
2255               peers. See the field description of <code>tun_gbp_id</code> and
2256               <code>tun_gbp_flags</code> in ovs-ofctl(8) for additional
2257               information.
2258               (<code>https://tools.ietf.org/html/draft-smith-vxlan-group-policy</code>)
2259             </li>
2260           </ul>
2261         </column>
2262
2263       </group>
2264
2265       <group title="Tunnel Options: gre, ipsec_gre, geneve, and vxlan">
2266         <p>
2267           <code>gre</code>, <code>ipsec_gre</code>, <code>geneve</code>, and
2268           <code>vxlan</code> interfaces support these options.
2269         </p>
2270
2271         <column name="options" key="csum" type='{"type": "boolean"}'>
2272           <p>
2273             Optional.  Compute encapsulation header (either GRE or UDP) 
2274             checksums on outgoing packets.  Default is disabled, set to
2275             <code>true</code> to enable.  Checksums present on incoming
2276             packets will be validated regardless of this setting.
2277           </p>
2278
2279           <p>
2280             When using the upstream Linux kernel module, computation of
2281             checksums for <code>geneve</code> and <code>vxlan</code> requires
2282             Linux kernel version 4.0 or higher. <code>gre</code> supports
2283             checksums for all versions of Open vSwitch that support GRE.
2284             The out of tree kernel module distributed as part of OVS
2285             can compute all tunnel checksums on any kernel version that it
2286             is compatible with.
2287           </p>
2288
2289           <p>
2290             This option is supported for <code>ipsec_gre</code>, but not useful
2291             because GRE checksums are weaker than, and redundant with, IPsec
2292             payload authentication.
2293           </p>
2294         </column>
2295       </group>
2296
2297       <group title="Tunnel Options: ipsec_gre only">
2298         <p>
2299           Only <code>ipsec_gre</code> interfaces support these options.
2300         </p>
2301
2302         <column name="options" key="peer_cert">
2303           Required for certificate authentication.  A string containing the
2304           peer's certificate in PEM format.  Additionally the host's
2305           certificate must be specified with the <code>certificate</code>
2306           option.
2307         </column>
2308
2309         <column name="options" key="certificate">
2310           Required for certificate authentication.  The name of a PEM file
2311           containing a certificate that will be presented to the peer during
2312           authentication.
2313         </column>
2314
2315         <column name="options" key="private_key">
2316           Optional for certificate authentication.  The name of a PEM file
2317           containing the private key associated with <code>certificate</code>.
2318           If <code>certificate</code> contains the private key, this option may
2319           be omitted.
2320         </column>
2321
2322         <column name="options" key="psk">
2323           Required for pre-shared key authentication.  Specifies a pre-shared
2324           key for authentication that must be identical on both sides of the
2325           tunnel.
2326         </column>
2327       </group>
2328     </group>
2329
2330     <group title="Patch Options">
2331       <p>
2332         Only <code>patch</code> interfaces support these options.
2333       </p>
2334
2335       <column name="options" key="peer">
2336         The <ref column="name"/> of the <ref table="Interface"/> for the other
2337         side of the patch.  The named <ref table="Interface"/>'s own
2338         <code>peer</code> option must specify this <ref table="Interface"/>'s
2339         name.  That is, the two patch interfaces must have reversed <ref
2340         column="name"/> and <code>peer</code> values.
2341       </column>
2342     </group>
2343
2344     <group title="PMD (Poll Mode Driver) Options">
2345       <p>
2346         Only PMD netdevs support these options.
2347       </p>
2348
2349       <column name="options" key="n_rxqs"
2350               type='{"type": "integer", "minInteger": 1}'>
2351         <p>
2352           Specifies the maximum number of rx queues to be created for PMD
2353           netdev.  If not specified or specified to 0, one rx queue will
2354           be created by default.
2355         </p>
2356       </column>
2357     </group>
2358
2359     <group title="Interface Status">
2360       <p>
2361         Status information about interfaces attached to bridges, updated every
2362         5 seconds.  Not all interfaces have all of these properties; virtual
2363         interfaces don't have a link speed, for example.  Non-applicable
2364         columns will have empty values.
2365       </p>
2366       <column name="admin_state">
2367         <p>
2368           The administrative state of the physical network link.
2369         </p>
2370       </column>
2371
2372       <column name="link_state">
2373         <p>
2374           The observed state of the physical network link.  This is ordinarily
2375           the link's carrier status.  If the interface's <ref table="Port"/> is
2376           a bond configured for miimon monitoring, it is instead the network
2377           link's miimon status.
2378         </p>
2379       </column>
2380
2381       <column name="link_resets">
2382         <p>
2383           The number of times Open vSwitch has observed the
2384           <ref column="link_state"/> of this <ref table="Interface"/> change.
2385         </p>
2386       </column>
2387
2388       <column name="link_speed">
2389         <p>
2390           The negotiated speed of the physical network link.
2391           Valid values are positive integers greater than 0.
2392         </p>
2393       </column>
2394
2395       <column name="duplex">
2396         <p>
2397           The duplex mode of the physical network link.
2398         </p>
2399       </column>
2400
2401       <column name="mtu">
2402         <p>
2403           The MTU (maximum transmission unit); i.e. the largest
2404           amount of data that can fit into a single Ethernet frame.
2405           The standard Ethernet MTU is 1500 bytes.  Some physical media
2406           and many kinds of virtual interfaces can be configured with
2407           higher MTUs.
2408         </p>
2409         <p>
2410           This column will be empty for an interface that does not
2411           have an MTU as, for example, some kinds of tunnels do not.
2412         </p>
2413       </column>
2414
2415       <column name="lacp_current">
2416         Boolean value indicating LACP status for this interface.  If true, this
2417         interface has current LACP information about its LACP partner.  This
2418         information may be used to monitor the health of interfaces in a LACP
2419         enabled port.  This column will be empty if LACP is not enabled.
2420       </column>
2421
2422       <column name="status">
2423         Key-value pairs that report port status.  Supported status values are
2424         <ref column="type"/>-dependent; some interfaces may not have a valid
2425         <ref column="status" key="driver_name"/>, for example.
2426       </column>
2427
2428       <column name="status" key="driver_name">
2429         The name of the device driver controlling the network adapter.
2430       </column>
2431
2432       <column name="status" key="driver_version">
2433         The version string of the device driver controlling the network
2434         adapter.
2435       </column>
2436
2437       <column name="status" key="firmware_version">
2438         The version string of the network adapter's firmware, if available.
2439       </column>
2440
2441       <column name="status" key="source_ip">
2442         The source IP address used for an IPv4/IPv6 tunnel end-point, such as
2443         <code>gre</code>.
2444       </column>
2445
2446       <column name="status" key="tunnel_egress_iface">
2447         Egress interface for tunnels.  Currently only relevant for tunnels
2448         on Linux systems, this column will show the name of the interface
2449         which is responsible for routing traffic destined for the configured
2450         <ref column="options" key="remote_ip"/>.  This could be an internal
2451         interface such as a bridge port.
2452       </column>
2453
2454       <column name="status" key="tunnel_egress_iface_carrier"
2455               type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
2456         Whether carrier is detected on <ref column="status"
2457         key="tunnel_egress_iface"/>.
2458       </column>
2459     </group>
2460
2461     <group title="Statistics">
2462       <p>
2463         Key-value pairs that report interface statistics.  The current
2464         implementation updates these counters periodically.  The update period
2465         is controlled by <ref column="other_config"
2466         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
2467         Future implementations may update them when an interface is created,
2468         when they are queried (e.g. using an OVSDB <code>select</code>
2469         operation), and just before an interface is deleted due to virtual
2470         interface hot-unplug or VM shutdown, and perhaps at other times, but
2471         not on any regular periodic basis.
2472       </p>
2473       <p>
2474         These are the same statistics reported by OpenFlow in its <code>struct
2475         ofp_port_stats</code> structure.  If an interface does not support a
2476         given statistic, then that pair is omitted.
2477       </p>
2478       <group title="Statistics: Successful transmit and receive counters">
2479         <column name="statistics" key="rx_packets">
2480           Number of received packets.
2481         </column>
2482         <column name="statistics" key="rx_bytes">
2483           Number of received bytes.
2484         </column>
2485         <column name="statistics" key="tx_packets">
2486           Number of transmitted packets.
2487         </column>
2488         <column name="statistics" key="tx_bytes">
2489           Number of transmitted bytes.
2490         </column>
2491       </group>
2492       <group title="Statistics: Receive errors">
2493         <column name="statistics" key="rx_dropped">
2494           Number of packets dropped by RX.
2495         </column>
2496         <column name="statistics" key="rx_frame_err">
2497           Number of frame alignment errors.
2498         </column>
2499         <column name="statistics" key="rx_over_err">
2500           Number of packets with RX overrun.
2501         </column>
2502         <column name="statistics" key="rx_crc_err">
2503           Number of CRC errors.
2504         </column>
2505         <column name="statistics" key="rx_errors">
2506           Total number of receive errors, greater than or equal to the sum of
2507           the above.
2508         </column>
2509       </group>
2510       <group title="Statistics: Transmit errors">
2511         <column name="statistics" key="tx_dropped">
2512           Number of packets dropped by TX.
2513         </column>
2514         <column name="statistics" key="collisions">
2515           Number of collisions.
2516         </column>
2517         <column name="statistics" key="tx_errors">
2518           Total number of transmit errors, greater than or equal to the sum of
2519           the above.
2520         </column>
2521       </group>
2522     </group>
2523
2524     <group title="Ingress Policing">
2525       <p>
2526         These settings control ingress policing for packets received on this
2527         interface.  On a physical interface, this limits the rate at which
2528         traffic is allowed into the system from the outside; on a virtual
2529         interface (one connected to a virtual machine), this limits the rate at
2530         which the VM is able to transmit.
2531       </p>
2532       <p>
2533         Policing is a simple form of quality-of-service that simply drops
2534         packets received in excess of the configured rate.  Due to its
2535         simplicity, policing is usually less accurate and less effective than
2536         egress QoS (which is configured using the <ref table="QoS"/> and <ref
2537         table="Queue"/> tables).
2538       </p>
2539       <p>
2540         Policing is currently implemented on Linux and OVS with DPDK. Both
2541         implementations use a simple ``token bucket'' approach:
2542       </p>
2543       <ul>
2544         <li>
2545           The size of the bucket corresponds to <ref
2546           column="ingress_policing_burst"/>.  Initially the bucket is full.
2547         </li>
2548         <li>
2549           Whenever a packet is received, its size (converted to tokens) is
2550           compared to the number of tokens currently in the bucket.  If the
2551           required number of tokens are available, they are removed and the
2552           packet is forwarded.  Otherwise, the packet is dropped.
2553         </li>
2554         <li>
2555           Whenever it is not full, the bucket is refilled with tokens at the
2556           rate specified by <ref column="ingress_policing_rate"/>.
2557         </li>
2558       </ul>
2559       <p>
2560         Policing interacts badly with some network protocols, and especially
2561         with fragmented IP packets.  Suppose that there is enough network
2562         activity to keep the bucket nearly empty all the time.  Then this token
2563         bucket algorithm will forward a single packet every so often, with the
2564         period depending on packet size and on the configured rate.  All of the
2565         fragments of an IP packets are normally transmitted back-to-back, as a
2566         group.  In such a situation, therefore, only one of these fragments
2567         will be forwarded and the rest will be dropped.  IP does not provide
2568         any way for the intended recipient to ask for only the remaining
2569         fragments.  In such a case there are two likely possibilities for what
2570         will happen next: either all of the fragments will eventually be
2571         retransmitted (as TCP will do), in which case the same problem will
2572         recur, or the sender will not realize that its packet has been dropped
2573         and data will simply be lost (as some UDP-based protocols will do).
2574         Either way, it is possible that no forward progress will ever occur.
2575       </p>
2576       <column name="ingress_policing_rate">
2577         <p>
2578           Maximum rate for data received on this interface, in kbps.  Data
2579           received faster than this rate is dropped.  Set to <code>0</code>
2580           (the default) to disable policing.
2581         </p>
2582       </column>
2583
2584       <column name="ingress_policing_burst">
2585         <p>Maximum burst size for data received on this interface, in kb.  The
2586         default burst size if set to <code>0</code> is 8000 kbit.  This value
2587         has no effect if <ref column="ingress_policing_rate"/>
2588         is <code>0</code>.</p>
2589         <p>
2590           Specifying a larger burst size lets the algorithm be more forgiving,
2591           which is important for protocols like TCP that react severely to
2592           dropped packets.  The burst size should be at least the size of the
2593           interface's MTU.  Specifying a value that is numerically at least as
2594           large as 80% of <ref column="ingress_policing_rate"/> helps TCP come
2595           closer to achieving the full rate.
2596         </p>
2597       </column>
2598     </group>
2599
2600     <group title="Bidirectional Forwarding Detection (BFD)">
2601       <p>
2602         BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
2603         detection of connectivity failures by occasional transmission of
2604         BFD control messages.  Open vSwitch implements BFD to serve
2605         as a more popular and standards compliant alternative to CFM.
2606       </p>
2607
2608       <p>
2609         BFD operates by regularly transmitting BFD control messages at a rate
2610         negotiated independently in each direction.  Each endpoint specifies
2611         the rate at which it expects to receive control messages, and the rate
2612         at which it is willing to transmit them.  Open vSwitch uses a detection
2613         multiplier of three, meaning that an endpoint signals a connectivity
2614         fault if three consecutive BFD control messages fail to arrive.  In the
2615         case of a unidirectional connectivity issue, the system not receiving
2616         BFD control messages signals the problem to its peer in the messages it
2617         transmits.
2618       </p>
2619
2620       <p>
2621         The Open vSwitch implementation of BFD aims to comply faithfully
2622         with RFC 5880 requirements.  Open vSwitch does not implement the
2623         optional Authentication or ``Echo Mode'' features.
2624       </p>
2625
2626       <group title="BFD Configuration">
2627         <p>
2628           A controller sets up key-value pairs in the <ref column="bfd"/>
2629           column to enable and configure BFD.
2630         </p>
2631
2632         <column name="bfd" key="enable" type='{"type": "boolean"}'>
2633           True to enable BFD on this <ref table="Interface"/>.  If not
2634           specified, BFD will not be enabled by default.
2635         </column>
2636
2637         <column name="bfd" key="min_rx"
2638                 type='{"type": "integer", "minInteger": 1}'>
2639           The shortest interval, in milliseconds, at which this BFD session
2640           offers to receive BFD control messages.  The remote endpoint may
2641           choose to send messages at a slower rate.  Defaults to
2642           <code>1000</code>.
2643         </column>
2644
2645         <column name="bfd" key="min_tx"
2646                 type='{"type": "integer", "minInteger": 1}'>
2647           The shortest interval, in milliseconds, at which this BFD session is
2648           willing to transmit BFD control messages.  Messages will actually be
2649           transmitted at a slower rate if the remote endpoint is not willing to
2650           receive as quickly as specified.  Defaults to <code>100</code>.
2651         </column>
2652
2653         <column name="bfd" key="decay_min_rx" type='{"type": "integer"}'>
2654           An alternate receive interval, in milliseconds, that must be greater
2655           than or equal to <ref column="bfd" key="min_rx"/>.  The
2656           implementation switches from <ref column="bfd" key="min_rx"/> to <ref
2657           column="bfd" key="decay_min_rx"/> when there is no obvious incoming
2658           data traffic at the interface, to reduce the CPU and bandwidth cost
2659           of monitoring an idle interface.  This feature may be disabled by
2660           setting a value of 0.  This feature is reset whenever <ref
2661           column="bfd" key="decay_min_rx"/> or <ref column="bfd" key="min_rx"/>
2662           changes.
2663         </column>
2664
2665         <column name="bfd" key="forwarding_if_rx" type='{"type": "boolean"}'>
2666           When <code>true</code>, traffic received on the
2667           <ref table="Interface"/> is used to indicate the capability of packet
2668           I/O.  BFD control packets are still transmitted and received.  At
2669           least one BFD control packet must be received every 100 * <ref
2670           column="bfd" key="min_rx"/> amount of time.  Otherwise, even if
2671           traffic are received, the <ref column="bfd" key="forwarding"/>
2672           will be <code>false</code>.
2673         </column>
2674
2675         <column name="bfd" key="cpath_down" type='{"type": "boolean"}'>
2676           Set to true to notify the remote endpoint that traffic should not be
2677           forwarded to this system for some reason other than a connectivty
2678           failure on the interface being monitored.  The typical underlying
2679           reason is ``concatenated path down,'' that is, that connectivity
2680           beyond the local system is down.  Defaults to false.
2681         </column>
2682
2683         <column name="bfd" key="check_tnl_key" type='{"type": "boolean"}'>
2684           Set to true to make BFD accept only control messages with a tunnel
2685           key of zero.  By default, BFD accepts control messages with any
2686           tunnel key.
2687         </column>
2688
2689         <column name="bfd" key="bfd_local_src_mac">
2690           Set to an Ethernet address in the form
2691           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2692           to set the MAC used as source for transmitted BFD packets.  The
2693           default is the mac address of the BFD enabled interface.
2694         </column>
2695
2696         <column name="bfd" key="bfd_local_dst_mac">
2697           Set to an Ethernet address in the form
2698           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2699           to set the MAC used as destination for transmitted BFD packets.  The
2700           default is <code>00:23:20:00:00:01</code>.
2701         </column>
2702
2703         <column name="bfd" key="bfd_remote_dst_mac">
2704           Set to an Ethernet address in the form
2705           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2706           to set the MAC used for checking the destination of received BFD packets.
2707           Packets with different destination MAC will not be considered as BFD packets.
2708           If not specified the destination MAC address of received BFD packets
2709           are not checked.
2710         </column>
2711
2712         <column name="bfd" key="bfd_src_ip">
2713           Set to an IPv4 address to set the IP address used as source for
2714           transmitted BFD packets.  The default is <code>169.254.1.1</code>.
2715         </column>
2716
2717         <column name="bfd" key="bfd_dst_ip">
2718           Set to an IPv4 address to set the IP address used as destination
2719           for transmitted BFD packets.  The default is <code>169.254.1.0</code>.
2720         </column>
2721       </group>
2722
2723       <group title="BFD Status">
2724         <p>
2725           The switch sets key-value pairs in the <ref column="bfd_status"/>
2726           column to report the status of BFD on this interface.  When BFD is
2727           not enabled, with <ref column="bfd" key="enable"/>, the switch clears
2728           all key-value pairs from <ref column="bfd_status"/>.
2729         </p>
2730
2731         <column name="bfd_status" key="state"
2732                 type='{"type": "string",
2733                       "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
2734           Reports the state of the BFD session.  The BFD session is fully
2735           healthy and negotiated if <code>UP</code>.
2736         </column>
2737
2738         <column name="bfd_status" key="forwarding" type='{"type": "boolean"}'>
2739           Reports whether the BFD session believes this <ref
2740           table="Interface"/> may be used to forward traffic.  Typically this
2741           means the local session is signaling <code>UP</code>, and the remote
2742           system isn't signaling a problem such as concatenated path down.
2743         </column>
2744
2745         <column name="bfd_status" key="diagnostic">
2746           A diagnostic code specifying the local system's reason for the
2747           last change in session state. The error messages are defined in
2748           section 4.1 of [RFC 5880].
2749         </column>
2750
2751         <column name="bfd_status" key="remote_state"
2752                 type='{"type": "string",
2753                       "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
2754           Reports the state of the remote endpoint's BFD session.
2755         </column>
2756
2757         <column name="bfd_status" key="remote_diagnostic">
2758           A diagnostic code specifying the remote system's reason for the
2759           last change in session state. The error messages are defined in
2760           section 4.1 of [RFC 5880].
2761         </column>
2762
2763         <column name="bfd_status" key="flap_count"
2764                 type='{"type": "integer", "minInteger": 0}'>
2765           Counts the number of <ref column="bfd_status" key="forwarding" />
2766           flaps since start.  A flap is considered as a change of the
2767           <ref column="bfd_status" key="forwarding" /> value.
2768         </column>
2769       </group>
2770     </group>
2771
2772     <group title="Connectivity Fault Management">
2773       <p>
2774         802.1ag Connectivity Fault Management (CFM) allows a group of
2775         Maintenance Points (MPs) called a Maintenance Association (MA) to
2776         detect connectivity problems with each other.  MPs within a MA should
2777         have complete and exclusive interconnectivity.  This is verified by
2778         occasionally broadcasting Continuity Check Messages (CCMs) at a
2779         configurable transmission interval.
2780       </p>
2781
2782       <p>
2783         According to the 802.1ag specification, each Maintenance Point should
2784         be configured out-of-band with a list of Remote Maintenance Points it
2785         should have connectivity to.  Open vSwitch differs from the
2786         specification in this area.  It simply assumes the link is faulted if
2787         no Remote Maintenance Points are reachable, and considers it not
2788         faulted otherwise.
2789       </p>
2790
2791       <p>
2792         When operating over tunnels which have no <code>in_key</code>, or an
2793         <code>in_key</code> of <code>flow</code>.  CFM will only accept CCMs
2794         with a tunnel key of zero.
2795       </p>
2796
2797       <column name="cfm_mpid">
2798         <p>
2799           A Maintenance Point ID (MPID) uniquely identifies each endpoint
2800           within a Maintenance Association.  The MPID is used to identify this
2801           endpoint to other Maintenance Points in the MA.  Each end of a link
2802           being monitored should have a different MPID.  Must be configured to
2803           enable CFM on this <ref table="Interface"/>.
2804         </p>
2805         <p>
2806           According to the 802.1ag specification, MPIDs can only range between
2807           [1, 8191].  However, extended mode (see <ref column="other_config"
2808           key="cfm_extended"/>) supports eight byte MPIDs.
2809         </p>
2810       </column>
2811
2812       <column name="cfm_flap_count">
2813         Counts the number of cfm fault flapps since boot.  A flap is
2814         considered to be a change of the <ref column="cfm_fault"/> value.
2815       </column>
2816
2817       <column name="cfm_fault">
2818         <p>
2819           Indicates a connectivity fault triggered by an inability to receive
2820           heartbeats from any remote endpoint.  When a fault is triggered on
2821           <ref table="Interface"/>s participating in bonds, they will be
2822           disabled.
2823         </p>
2824         <p>
2825           Faults can be triggered for several reasons.  Most importantly they
2826           are triggered when no CCMs are received for a period of 3.5 times the
2827           transmission interval. Faults are also triggered when any CCMs
2828           indicate that a Remote Maintenance Point is not receiving CCMs but
2829           able to send them.  Finally, a fault is triggered if a CCM is
2830           received which indicates unexpected configuration.  Notably, this
2831           case arises when a CCM is received which advertises the local MPID.
2832         </p>
2833       </column>
2834
2835       <column name="cfm_fault_status" key="recv">
2836         Indicates a CFM fault was triggered due to a lack of CCMs received on
2837         the <ref table="Interface"/>.
2838       </column>
2839
2840       <column name="cfm_fault_status" key="rdi">
2841         Indicates a CFM fault was triggered due to the reception of a CCM with
2842         the RDI bit flagged.  Endpoints set the RDI bit in their CCMs when they
2843         are not receiving CCMs themselves.  This typically indicates a
2844         unidirectional connectivity failure.
2845       </column>
2846
2847       <column name="cfm_fault_status" key="maid">
2848         Indicates a CFM fault was triggered due to the reception of a CCM with
2849         a MAID other than the one Open vSwitch uses.  CFM broadcasts are tagged
2850         with an identification number in addition to the MPID called the MAID.
2851         Open vSwitch only supports receiving CCM broadcasts tagged with the
2852         MAID it uses internally.
2853       </column>
2854
2855       <column name="cfm_fault_status" key="loopback">
2856         Indicates a CFM fault was triggered due to the reception of a CCM
2857         advertising the same MPID configured in the <ref column="cfm_mpid"/>
2858         column of this <ref table="Interface"/>.  This may indicate a loop in
2859         the network.
2860       </column>
2861
2862       <column name="cfm_fault_status" key="overflow">
2863         Indicates a CFM fault was triggered because the CFM module received
2864         CCMs from more remote endpoints than it can keep track of.
2865       </column>
2866
2867       <column name="cfm_fault_status" key="override">
2868         Indicates a CFM fault was manually triggered by an administrator using
2869         an <code>ovs-appctl</code> command.
2870       </column>
2871
2872       <column name="cfm_fault_status" key="interval">
2873         Indicates a CFM fault was triggered due to the reception of a CCM
2874         frame having an invalid interval.
2875       </column>
2876
2877       <column name="cfm_remote_opstate">
2878         <p>When in extended mode, indicates the operational state of the
2879         remote endpoint as either <code>up</code> or <code>down</code>.  See
2880         <ref column="other_config" key="cfm_opstate"/>.
2881         </p>
2882       </column>
2883
2884       <column name="cfm_health">
2885         <p>
2886           Indicates the health of the interface as a percentage of CCM frames
2887           received over 21 <ref column="other_config" key="cfm_interval"/>s.
2888           The health of an interface is undefined if it is communicating with
2889           more than one <ref column="cfm_remote_mpids"/>.  It reduces if
2890           healthy heartbeats are not received at the expected rate, and
2891           gradually improves as healthy heartbeats are received at the desired
2892           rate. Every 21 <ref column="other_config" key="cfm_interval"/>s, the
2893           health of the interface is refreshed.
2894         </p>
2895         <p>
2896           As mentioned above, the faults can be triggered for several reasons.
2897           The link health will deteriorate even if heartbeats are received but
2898           they are reported to be unhealthy.  An unhealthy heartbeat in this
2899           context is a heartbeat for which either some fault is set or is out
2900           of sequence.  The interface health can be 100 only on receiving
2901           healthy heartbeats at the desired rate.
2902         </p>
2903       </column>
2904
2905       <column name="cfm_remote_mpids">
2906         When CFM is properly configured, Open vSwitch will occasionally
2907         receive CCM broadcasts.  These broadcasts contain the MPID of the
2908         sending Maintenance Point.  The list of MPIDs from which this
2909         <ref table="Interface"/> is receiving broadcasts from is regularly
2910         collected and written to this column.
2911       </column>
2912
2913       <column name="other_config" key="cfm_interval"
2914               type='{"type": "integer"}'>
2915         <p>
2916           The interval, in milliseconds, between transmissions of CFM
2917           heartbeats.  Three missed heartbeat receptions indicate a
2918           connectivity fault.
2919         </p>
2920
2921         <p>
2922           In standard operation only intervals of 3, 10, 100, 1,000, 10,000,
2923           60,000, or 600,000 ms are supported.  Other values will be rounded
2924           down to the nearest value on the list.  Extended mode (see <ref
2925           column="other_config" key="cfm_extended"/>) supports any interval up
2926           to 65,535 ms.  In either mode, the default is 1000 ms.
2927         </p>
2928
2929         <p>We do not recommend using intervals less than 100 ms.</p>
2930       </column>
2931
2932       <column name="other_config" key="cfm_extended"
2933               type='{"type": "boolean"}'>
2934         When <code>true</code>, the CFM module operates in extended mode. This
2935         causes it to use a nonstandard destination address to avoid conflicting
2936         with compliant implementations which may be running concurrently on the
2937         network. Furthermore, extended mode increases the accuracy of the
2938         <code>cfm_interval</code> configuration parameter by breaking wire
2939         compatibility with 802.1ag compliant implementations.  And extended
2940         mode allows eight byte MPIDs.  Defaults to <code>false</code>.
2941       </column>
2942
2943       <column name="other_config" key="cfm_demand" type='{"type": "boolean"}'>
2944         <p>
2945           When <code>true</code>, and
2946           <ref column="other_config" key="cfm_extended"/> is true, the CFM
2947           module operates in demand mode.  When in demand mode, traffic
2948           received on the <ref table="Interface"/> is used to indicate
2949           liveness.  CCMs are still transmitted and received.  At least one
2950           CCM must be received every 100 * <ref column="other_config"
2951           key="cfm_interval"/> amount of time.  Otherwise, even if traffic
2952           are received, the CFM module will raise the connectivity fault.
2953         </p>
2954
2955         <p>
2956           Demand mode has a couple of caveats:
2957           <ul>
2958             <li>
2959               To ensure that ovs-vswitchd has enough time to pull statistics
2960               from the datapath, the fault detection interval is set to
2961               3.5 * MAX(<ref column="other_config" key="cfm_interval"/>, 500)
2962               ms.
2963             </li>
2964
2965             <li>
2966               To avoid ambiguity, demand mode disables itself when there are
2967               multiple remote maintenance points.
2968             </li>
2969
2970             <li>
2971               If the <ref table="Interface"/> is heavily congested, CCMs
2972               containing the <ref column="other_config" key="cfm_opstate"/>
2973               status may be dropped causing changes in the operational state to
2974               be delayed.  Similarly, if CCMs containing the RDI bit are not
2975               received, unidirectional link failures may not be detected.
2976             </li>
2977           </ul>
2978         </p>
2979       </column>
2980
2981       <column name="other_config" key="cfm_opstate"
2982               type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
2983         When <code>down</code>, the CFM module marks all CCMs it generates as
2984         operationally down without triggering a fault.  This allows remote
2985         maintenance points to choose not to forward traffic to the
2986         <ref table="Interface"/> on which this CFM module is running.
2987         Currently, in Open vSwitch, the opdown bit of CCMs affects
2988         <ref table="Interface"/>s participating in bonds, and the bundle
2989         OpenFlow action. This setting is ignored when CFM is not in extended
2990         mode.  Defaults to <code>up</code>.
2991       </column>
2992
2993       <column name="other_config" key="cfm_ccm_vlan"
2994               type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
2995         When set, the CFM module will apply a VLAN tag to all CCMs it generates
2996         with the given value.  May be the string <code>random</code> in which
2997         case each CCM will be tagged with a different randomly generated VLAN.
2998       </column>
2999
3000       <column name="other_config" key="cfm_ccm_pcp"
3001               type='{"type": "integer", "minInteger": 1, "maxInteger": 7}'>
3002         When set, the CFM module will apply a VLAN tag to all CCMs it generates
3003         with the given PCP value, the VLAN ID of the tag is governed by the
3004         value of <ref column="other_config" key="cfm_ccm_vlan"/>. If
3005         <ref column="other_config" key="cfm_ccm_vlan"/> is unset, a VLAN ID of
3006         zero is used.
3007       </column>
3008
3009     </group>
3010
3011     <group title="Bonding Configuration">
3012       <column name="other_config" key="lacp-port-id"
3013               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3014         The LACP port ID of this <ref table="Interface"/>.  Port IDs are
3015         used in LACP negotiations to identify individual ports
3016         participating in a bond.
3017       </column>
3018
3019       <column name="other_config" key="lacp-port-priority"
3020               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3021         The LACP port priority of this <ref table="Interface"/>.  In LACP
3022         negotiations <ref table="Interface"/>s with numerically lower
3023         priorities are preferred for aggregation.
3024       </column>
3025
3026       <column name="other_config" key="lacp-aggregation-key"
3027               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3028         The LACP aggregation key of this <ref table="Interface"/>.  <ref
3029         table="Interface"/>s with different aggregation keys may not be active
3030         within a given <ref table="Port"/> at the same time.
3031       </column>
3032     </group>
3033
3034     <group title="Virtual Machine Identifiers">
3035       <p>
3036         These key-value pairs specifically apply to an interface that
3037         represents a virtual Ethernet interface connected to a virtual
3038         machine.  These key-value pairs should not be present for other types
3039         of interfaces.  Keys whose names end in <code>-uuid</code> have
3040         values that uniquely identify the entity in question.  For a Citrix
3041         XenServer hypervisor, these values are UUIDs in RFC 4122 format.
3042         Other hypervisors may use other formats.
3043       </p>
3044
3045       <column name="external_ids" key="attached-mac">
3046         The MAC address programmed into the ``virtual hardware'' for this
3047         interface, in the form
3048         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
3049         For Citrix XenServer, this is the value of the <code>MAC</code> field
3050         in the VIF record for this interface.
3051       </column>
3052
3053       <column name="external_ids" key="iface-id">
3054         A system-unique identifier for the interface.  On XenServer, this will
3055         commonly be the same as <ref column="external_ids" key="xs-vif-uuid"/>.
3056       </column>
3057
3058       <column name="external_ids" key="iface-status"
3059               type='{"type": "string",
3060                     "enum": ["set", ["active", "inactive"]]}'>
3061         <p>
3062           Hypervisors may sometimes have more than one interface associated
3063           with a given <ref column="external_ids" key="iface-id"/>, only one of
3064           which is actually in use at a given time.  For example, in some
3065           circumstances XenServer has both a ``tap'' and a ``vif'' interface
3066           for a single <ref column="external_ids" key="iface-id"/>, but only
3067           uses one of them at a time.  A hypervisor that behaves this way must
3068           mark the currently in use interface <code>active</code> and the
3069           others <code>inactive</code>.  A hypervisor that never has more than
3070           one interface for a given <ref column="external_ids" key="iface-id"/>
3071           may mark that interface <code>active</code> or omit <ref
3072           column="external_ids" key="iface-status"/> entirely.
3073         </p>
3074
3075         <p>
3076           During VM migration, a given <ref column="external_ids"
3077           key="iface-id"/> might transiently be marked <code>active</code> on
3078           two different hypervisors.  That is, <code>active</code> means that
3079           this <ref column="external_ids" key="iface-id"/> is the active
3080           instance within a single hypervisor, not in a broader scope.
3081           There is one exception: some hypervisors support ``migration'' from a
3082           given hypervisor to itself (most often for test purposes).  During
3083           such a ``migration,'' two instances of a single <ref
3084           column="external_ids" key="iface-id"/> might both be briefly marked
3085           <code>active</code> on a single hypervisor.
3086         </p>
3087       </column>
3088
3089       <column name="external_ids" key="xs-vif-uuid">
3090         The virtual interface associated with this interface.
3091       </column>
3092
3093       <column name="external_ids" key="xs-network-uuid">
3094         The virtual network to which this interface is attached.
3095       </column>
3096
3097       <column name="external_ids" key="vm-id">
3098         The VM to which this interface belongs. On XenServer, this will be the
3099         same as <ref column="external_ids" key="xs-vm-uuid"/>.
3100       </column>
3101
3102       <column name="external_ids" key="xs-vm-uuid">
3103         The VM to which this interface belongs.
3104       </column>
3105     </group>
3106
3107     <group title="Auto Attach Configuration">
3108       <p>
3109         Auto Attach configuration for a particular interface.
3110       </p>
3111
3112       <column name="lldp" key="enable" type='{"type": "boolean"}'>
3113         True to enable LLDP on this <ref table="Interface"/>.  If not
3114         specified, LLDP will be disabled by default.
3115       </column>
3116     </group>
3117
3118     <group title="Common Columns">
3119       The overall purpose of these columns is described under <code>Common
3120       Columns</code> at the beginning of this document.
3121
3122       <column name="other_config"/>
3123       <column name="external_ids"/>
3124     </group>
3125   </table>
3126
3127   <table name="Flow_Table" title="OpenFlow table configuration">
3128     <p>Configuration for a particular OpenFlow table.</p>
3129
3130     <column name="name">
3131       The table's name.  Set this column to change the name that controllers
3132       will receive when they request table statistics, e.g. <code>ovs-ofctl
3133       dump-tables</code>.  The name does not affect switch behavior.
3134     </column>
3135
3136     <group title="Eviction Policy">
3137       <p>
3138         Open vSwitch supports limiting the number of flows that may be
3139         installed in a flow table, via the <ref column="flow_limit"/> column.
3140         When adding a flow would exceed this limit, by default Open vSwitch
3141         reports an error, but there are two ways to configure Open vSwitch to
3142         instead delete (``evict'') a flow to make room for the new one:
3143       </p>
3144
3145       <ul>
3146         <li>
3147           Set the <ref column="overflow_policy"/> column to <code>evict</code>.
3148         </li>
3149
3150         <li>
3151           Send an OpenFlow 1.4+ ``table mod request'' to enable eviction for
3152           the flow table (e.g. <code>ovs-ofctl -O OpenFlow14 mod-table br0 0
3153           evict</code> to enable eviction on flow table 0 of bridge
3154           <code>br0</code>).
3155         </li>
3156       </ul>
3157
3158       <p>
3159         When a flow must be evicted due to overflow, the flow to evict is
3160         chosen through an approximation of the following algorithm.  This
3161         algorithm is used regardless of how eviction was enabled:
3162       </p>
3163
3164       <ol>
3165         <li>
3166           Divide the flows in the table into groups based on the values of the
3167           fields or subfields specified in the <ref column="groups"/> column,
3168           so that all of the flows in a given group have the same values for
3169           those fields.  If a flow does not specify a given field, that field's
3170           value is treated as 0.  If <ref column="groups"/> is empty, then all
3171           of the flows in the flow table are treated as a single group.
3172         </li>
3173
3174         <li>
3175           Consider the flows in the largest group, that is, the group that
3176           contains the greatest number of flows.  If two or more groups all
3177           have the same largest number of flows, consider the flows in all of
3178           those groups.
3179         </li>
3180
3181         <li>
3182           If the flows under consideration have different importance values,
3183           eliminate from consideration any flows except those with the lowest
3184           importance.  (``Importance,'' a 16-bit integer value attached to each
3185           flow, was introduced in OpenFlow 1.4.  Flows inserted with older
3186           versions of OpenFlow always have an importance of 0.)
3187         </li>
3188
3189         <li>
3190           Among the flows under consideration, choose the flow that expires
3191           soonest for eviction.
3192         </li>
3193       </ol>
3194
3195       <p>
3196         The eviction process only considers flows that have an idle timeout
3197         or a hard timeout.  That is, eviction never deletes permanent flows.
3198         (Permanent flows do count against <ref column="flow_limit"/>.)
3199       </p>
3200
3201       <column name="flow_limit">
3202         If set, limits the number of flows that may be added to the table.
3203         Open vSwitch may limit the number of flows in a table for other
3204         reasons, e.g. due to hardware limitations or for resource availability
3205         or performance reasons.
3206       </column>
3207
3208       <column name="overflow_policy">
3209         <p>
3210           Controls the switch's behavior when an OpenFlow flow table
3211           modification request would add flows in excess of <ref
3212           column="flow_limit"/>.  The supported values are:
3213         </p>
3214
3215         <dl>
3216           <dt><code>refuse</code></dt>
3217           <dd>
3218             Refuse to add the flow or flows.  This is also the default policy
3219             when <ref column="overflow_policy"/> is unset.
3220           </dd>
3221
3222           <dt><code>evict</code></dt>
3223           <dd>
3224             Delete a flow chosen according to the algorithm described above.
3225           </dd>
3226         </dl>
3227       </column>
3228
3229       <column name="groups">
3230         <p>
3231           When <ref column="overflow_policy"/> is <code>evict</code>, this
3232           controls how flows are chosen for eviction when the flow table would
3233           otherwise exceed <ref column="flow_limit"/> flows.  Its value is a
3234           set of NXM fields or sub-fields, each of which takes one of the forms
3235           <code><var>field</var>[]</code> or
3236           <code><var>field</var>[<var>start</var>..<var>end</var>]</code>,
3237           e.g. <code>NXM_OF_IN_PORT[]</code>.  Please see
3238           <code>nicira-ext.h</code> for a complete list of NXM field names.
3239         </p>
3240
3241         <p>
3242           Open vSwitch ignores any invalid or unknown field specifications.
3243         </p>
3244
3245         <p>
3246           When eviction is not enabled, via <ref column="overflow_policy"/> or
3247           an OpenFlow 1.4+ ``table mod,'' this column has no effect.
3248         </p>
3249       </column>
3250     </group>
3251
3252     <group title="Classifier Optimization">
3253       <column name="prefixes">
3254         <p>
3255           This string set specifies which fields should be used for
3256           address prefix tracking.  Prefix tracking allows the
3257           classifier to skip rules with longer than necessary prefixes,
3258           resulting in better wildcarding for datapath flows.
3259         </p>
3260         <p>
3261           Prefix tracking may be beneficial when a flow table contains
3262           matches on IP address fields with different prefix lengths.
3263           For example, when a flow table contains IP address matches on
3264           both full addresses and proper prefixes, the full address
3265           matches will typically cause the datapath flow to un-wildcard
3266           the whole address field (depending on flow entry priorities).
3267           In this case each packet with a different address gets handed
3268           to the userspace for flow processing and generates its own
3269           datapath flow.  With prefix tracking enabled for the address
3270           field in question packets with addresses matching shorter
3271           prefixes would generate datapath flows where the irrelevant
3272           address bits are wildcarded, allowing the same datapath flow
3273           to handle all the packets within the prefix in question.  In
3274           this case many userspace upcalls can be avoided and the
3275           overall performance can be better.
3276         </p>
3277         <p>
3278           This is a performance optimization only, so packets will
3279           receive the same treatment with or without prefix tracking.
3280         </p>
3281         <p>
3282           The supported fields are: <code>tun_id</code>,
3283           <code>tun_src</code>, <code>tun_dst</code>,
3284           <code>tun_ipv6_src</code>, <code>tun_ipv6_dst</code>,
3285           <code>nw_src</code>, <code>nw_dst</code> (or aliases
3286           <code>ip_src</code> and <code>ip_dst</code>),
3287           <code>ipv6_src</code>, and <code>ipv6_dst</code>.  (Using this
3288           feature for <code>tun_id</code> would only make sense if the
3289           tunnel IDs have prefix structure similar to IP addresses.)
3290         </p>
3291
3292         <p>
3293           By default, the <code>prefixes=ip_dst,ip_src</code> are used
3294           on each flow table.  This instructs the flow classifier to
3295           track the IP destination and source addresses used by the
3296           rules in this specific flow table.
3297         </p>
3298
3299         <p>
3300           The keyword <code>none</code> is recognized as an explicit
3301           override of the default values, causing no prefix fields to be
3302           tracked.
3303         </p>
3304
3305         <p>
3306           To set the prefix fields, the flow table record needs to
3307           exist:
3308         </p>
3309
3310         <dl>
3311           <dt><code>ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=table0</code></dt>
3312           <dd>
3313             Creates a flow table record for the OpenFlow table number 0.
3314           </dd>
3315
3316           <dt><code>ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src</code></dt>
3317           <dd>
3318             Enables prefix tracking for IP source and destination
3319             address fields.
3320           </dd>
3321         </dl>
3322
3323         <p>
3324           There is a maximum number of fields that can be enabled for any
3325           one flow table.  Currently this limit is 3.
3326         </p>
3327       </column>
3328     </group>
3329
3330     <group title="Common Columns">
3331       The overall purpose of these columns is described under <code>Common
3332       Columns</code> at the beginning of this document.
3333
3334       <column name="external_ids"/>
3335     </group>
3336   </table>
3337
3338   <table name="QoS" title="Quality of Service configuration">
3339     <p>Quality of Service (QoS) configuration for each Port that
3340     references it.</p>
3341
3342     <column name="type">
3343       <p>The type of QoS to implement. The currently defined types are
3344       listed below:</p>
3345       <dl>
3346         <dt><code>linux-htb</code></dt>
3347         <dd>
3348           Linux ``hierarchy token bucket'' classifier.  See tc-htb(8) (also at
3349           <code>http://linux.die.net/man/8/tc-htb</code>) and the HTB manual
3350           (<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
3351           for information on how this classifier works and how to configure it.
3352         </dd>
3353       </dl>
3354       <dl>
3355         <dt><code>linux-hfsc</code></dt>
3356         <dd>
3357           Linux "Hierarchical Fair Service Curve" classifier.
3358           See <code>http://linux-ip.net/articles/hfsc.en/</code> for
3359           information on how this classifier works.
3360         </dd>
3361       </dl>
3362       <dl>
3363         <dt><code>linux-sfq</code></dt>
3364         <dd>
3365           Linux ``Stochastic Fairness Queueing'' classifier. See
3366           <code>tc-sfq</code>(8) (also at
3367           <code>http://linux.die.net/man/8/tc-sfq</code>) for information on
3368           how this classifier works.
3369         </dd>
3370       </dl>
3371       <dl>
3372         <dt><code>linux-codel</code></dt>
3373         <dd>
3374           Linux ``Controlled Delay'' classifier. See <code>tc-codel</code>(8)
3375           (also at
3376           <code>http://man7.org/linux/man-pages/man8/tc-codel.8.html</code>)
3377           for information on how this classifier works.
3378         </dd>
3379       </dl>
3380       <dl>
3381         <dt><code>linux-fq_codel</code></dt>
3382         <dd>
3383           Linux ``Fair Queuing with Controlled Delay'' classifier. See
3384           <code>tc-fq_codel</code>(8) (also at
3385           <code>http://man7.org/linux/man-pages/man8/tc-fq_codel.8.html</code>)
3386           for information on how this classifier works.
3387         </dd>
3388       </dl>
3389       <dl>
3390         <dt><code>egress-policer</code></dt>
3391         <dd>
3392           An egress policer algorithm. This implementation uses the DPDK
3393           rte_meter library. The rte_meter library provides an implementation
3394           which allows the metering and policing of traffic. The implementation
3395           in OVS essentially creates a single token bucket used to police
3396           traffic. It should be noted that when the rte_meter is configured as
3397           part of QoS there will be a performance overhead as the rte_meter
3398           itself will consume CPU cycles in order to police traffic. These CPU
3399           cycles ordinarily are used for packet proccessing. As such the drop
3400           in performance will be noticed in terms of overall aggregate traffic
3401           throughput.
3402         </dd>
3403       </dl>
3404     </column>
3405
3406     <column name="queues">
3407       <p>A map from queue numbers to <ref table="Queue"/> records.  The
3408       supported range of queue numbers depend on <ref column="type"/>.  The
3409       queue numbers are the same as the <code>queue_id</code> used in
3410       OpenFlow in <code>struct ofp_action_enqueue</code> and other
3411       structures.</p>
3412
3413       <p>
3414         Queue 0 is the ``default queue.''  It is used by OpenFlow output
3415         actions when no specific queue has been set.  When no configuration for
3416         queue 0 is present, it is automatically configured as if a <ref
3417         table="Queue"/> record with empty <ref table="Queue" column="dscp"/>
3418         and <ref table="Queue" column="other_config"/> columns had been
3419         specified.
3420         (Before version 1.6, Open vSwitch would leave queue 0 unconfigured in
3421         this case.  With some queuing disciplines, this dropped all packets
3422         destined for the default queue.)
3423       </p>
3424     </column>
3425
3426     <group title="Configuration for linux-htb and linux-hfsc">
3427       <p>
3428         The <code>linux-htb</code> and <code>linux-hfsc</code> classes support
3429         the following key-value pair:
3430       </p>
3431
3432       <column name="other_config" key="max-rate" type='{"type": "integer"}'>
3433         Maximum rate shared by all queued traffic, in bit/s.  Optional.  If not
3434         specified, for physical interfaces, the default is the link rate.  For
3435         other interfaces or if the link rate cannot be determined, the default
3436         is currently 100 Mbps.
3437       </column>
3438     </group>
3439
3440     <group title="Configuration for egress-policer QoS">
3441       <p>
3442         <ref table="QoS"/> <ref table="QoS" column="type"/>
3443         <code>egress-policer</code> provides egress policing for userspace
3444         port types with DPDK.
3445
3446         It has the following key-value pairs defined.
3447       </p>
3448
3449       <column name="other_config" key="cir" type='{"type": "integer"}'>
3450         The Committed Information Rate (CIR) is measured in bytes of IP
3451         packets per second, i.e. it includes the IP header, but not link
3452         specific (e.g. Ethernet) headers. This represents the bytes per second
3453         rate at which the token bucket will be updated. The cir value is
3454         calculated by (pps x packet data size).  For example assuming a user
3455         wishes to limit a stream consisting of 64 byte packets to 1 million
3456         packets per second the CIR would be set to to to 46000000. This value
3457         can be broken into '1,000,000 x 46'. Where 1,000,000 is the policing
3458         rate for the number of packets per second and 46 represents the size
3459         of the packet data for a 64 byte ip packet.
3460       </column>
3461       <column name="other_config" key="cbs" type='{"type": "integer"}'>
3462         The Committed Burst Size (CBS) is measured in bytes and represents a
3463         token bucket. At a minimum this value should be be set to the expected
3464         largest size packet in the traffic stream. In practice larger values
3465         may be used to increase the size of the token bucket. If a packet can
3466         be transmitted then the cbs will be decremented by the number of
3467         bytes/tokens of the packet. If there are not enough tokens in the cbs
3468         bucket the packet will be dropped.
3469       </column>
3470     </group>
3471
3472     <group title="Common Columns">
3473       The overall purpose of these columns is described under <code>Common
3474       Columns</code> at the beginning of this document.
3475
3476       <column name="other_config"/>
3477       <column name="external_ids"/>
3478     </group>
3479   </table>
3480
3481   <table name="Queue" title="QoS output queue.">
3482     <p>A configuration for a port output queue, used in configuring Quality of
3483     Service (QoS) features.  May be referenced by <ref column="queues"
3484     table="QoS"/> column in <ref table="QoS"/> table.</p>
3485
3486     <column name="dscp">
3487       If set, Open vSwitch will mark all traffic egressing this
3488       <ref table="Queue"/> with the given DSCP bits.  Traffic egressing the
3489       default <ref table="Queue"/> is only marked if it was explicitly selected
3490       as the <ref table="Queue"/> at the time the packet was output.  If unset,
3491       the DSCP bits of traffic egressing this <ref table="Queue"/> will remain
3492       unchanged.
3493     </column>
3494
3495     <group title="Configuration for linux-htb QoS">
3496       <p>
3497         <ref table="QoS"/> <ref table="QoS" column="type"/>
3498         <code>linux-htb</code> may use <code>queue_id</code>s less than 61440.
3499         It has the following key-value pairs defined.
3500       </p>
3501
3502       <column name="other_config" key="min-rate"
3503               type='{"type": "integer", "minInteger": 1}'>
3504         Minimum guaranteed bandwidth, in bit/s.
3505       </column>
3506
3507       <column name="other_config" key="max-rate"
3508               type='{"type": "integer", "minInteger": 1}'>
3509         Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
3510         queue's rate will not be allowed to exceed the specified value, even
3511         if excess bandwidth is available.  If unspecified, defaults to no
3512         limit.
3513       </column>
3514
3515       <column name="other_config" key="burst"
3516               type='{"type": "integer", "minInteger": 1}'>
3517         Burst size, in bits.  This is the maximum amount of ``credits'' that a
3518         queue can accumulate while it is idle.  Optional.  Details of the
3519         <code>linux-htb</code> implementation require a minimum burst size, so
3520         a too-small <code>burst</code> will be silently ignored.
3521       </column>
3522
3523       <column name="other_config" key="priority"
3524               type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
3525         A queue with a smaller <code>priority</code> will receive all the
3526         excess bandwidth that it can use before a queue with a larger value
3527         receives any.  Specific priority values are unimportant; only relative
3528         ordering matters.  Defaults to 0 if unspecified.
3529       </column>
3530     </group>
3531
3532     <group title="Configuration for linux-hfsc QoS">
3533       <p>
3534         <ref table="QoS"/> <ref table="QoS" column="type"/>
3535         <code>linux-hfsc</code> may use <code>queue_id</code>s less than 61440.
3536         It has the following key-value pairs defined.
3537       </p>
3538
3539       <column name="other_config" key="min-rate"
3540               type='{"type": "integer", "minInteger": 1}'>
3541         Minimum guaranteed bandwidth, in bit/s.
3542       </column>
3543
3544       <column name="other_config" key="max-rate"
3545               type='{"type": "integer", "minInteger": 1}'>
3546         Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
3547         queue's rate will not be allowed to exceed the specified value, even if
3548         excess bandwidth is available.  If unspecified, defaults to no
3549         limit.
3550       </column>
3551     </group>
3552
3553     <group title="Common Columns">
3554       The overall purpose of these columns is described under <code>Common
3555       Columns</code> at the beginning of this document.
3556
3557       <column name="other_config"/>
3558       <column name="external_ids"/>
3559     </group>
3560   </table>
3561
3562   <table name="Mirror" title="Port mirroring.">
3563     <p>A port mirror within a <ref table="Bridge"/>.</p>
3564     <p>A port mirror configures a bridge to send selected frames to special
3565     ``mirrored'' ports, in addition to their normal destinations.  Mirroring
3566     traffic may also be referred to as SPAN or RSPAN, depending on how
3567     the mirrored traffic is sent.</p>
3568
3569     <p>
3570       When a packet enters an Open vSwitch bridge, it becomes eligible for
3571       mirroring based on its ingress port and VLAN.  As the packet travels
3572       through the flow tables, each time it is output to a port, it becomes
3573       eligible for mirroring based on the egress port and VLAN.  In Open
3574       vSwitch 2.5 and later, mirroring occurs just after a packet first becomes
3575       eligible, using the packet as it exists at that point; in Open vSwitch
3576       2.4 and earlier, mirroring occurs only after a packet has traversed all
3577       the flow tables, using the original packet as it entered the bridge.
3578       This makes a difference only when the flow table modifies the packet: in
3579       Open vSwitch 2.4, the modifications are never visible to mirrors, whereas
3580       in Open vSwitch 2.5 and later modifications made before the first output
3581       that makes it eligible for mirroring to a particular destination are
3582       visible.
3583     </p>
3584
3585     <p>
3586       A packet that enters an Open vSwitch bridge is mirrored to a particular
3587       destination only once, even if it is eligible for multiple reasons.  For
3588       example, a packet would be mirrored to a particular <ref
3589       column="output_port"/> only once, even if it is selected for mirroring to
3590       that port by <ref column="select_dst_port"/> and <ref
3591       column="select_src_port"/> in the same or different <ref table="Mirror"/>
3592       records.
3593     </p>
3594
3595     <column name="name">
3596       Arbitrary identifier for the <ref table="Mirror"/>.
3597     </column>
3598
3599     <group title="Selecting Packets for Mirroring">
3600       <p>
3601         To be selected for mirroring, a given packet must enter or leave the
3602         bridge through a selected port and it must also be in one of the
3603         selected VLANs.
3604       </p>
3605
3606       <column name="select_all">
3607         If true, every packet arriving or departing on any port is
3608         selected for mirroring.
3609       </column>
3610
3611       <column name="select_dst_port">
3612         Ports on which departing packets are selected for mirroring.
3613       </column>
3614
3615       <column name="select_src_port">
3616         Ports on which arriving packets are selected for mirroring.
3617       </column>
3618
3619       <column name="select_vlan">
3620         VLANs on which packets are selected for mirroring.  An empty set
3621         selects packets on all VLANs.
3622       </column>
3623     </group>
3624
3625     <group title="Mirroring Destination Configuration">
3626       <p>
3627         These columns are mutually exclusive.  Exactly one of them must be
3628         nonempty.
3629       </p>
3630
3631       <column name="output_port">
3632         <p>Output port for selected packets, if nonempty.</p>
3633         <p>Specifying a port for mirror output reserves that port exclusively
3634         for mirroring.  No frames other than those selected for mirroring
3635         via this column
3636         will be forwarded to the port, and any frames received on the port
3637         will be discarded.</p>
3638         <p>
3639           The output port may be any kind of port supported by Open vSwitch.
3640           It may be, for example, a physical port (sometimes called SPAN) or a
3641           GRE tunnel.
3642         </p>
3643       </column>
3644
3645       <column name="output_vlan">
3646         <p>Output VLAN for selected packets, if nonempty.</p>
3647         <p>The frames will be sent out all ports that trunk
3648         <ref column="output_vlan"/>, as well as any ports with implicit VLAN
3649         <ref column="output_vlan"/>.  When a mirrored frame is sent out a
3650         trunk port, the frame's VLAN tag will be set to
3651         <ref column="output_vlan"/>, replacing any existing tag; when it is
3652         sent out an implicit VLAN port, the frame will not be tagged.  This
3653         type of mirroring is sometimes called RSPAN.</p>
3654         <p>
3655           See the documentation for
3656           <ref column="other_config" key="forward-bpdu"/> in the
3657           <ref table="Interface"/> table for a list of destination MAC
3658           addresses which will not be mirrored to a VLAN to avoid confusing
3659           switches that interpret the protocols that they represent.
3660         </p>
3661         <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
3662         contains unmanaged switches.  Consider an unmanaged physical switch
3663         with two ports: port 1, connected to an end host, and port 2,
3664         connected to an Open vSwitch configured to mirror received packets
3665         into VLAN 123 on port 2.  Suppose that the end host sends a packet on
3666         port 1 that the physical switch forwards to port 2.  The Open vSwitch
3667         forwards this packet to its destination and then reflects it back on
3668         port 2 in VLAN 123.  This reflected packet causes the unmanaged
3669         physical switch to replace the MAC learning table entry, which
3670         correctly pointed to port 1, with one that incorrectly points to port
3671         2.  Afterward, the physical switch will direct packets destined for
3672         the end host to the Open vSwitch on port 2, instead of to the end
3673         host on port 1, disrupting connectivity.  If mirroring to a VLAN is
3674         desired in this scenario, then the physical switch must be replaced
3675         by one that learns Ethernet addresses on a per-VLAN basis.  In
3676         addition, learning should be disabled on the VLAN containing mirrored
3677         traffic. If this is not done then intermediate switches will learn
3678         the MAC address of each end host from the mirrored traffic.  If
3679         packets being sent to that end host are also mirrored, then they will
3680         be dropped since the switch will attempt to send them out the input
3681         port. Disabling learning for the VLAN will cause the switch to
3682         correctly send the packet out all ports configured for that VLAN.  If
3683         Open vSwitch is being used as an intermediate switch, learning can be
3684         disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
3685         in the appropriate <ref table="Bridge"/> table or tables.</p>
3686         <p>
3687           Mirroring to a GRE tunnel has fewer caveats than mirroring to a
3688           VLAN and should generally be preferred.
3689         </p>
3690       </column>
3691     </group>
3692
3693     <group title="Statistics: Mirror counters">
3694       <p>
3695         Key-value pairs that report mirror statistics.  The update period
3696         is controlled by <ref column="other_config"
3697         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
3698       </p>
3699       <column name="statistics" key="tx_packets">
3700         Number of packets transmitted through this mirror.
3701       </column>
3702       <column name="statistics" key="tx_bytes">
3703         Number of bytes transmitted through this mirror.
3704       </column>
3705     </group>
3706
3707     <group title="Common Columns">
3708       The overall purpose of these columns is described under <code>Common
3709       Columns</code> at the beginning of this document.
3710
3711       <column name="external_ids"/>
3712     </group>
3713   </table>
3714
3715   <table name="Controller" title="OpenFlow controller configuration.">
3716     <p>An OpenFlow controller.</p>
3717
3718     <p>
3719       Open vSwitch supports two kinds of OpenFlow controllers:
3720     </p>
3721
3722     <dl>
3723       <dt>Primary controllers</dt>
3724       <dd>
3725         <p>
3726           This is the kind of controller envisioned by the OpenFlow 1.0
3727           specification.  Usually, a primary controller implements a network
3728           policy by taking charge of the switch's flow table.
3729         </p>
3730
3731         <p>
3732           Open vSwitch initiates and maintains persistent connections to
3733           primary controllers, retrying the connection each time it fails or
3734           drops.  The <ref table="Bridge" column="fail_mode"/> column in the
3735           <ref table="Bridge"/> table applies to primary controllers.
3736         </p>
3737
3738         <p>
3739           Open vSwitch permits a bridge to have any number of primary
3740           controllers.  When multiple controllers are configured, Open
3741           vSwitch connects to all of them simultaneously.  Because
3742           OpenFlow 1.0 does not specify how multiple controllers
3743           coordinate in interacting with a single switch, more than
3744           one primary controller should be specified only if the
3745           controllers are themselves designed to coordinate with each
3746           other.  (The Nicira-defined <code>NXT_ROLE</code> OpenFlow
3747           vendor extension may be useful for this.)
3748         </p>
3749       </dd>
3750       <dt>Service controllers</dt>
3751       <dd>
3752         <p>
3753           These kinds of OpenFlow controller connections are intended for
3754           occasional support and maintenance use, e.g. with
3755           <code>ovs-ofctl</code>.  Usually a service controller connects only
3756           briefly to inspect or modify some of a switch's state.
3757         </p>
3758
3759         <p>
3760           Open vSwitch listens for incoming connections from service
3761           controllers.  The service controllers initiate and, if necessary,
3762           maintain the connections from their end.  The <ref table="Bridge"
3763           column="fail_mode"/> column in the <ref table="Bridge"/> table does
3764           not apply to service controllers.
3765         </p>
3766
3767         <p>
3768           Open vSwitch supports configuring any number of service controllers.
3769         </p>
3770       </dd>
3771     </dl>
3772
3773     <p>
3774       The <ref column="target"/> determines the type of controller.
3775     </p>
3776
3777     <group title="Core Features">
3778       <column name="target">
3779         <p>Connection method for controller.</p>
3780         <p>
3781           The following connection methods are currently supported for primary
3782           controllers:
3783         </p>
3784         <dl>
3785           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3786           <dd>
3787             <p>The specified SSL <var>port</var> on the host at the
3788             given <var>ip</var>, which must be expressed as an IP
3789             address (not a DNS name).  The <ref table="Open_vSwitch"
3790             column="ssl"/> column in the <ref table="Open_vSwitch"/>
3791             table must point to a valid SSL configuration when this form
3792             is used.</p>
3793             <p>If <var>port</var> is not specified, it defaults to 6653.</p>
3794             <p>SSL support is an optional feature that is not always built as
3795             part of Open vSwitch.</p>
3796           </dd>
3797           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3798           <dd>
3799             <p>
3800               The specified TCP <var>port</var> on the host at the given
3801               <var>ip</var>, which must be expressed as an IP address (not a
3802               DNS name), where <var>ip</var> can be IPv4 or IPv6 address.  If
3803               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3804               e.g. <code>tcp:[::1]:6653</code>.
3805             </p>
3806             <p>
3807               If <var>port</var> is not specified, it defaults to 6653.
3808             </p>
3809           </dd>
3810         </dl>
3811         <p>
3812           The following connection methods are currently supported for service
3813           controllers:
3814         </p>
3815         <dl>
3816           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3817           <dd>
3818             <p>
3819               Listens for SSL connections on the specified TCP <var>port</var>.
3820               If <var>ip</var>, which must be expressed as an IP address (not a
3821               DNS name), is specified, then connections are restricted to the
3822               specified local IP address (either IPv4 or IPv6).  If
3823               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3824               e.g. <code>pssl:6653:[::1]</code>.
3825             </p>
3826             <p>
3827               If <var>port</var> is not specified, it defaults to
3828               6653.  If <var>ip</var> is not specified then it listens only on
3829               IPv4 (but not IPv6) addresses.  The
3830               <ref table="Open_vSwitch" column="ssl"/>
3831               column in the <ref table="Open_vSwitch"/> table must point to a
3832               valid SSL configuration when this form is used.
3833             </p>
3834             <p>
3835               If <var>port</var> is not specified, it currently to 6653.
3836             </p>
3837             <p>
3838               SSL support is an optional feature that is not always built as
3839               part of Open vSwitch.
3840             </p>
3841           </dd>
3842           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3843           <dd>
3844             <p>
3845               Listens for connections on the specified TCP <var>port</var>.  If
3846               <var>ip</var>, which must be expressed as an IP address (not a
3847               DNS name), is specified, then connections are restricted to the
3848               specified local IP address (either IPv4 or IPv6).  If
3849               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3850               e.g. <code>ptcp:6653:[::1]</code>. If <var>ip</var> is not
3851               specified then it listens only on IPv4 addresses.
3852             </p>
3853             <p>
3854               If <var>port</var> is not specified, it defaults to 6653.
3855             </p>
3856           </dd>
3857         </dl>
3858         <p>When multiple controllers are configured for a single bridge, the
3859         <ref column="target"/> values must be unique.  Duplicate
3860         <ref column="target"/> values yield unspecified results.</p>
3861       </column>
3862
3863       <column name="connection_mode">
3864         <p>If it is specified, this setting must be one of the following
3865         strings that describes how Open vSwitch contacts this OpenFlow
3866         controller over the network:</p>
3867
3868         <dl>
3869           <dt><code>in-band</code></dt>
3870           <dd>In this mode, this controller's OpenFlow traffic travels over the
3871           bridge associated with the controller.  With this setting, Open
3872           vSwitch allows traffic to and from the controller regardless of the
3873           contents of the OpenFlow flow table.  (Otherwise, Open vSwitch
3874           would never be able to connect to the controller, because it did
3875           not have a flow to enable it.)  This is the most common connection
3876           mode because it is not necessary to maintain two independent
3877           networks.</dd>
3878           <dt><code>out-of-band</code></dt>
3879           <dd>In this mode, OpenFlow traffic uses a control network separate
3880           from the bridge associated with this controller, that is, the
3881           bridge does not use any of its own network devices to communicate
3882           with the controller.  The control network must be configured
3883           separately, before or after <code>ovs-vswitchd</code> is started.
3884           </dd>
3885         </dl>
3886
3887         <p>If not specified, the default is implementation-specific.</p>
3888       </column>
3889     </group>
3890
3891     <group title="Controller Failure Detection and Handling">
3892       <column name="max_backoff">
3893         Maximum number of milliseconds to wait between connection attempts.
3894         Default is implementation-specific.
3895       </column>
3896
3897       <column name="inactivity_probe">
3898         Maximum number of milliseconds of idle time on connection to
3899         controller before sending an inactivity probe message.  If Open
3900         vSwitch does not communicate with the controller for the specified
3901         number of seconds, it will send a probe.  If a response is not
3902         received for the same additional amount of time, Open vSwitch
3903         assumes the connection has been broken and attempts to reconnect.
3904         Default is implementation-specific.  A value of 0 disables
3905         inactivity probes.
3906       </column>
3907     </group>
3908
3909     <group title="Asynchronous Messages">
3910       <p>
3911         OpenFlow switches send certain messages to controllers spontanenously,
3912         that is, not in response to any request from the controller.  These
3913         messages are called ``asynchronous messages.''  These columns allow
3914         asynchronous messages to be limited or disabled to ensure the best use
3915         of network resources.
3916       </p>
3917
3918       <column name="enable_async_messages">
3919         The OpenFlow protocol enables asynchronous messages at time of
3920         connection establishment, which means that a controller can receive
3921         asynchronous messages, potentially many of them, even if it turns them
3922         off immediately after connecting.  Set this column to
3923         <code>false</code> to change Open vSwitch behavior to disable, by
3924         default, all asynchronous messages.  The controller can use the
3925         <code>NXT_SET_ASYNC_CONFIG</code> Nicira extension to OpenFlow to turn
3926         on any messages that it does want to receive, if any.
3927       </column>
3928
3929       <group title="Controller Rate Limiting">
3930         <p>
3931           A switch can forward packets to a controller over the OpenFlow
3932           protocol.  Forwarding packets this way at too high a rate can
3933           overwhelm a controller, frustrate use of the OpenFlow connection for
3934           other purposes, increase the latency of flow setup, and use an
3935           unreasonable amount of bandwidth.  Therefore, Open vSwitch supports
3936           limiting the rate of packet forwarding to a controller.
3937         </p>
3938
3939         <p>
3940           There are two main reasons in OpenFlow for a packet to be sent to a
3941           controller: either the packet ``misses'' in the flow table, that is,
3942           there is no matching flow, or a flow table action says to send the
3943           packet to the controller.  Open vSwitch limits the rate of each kind
3944           of packet separately at the configured rate.  Therefore, the actual
3945           rate that packets are sent to the controller can be up to twice the
3946           configured rate, when packets are sent for both reasons.
3947         </p>
3948
3949         <p>
3950           This feature is specific to forwarding packets over an OpenFlow
3951           connection.  It is not general-purpose QoS.  See the <ref
3952           table="QoS"/> table for quality of service configuration, and <ref
3953           column="ingress_policing_rate" table="Interface"/> in the <ref
3954           table="Interface"/> table for ingress policing configuration.
3955         </p>
3956
3957         <column name="controller_rate_limit">
3958           <p>
3959             The maximum rate at which the switch will forward packets to the
3960             OpenFlow controller, in packets per second.  If no value is
3961             specified, rate limiting is disabled.
3962           </p>
3963         </column>
3964
3965         <column name="controller_burst_limit">
3966           <p>
3967             When a high rate triggers rate-limiting, Open vSwitch queues
3968             packets to the controller for each port and transmits them to the
3969             controller at the configured rate.  This value limits the number of
3970             queued packets.  Ports on a bridge share the packet queue fairly.
3971           </p>
3972
3973           <p>
3974             This value has no effect unless <ref
3975             column="controller_rate_limit"/> is configured.  The current
3976             default when this value is not specified is one-quarter of <ref
3977             column="controller_rate_limit"/>, meaning that queuing can delay
3978             forwarding a packet to the controller by up to 250 ms.
3979           </p>
3980         </column>
3981
3982         <group title="Controller Rate Limiting Statistics">
3983           <p>
3984             These values report the effects of rate limiting.  Their values are
3985             relative to establishment of the most recent OpenFlow connection,
3986             or since rate limiting was enabled, whichever happened more
3987             recently.  Each consists of two values, one with <code>TYPE</code>
3988             replaced by <code>miss</code> for rate limiting flow table misses,
3989             and the other with <code>TYPE</code> replaced by
3990             <code>action</code> for rate limiting packets sent by OpenFlow
3991             actions.
3992           </p>
3993
3994           <p>
3995             These statistics are reported only when controller rate limiting is
3996             enabled.
3997           </p>
3998
3999           <column name="status" key="packet-in-TYPE-bypassed"
4000                   type='{"type": "integer", "minInteger": 0}'>
4001             Number of packets sent directly to the controller, without queuing,
4002             because the rate did not exceed the configured maximum.
4003           </column>
4004
4005           <column name="status" key="packet-in-TYPE-queued"
4006                   type='{"type": "integer", "minInteger": 0}'>
4007             Number of packets added to the queue to send later.
4008           </column>
4009
4010           <column name="status" key="packet-in-TYPE-dropped"
4011                   type='{"type": "integer", "minInteger": 0}'>
4012             Number of packets added to the queue that were later dropped due to
4013             overflow.  This value is less than or equal to <ref column="status"
4014             key="packet-in-TYPE-queued"/>.
4015           </column>
4016
4017           <column name="status" key="packet-in-TYPE-backlog"
4018                   type='{"type": "integer", "minInteger": 0}'>
4019             Number of packets currently queued.  The other statistics increase
4020             monotonically, but this one fluctuates between 0 and the <ref
4021             column="controller_burst_limit"/> as conditions change.
4022           </column>
4023         </group>
4024       </group>
4025     </group>
4026
4027     <group title="Additional In-Band Configuration">
4028       <p>These values are considered only in in-band control mode (see
4029       <ref column="connection_mode"/>).</p>
4030
4031       <p>When multiple controllers are configured on a single bridge, there
4032       should be only one set of unique values in these columns.  If different
4033       values are set for these columns in different controllers, the effect
4034       is unspecified.</p>
4035
4036       <column name="local_ip">
4037         The IP address to configure on the local port,
4038         e.g. <code>192.168.0.123</code>.  If this value is unset, then
4039         <ref column="local_netmask"/> and <ref column="local_gateway"/> are
4040         ignored.
4041       </column>
4042
4043       <column name="local_netmask">
4044         The IP netmask to configure on the local port,
4045         e.g. <code>255.255.255.0</code>.  If <ref column="local_ip"/> is set
4046         but this value is unset, then the default is chosen based on whether
4047         the IP address is class A, B, or C.
4048       </column>
4049
4050       <column name="local_gateway">
4051         The IP address of the gateway to configure on the local port, as a
4052         string, e.g. <code>192.168.0.1</code>.  Leave this column unset if
4053         this network has no gateway.
4054       </column>
4055     </group>
4056
4057     <group title="Controller Status">
4058       <column name="is_connected">
4059         <code>true</code> if currently connected to this controller,
4060         <code>false</code> otherwise.
4061       </column>
4062
4063       <column name="role"
4064               type='{"type": "string", "enum": ["set", ["other", "master", "slave"]]}'>
4065         <p>The level of authority this controller has on the associated
4066         bridge. Possible values are:</p>
4067         <dl>
4068           <dt><code>other</code></dt>
4069           <dd>Allows the controller access to all OpenFlow features.</dd>
4070           <dt><code>master</code></dt>
4071           <dd>Equivalent to <code>other</code>, except that there may be at
4072           most one master controller at a time.  When a controller configures
4073           itself as <code>master</code>, any existing master is demoted to
4074           the <code>slave</code> role.</dd>
4075           <dt><code>slave</code></dt>
4076           <dd>Allows the controller read-only access to OpenFlow features.
4077           Attempts to modify the flow table will be rejected with an
4078           error.  Slave controllers do not receive OFPT_PACKET_IN or
4079           OFPT_FLOW_REMOVED messages, but they do receive OFPT_PORT_STATUS
4080           messages.</dd>
4081         </dl>
4082       </column>
4083
4084       <column name="status" key="last_error">
4085         A human-readable description of the last error on the connection
4086         to the controller; i.e. <code>strerror(errno)</code>.  This key
4087         will exist only if an error has occurred.
4088       </column>
4089
4090       <column name="status" key="state"
4091               type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
4092         <p>
4093           The state of the connection to the controller:
4094         </p>
4095         <dl>
4096           <dt><code>VOID</code></dt>
4097           <dd>Connection is disabled.</dd>
4098
4099           <dt><code>BACKOFF</code></dt>
4100           <dd>Attempting to reconnect at an increasing period.</dd>
4101
4102           <dt><code>CONNECTING</code></dt>
4103           <dd>Attempting to connect.</dd>
4104
4105           <dt><code>ACTIVE</code></dt>
4106           <dd>Connected, remote host responsive.</dd>
4107
4108           <dt><code>IDLE</code></dt>
4109           <dd>Connection is idle.  Waiting for response to keep-alive.</dd>
4110         </dl>
4111         <p>
4112           These values may change in the future.  They are provided only for
4113           human consumption.
4114         </p>
4115       </column>
4116
4117       <column name="status" key="sec_since_connect"
4118               type='{"type": "integer", "minInteger": 0}'>
4119         The amount of time since this controller last successfully connected to
4120         the switch (in seconds).  Value is empty if controller has never
4121         successfully connected.
4122       </column>
4123
4124       <column name="status" key="sec_since_disconnect"
4125               type='{"type": "integer", "minInteger": 1}'>
4126         The amount of time since this controller last disconnected from
4127         the switch (in seconds). Value is empty if controller has never
4128         disconnected.
4129       </column>
4130     </group>
4131
4132     <group title="Connection Parameters">
4133       <p>
4134         Additional configuration for a connection between the controller
4135         and the Open vSwitch.
4136       </p>
4137
4138       <column name="other_config" key="dscp"
4139               type='{"type": "integer"}'>
4140         The Differentiated Service Code Point (DSCP) is specified using 6 bits
4141         in the Type of Service (TOS) field in the IP header. DSCP provides a
4142         mechanism to classify the network traffic and provide Quality of
4143         Service (QoS) on IP networks.
4144
4145         The DSCP value specified here is used when establishing the connection
4146         between the controller and the Open vSwitch.  If no value is specified,
4147         a default value of 48 is chosen.  Valid DSCP values must be in the
4148         range 0 to 63.
4149       </column>
4150     </group>
4151
4152
4153     <group title="Common Columns">
4154       The overall purpose of these columns is described under <code>Common
4155       Columns</code> at the beginning of this document.
4156
4157       <column name="external_ids"/>
4158       <column name="other_config"/>
4159     </group>
4160   </table>
4161
4162   <table name="Manager" title="OVSDB management connection.">
4163     <p>
4164       Configuration for a database connection to an Open vSwitch database
4165       (OVSDB) client.
4166     </p>
4167
4168     <p>
4169       This table primarily configures the Open vSwitch database
4170       (<code>ovsdb-server</code>), not the Open vSwitch switch
4171       (<code>ovs-vswitchd</code>).  The switch does read the table to determine
4172       what connections should be treated as in-band.
4173     </p>
4174
4175     <p>
4176       The Open vSwitch database server can initiate and maintain active
4177       connections to remote clients.  It can also listen for database
4178       connections.
4179     </p>
4180
4181     <group title="Core Features">
4182       <column name="target">
4183         <p>Connection method for managers.</p>
4184         <p>
4185           The following connection methods are currently supported:
4186         </p>
4187         <dl>
4188           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4189           <dd>
4190             <p>
4191               The specified SSL <var>port</var> on the host at the given
4192               <var>ip</var>, which must be expressed as an IP address
4193               (not a DNS name).  The <ref table="Open_vSwitch"
4194               column="ssl"/> column in the <ref table="Open_vSwitch"/>
4195               table must point to a valid SSL configuration when this
4196               form is used.
4197             </p>
4198             <p>
4199               If <var>port</var> is not specified, it defaults to 6640.
4200             </p>
4201             <p>
4202               SSL support is an optional feature that is not always
4203               built as part of Open vSwitch.
4204             </p>
4205           </dd>
4206
4207           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4208           <dd>
4209             <p>
4210               The specified TCP <var>port</var> on the host at the given
4211               <var>ip</var>, which must be expressed as an IP address (not a
4212               DNS name), where <var>ip</var> can be IPv4 or IPv6 address.  If
4213               <var>ip</var> is an IPv6 address, wrap it in square brackets,
4214               e.g. <code>tcp:[::1]:6640</code>.
4215             </p>
4216             <p>
4217               If <var>port</var> is not specified, it defaults to 6640.
4218             </p>
4219           </dd>
4220           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4221           <dd>
4222             <p>
4223               Listens for SSL connections on the specified TCP <var>port</var>.
4224               Specify 0 for <var>port</var> to have the kernel automatically
4225               choose an available port.  If <var>ip</var>, which must be
4226               expressed as an IP address (not a DNS name), is specified, then
4227               connections are restricted to the specified local IP address
4228               (either IPv4 or IPv6 address).  If <var>ip</var> is an IPv6
4229               address, wrap in square brackets,
4230               e.g. <code>pssl:6640:[::1]</code>.  If <var>ip</var> is not
4231               specified then it listens only on IPv4 (but not IPv6) addresses.
4232               The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
4233               table="Open_vSwitch"/> table must point to a valid SSL
4234               configuration when this form is used.
4235             </p>
4236             <p>
4237               If <var>port</var> is not specified, it defaults to 6640.
4238             </p>
4239             <p>
4240               SSL support is an optional feature that is not always built as
4241               part of Open vSwitch.
4242             </p>
4243           </dd>
4244           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4245           <dd>
4246             <p>
4247               Listens for connections on the specified TCP <var>port</var>.
4248               Specify 0 for <var>port</var> to have the kernel automatically
4249               choose an available port.  If <var>ip</var>, which must be
4250               expressed as an IP address (not a DNS name), is specified, then
4251               connections are restricted to the specified local IP address
4252               (either IPv4 or IPv6 address).  If <var>ip</var> is an IPv6
4253               address, wrap it in square brackets,
4254               e.g. <code>ptcp:6640:[::1]</code>.  If <var>ip</var> is not
4255               specified then it listens only on IPv4 addresses.
4256             </p>
4257             <p>
4258               If <var>port</var> is not specified, it defaults to 6640.
4259             </p>
4260           </dd>
4261         </dl>
4262         <p>When multiple managers are configured, the <ref column="target"/>
4263         values must be unique.  Duplicate <ref column="target"/> values yield
4264         unspecified results.</p>
4265       </column>
4266
4267       <column name="connection_mode">
4268         <p>
4269           If it is specified, this setting must be one of the following strings
4270           that describes how Open vSwitch contacts this OVSDB client over the
4271           network:
4272         </p>
4273
4274         <dl>
4275           <dt><code>in-band</code></dt>
4276           <dd>
4277             In this mode, this connection's traffic travels over a bridge
4278             managed by Open vSwitch.  With this setting, Open vSwitch allows
4279             traffic to and from the client regardless of the contents of the
4280             OpenFlow flow table.  (Otherwise, Open vSwitch would never be able
4281             to connect to the client, because it did not have a flow to enable
4282             it.)  This is the most common connection mode because it is not
4283             necessary to maintain two independent networks.
4284           </dd>
4285           <dt><code>out-of-band</code></dt>
4286           <dd>
4287             In this mode, the client's traffic uses a control network separate
4288             from that managed by Open vSwitch, that is, Open vSwitch does not
4289             use any of its own network devices to communicate with the client.
4290             The control network must be configured separately, before or after
4291             <code>ovs-vswitchd</code> is started.
4292           </dd>
4293         </dl>
4294
4295         <p>
4296           If not specified, the default is implementation-specific.
4297         </p>
4298       </column>
4299     </group>
4300
4301     <group title="Client Failure Detection and Handling">
4302       <column name="max_backoff">
4303         Maximum number of milliseconds to wait between connection attempts.
4304         Default is implementation-specific.
4305       </column>
4306
4307       <column name="inactivity_probe">
4308         Maximum number of milliseconds of idle time on connection to the client
4309         before sending an inactivity probe message.  If Open vSwitch does not
4310         communicate with the client for the specified number of seconds, it
4311         will send a probe.  If a response is not received for the same
4312         additional amount of time, Open vSwitch assumes the connection has been
4313         broken and attempts to reconnect.  Default is implementation-specific.
4314         A value of 0 disables inactivity probes.
4315       </column>
4316     </group>
4317
4318     <group title="Status">
4319       <p>
4320         Key-value pair of <ref column="is_connected"/> is always updated.
4321         Other key-value pairs in the status columns may be updated depends
4322         on the <ref column="target"/> type.
4323       </p>
4324
4325       <p>
4326         When <ref column="target"/> specifies a connection method that
4327         listens for inbound connections (e.g. <code>ptcp:</code> or
4328         <code>punix:</code>), both <ref column="n_connections"/> and
4329         <ref column="is_connected"/> may also be updated while the
4330         remaining key-value pairs are omitted.
4331       </p>
4332
4333       <p>
4334         On the other hand, when <ref column="target"/> specifies an
4335         outbound connection, all key-value pairs may be updated, except
4336         the above-mentioned two key-value pairs associated with inbound
4337         connection targets. They are omitted.
4338       </p>
4339
4340     <column name="is_connected">
4341         <code>true</code> if currently connected to this manager,
4342         <code>false</code> otherwise.
4343       </column>
4344
4345       <column name="status" key="last_error">
4346         A human-readable description of the last error on the connection
4347         to the manager; i.e. <code>strerror(errno)</code>.  This key
4348         will exist only if an error has occurred.
4349       </column>
4350
4351       <column name="status" key="state"
4352               type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
4353         <p>
4354           The state of the connection to the manager:
4355         </p>
4356         <dl>
4357           <dt><code>VOID</code></dt>
4358           <dd>Connection is disabled.</dd>
4359
4360           <dt><code>BACKOFF</code></dt>
4361           <dd>Attempting to reconnect at an increasing period.</dd>
4362
4363           <dt><code>CONNECTING</code></dt>
4364           <dd>Attempting to connect.</dd>
4365
4366           <dt><code>ACTIVE</code></dt>
4367           <dd>Connected, remote host responsive.</dd>
4368
4369           <dt><code>IDLE</code></dt>
4370           <dd>Connection is idle.  Waiting for response to keep-alive.</dd>
4371         </dl>
4372         <p>
4373           These values may change in the future.  They are provided only for
4374           human consumption.
4375         </p>
4376       </column>
4377
4378       <column name="status" key="sec_since_connect"
4379               type='{"type": "integer", "minInteger": 0}'>
4380         The amount of time since this manager last successfully connected
4381         to the database (in seconds). Value is empty if manager has never
4382         successfully connected.
4383       </column>
4384
4385       <column name="status" key="sec_since_disconnect"
4386               type='{"type": "integer", "minInteger": 0}'>
4387         The amount of time since this manager last disconnected from the
4388         database (in seconds). Value is empty if manager has never
4389         disconnected.
4390       </column>
4391
4392       <column name="status" key="locks_held">
4393         Space-separated list of the names of OVSDB locks that the connection
4394         holds.  Omitted if the connection does not hold any locks.
4395       </column>
4396
4397       <column name="status" key="locks_waiting">
4398         Space-separated list of the names of OVSDB locks that the connection is
4399         currently waiting to acquire.  Omitted if the connection is not waiting
4400         for any locks.
4401       </column>
4402
4403       <column name="status" key="locks_lost">
4404         Space-separated list of the names of OVSDB locks that the connection
4405         has had stolen by another OVSDB client.  Omitted if no locks have been
4406         stolen from this connection.
4407       </column>
4408
4409       <column name="status" key="n_connections"
4410               type='{"type": "integer", "minInteger": 2}'>
4411         When <ref column="target"/> specifies a connection method that
4412         listens for inbound connections (e.g. <code>ptcp:</code> or
4413         <code>pssl:</code>) and more than one connection is actually active,
4414         the value is the number of active connections.  Otherwise, this
4415         key-value pair is omitted.
4416       </column>
4417
4418       <column name="status" key="bound_port" type='{"type": "integer"}'>
4419         When <ref column="target"/> is <code>ptcp:</code> or
4420         <code>pssl:</code>, this is the TCP port on which the OVSDB server is
4421         listening.  (This is particularly useful when <ref
4422         column="target"/> specifies a port of 0, allowing the kernel to
4423         choose any available port.)
4424       </column>
4425     </group>
4426
4427     <group title="Connection Parameters">
4428       <p>
4429         Additional configuration for a connection between the manager
4430         and the Open vSwitch Database.
4431       </p>
4432
4433       <column name="other_config" key="dscp"
4434               type='{"type": "integer"}'>
4435         The Differentiated Service Code Point (DSCP) is specified using 6 bits
4436         in the Type of Service (TOS) field in the IP header. DSCP provides a
4437         mechanism to classify the network traffic and provide Quality of
4438         Service (QoS) on IP networks.
4439
4440         The DSCP value specified here is used when establishing the connection
4441         between the manager and the Open vSwitch.  If no value is specified, a
4442         default value of 48 is chosen.  Valid DSCP values must be in the range
4443         0 to 63.
4444       </column>
4445     </group>
4446
4447     <group title="Common Columns">
4448       The overall purpose of these columns is described under <code>Common
4449       Columns</code> at the beginning of this document.
4450
4451       <column name="external_ids"/>
4452       <column name="other_config"/>
4453     </group>
4454   </table>
4455
4456   <table name="NetFlow">
4457     A NetFlow target.  NetFlow is a protocol that exports a number of
4458     details about terminating IP flows, such as the principals involved
4459     and duration.
4460
4461     <column name="targets">
4462       NetFlow targets in the form
4463       <code><var>ip</var>:<var>port</var></code>.  The <var>ip</var>
4464       must be specified numerically, not as a DNS name.
4465     </column>
4466
4467     <column name="engine_id">
4468       Engine ID to use in NetFlow messages.  Defaults to datapath index
4469       if not specified.
4470     </column>
4471
4472     <column name="engine_type">
4473       Engine type to use in NetFlow messages.  Defaults to datapath
4474       index if not specified.
4475     </column>
4476
4477     <column name="active_timeout">
4478       <p>
4479         The interval at which NetFlow records are sent for flows that
4480         are still active, in seconds.  A value of <code>0</code>
4481         requests the default timeout (currently 600 seconds); a value
4482         of <code>-1</code> disables active timeouts.
4483       </p>
4484
4485       <p>
4486         The NetFlow passive timeout, for flows that become inactive,
4487         is not configurable.  It will vary depending on the Open
4488         vSwitch version, the forms and contents of the OpenFlow flow
4489         tables, CPU and memory usage, and network activity.  A typical
4490         passive timeout is about a second.
4491       </p>
4492     </column>
4493
4494     <column name="add_id_to_interface">
4495       <p>If this column's value is <code>false</code>, the ingress and egress
4496       interface fields of NetFlow flow records are derived from OpenFlow port
4497       numbers.  When it is <code>true</code>, the 7 most significant bits of
4498       these fields will be replaced by the least significant 7 bits of the
4499       engine id.  This is useful because many NetFlow collectors do not
4500       expect multiple switches to be sending messages from the same host, so
4501       they do not store the engine information which could be used to
4502       disambiguate the traffic.</p>
4503       <p>When this option is enabled, a maximum of 508 ports are supported.</p>
4504     </column>
4505
4506     <group title="Common Columns">
4507       The overall purpose of these columns is described under <code>Common
4508       Columns</code> at the beginning of this document.
4509
4510       <column name="external_ids"/>
4511     </group>
4512   </table>
4513
4514   <table name="SSL">
4515     SSL configuration for an Open_vSwitch.
4516
4517     <column name="private_key">
4518       Name of a PEM file containing the private key used as the switch's
4519       identity for SSL connections to the controller.
4520     </column>
4521
4522     <column name="certificate">
4523       Name of a PEM file containing a certificate, signed by the
4524       certificate authority (CA) used by the controller and manager,
4525       that certifies the switch's private key, identifying a trustworthy
4526       switch.
4527     </column>
4528
4529     <column name="ca_cert">
4530       Name of a PEM file containing the CA certificate used to verify
4531       that the switch is connected to a trustworthy controller.
4532     </column>
4533
4534     <column name="bootstrap_ca_cert">
4535       If set to <code>true</code>, then Open vSwitch will attempt to
4536       obtain the CA certificate from the controller on its first SSL
4537       connection and save it to the named PEM file. If it is successful,
4538       it will immediately drop the connection and reconnect, and from then
4539       on all SSL connections must be authenticated by a certificate signed
4540       by the CA certificate thus obtained.  <em>This option exposes the
4541       SSL connection to a man-in-the-middle attack obtaining the initial
4542       CA certificate.</em>  It may still be useful for bootstrapping.
4543     </column>
4544
4545     <group title="Common Columns">
4546       The overall purpose of these columns is described under <code>Common
4547       Columns</code> at the beginning of this document.
4548
4549       <column name="external_ids"/>
4550     </group>
4551   </table>
4552
4553   <table name="sFlow">
4554     <p>A set of sFlow(R) targets.  sFlow is a protocol for remote
4555     monitoring of switches.</p>
4556
4557     <column name="agent">
4558       Name of the network device whose IP address should be reported as the
4559       ``agent address'' to collectors.  If not specified, the agent device is
4560       figured from the first target address and the routing table.  If the
4561       routing table does not contain a route to the target, the IP address
4562       defaults to the <ref table="Controller" column="local_ip"/> in the
4563       collector's <ref table="Controller"/>.  If an agent IP address cannot be
4564       determined any of these ways, sFlow is disabled.
4565     </column>
4566
4567     <column name="header">
4568       Number of bytes of a sampled packet to send to the collector.
4569       If not specified, the default is 128 bytes.
4570     </column>
4571
4572     <column name="polling">
4573       Polling rate in seconds to send port statistics to the collector.
4574       If not specified, defaults to 30 seconds.
4575     </column>
4576
4577     <column name="sampling">
4578       Rate at which packets should be sampled and sent to the collector.
4579       If not specified, defaults to 400, which means one out of 400
4580       packets, on average, will be sent to the collector.
4581     </column>
4582
4583     <column name="targets">
4584       sFlow targets in the form
4585       <code><var>ip</var>:<var>port</var></code>.
4586     </column>
4587
4588     <group title="Common Columns">
4589       The overall purpose of these columns is described under <code>Common
4590       Columns</code> at the beginning of this document.
4591
4592       <column name="external_ids"/>
4593     </group>
4594   </table>
4595
4596   <table name="IPFIX">
4597     <p>Configuration for sending packets to IPFIX collectors.</p>
4598
4599     <p>
4600       IPFIX is a protocol that exports a number of details about flows.  The
4601       IPFIX implementation in Open vSwitch samples packets at a configurable
4602       rate, extracts flow information from those packets, optionally caches and
4603       aggregates the flow information, and sends the result to one or more
4604       collectors.
4605     </p>
4606
4607     <p>
4608       IPFIX in Open vSwitch can be configured two different ways:
4609     </p>
4610
4611     <ul>
4612       <li>
4613         With <em>per-bridge sampling</em>, Open vSwitch performs IPFIX sampling
4614         automatically on all packets that pass through a bridge.  To configure
4615         per-bridge sampling, create an <ref table="IPFIX"/> record and point a
4616         <ref table="Bridge"/> table's <ref table="Bridge" column="ipfix"/>
4617         column to it.  The <ref table="Flow_Sample_Collector_Set"/> table is
4618         not used for per-bridge sampling.
4619       </li>
4620
4621       <li>
4622         <p>
4623           With <em>flow-based sampling</em>, <code>sample</code> actions in the
4624           OpenFlow flow table drive IPFIX sampling.  See
4625           <code>ovs-ofctl</code>(8) for a description of the
4626           <code>sample</code> action.
4627         </p>
4628
4629         <p>
4630           Flow-based sampling also requires database configuration: create a
4631           <ref table="IPFIX"/> record that describes the IPFIX configuration
4632           and a <ref table="Flow_Sample_Collector_Set"/> record that points to
4633           the <ref table="Bridge"/> whose flow table holds the
4634           <code>sample</code> actions and to <ref table="IPFIX"/> record.  The
4635           <ref table="Bridge" column="ipfix"/> in the <ref table="Bridge"/>
4636           table is not used for flow-based sampling.
4637         </p>
4638       </li>
4639     </ul>
4640
4641     <column name="targets">
4642       IPFIX target collectors in the form
4643       <code><var>ip</var>:<var>port</var></code>.
4644     </column>
4645
4646     <column name="cache_active_timeout">
4647       The maximum period in seconds for which an IPFIX flow record is
4648       cached and aggregated before being sent.  If not specified,
4649       defaults to 0.  If 0, caching is disabled.
4650     </column>
4651
4652     <column name="cache_max_flows">
4653       The maximum number of IPFIX flow records that can be cached at a
4654       time.  If not specified, defaults to 0.  If 0, caching is
4655       disabled.
4656     </column>
4657
4658     <column name="other_config" key="enable-tunnel-sampling"
4659             type='{"type": "boolean"}'>
4660       <p>
4661         Set to <code>true</code> to enable sampling and reporting tunnel
4662         header 7-tuples in IPFIX flow records.  Tunnel sampling is enabled
4663         by default.
4664       </p>
4665
4666       <p>
4667         The following enterprise entities report the sampled tunnel info:
4668       </p>
4669
4670       <dl>
4671         <dt>tunnelType:</dt>
4672         <dd>
4673           <p>ID: 891, and enterprise ID 6876 (VMware).</p>
4674           <p>type: unsigned 8-bit integer.</p>
4675           <p>data type semantics: identifier.</p>
4676           <p>description: Identifier of the layer 2 network overlay network
4677           encapsulation type: 0x01 VxLAN, 0x02 GRE, 0x03 LISP, 0x05 IPsec+GRE,
4678           0x07 GENEVE.</p>
4679         </dd>
4680         <dt>tunnelKey:</dt>
4681         <dd>
4682           <p>ID: 892, and enterprise ID 6876 (VMware).</p>
4683           <p>type: variable-length octetarray.</p>
4684           <p>data type semantics: identifier.</p>
4685           <p>description: Key which is used for identifying an individual
4686           traffic flow within a VxLAN (24-bit VNI), GENEVE (24-bit VNI),
4687           GRE (32-bit key), or LISP (24-bit instance ID) tunnel. The
4688           key is encoded in this octetarray as a 3-, 4-, or 8-byte integer
4689           ID in network byte order.</p>
4690         </dd>
4691         <dt>tunnelSourceIPv4Address:</dt>
4692         <dd>
4693           <p>ID: 893, and enterprise ID 6876 (VMware).</p>
4694           <p>type: unsigned 32-bit integer.</p>
4695           <p>data type semantics: identifier.</p>
4696           <p>description: The IPv4 source address in the tunnel IP packet
4697           header.</p>
4698         </dd>
4699         <dt>tunnelDestinationIPv4Address:</dt>
4700         <dd>
4701           <p>ID: 894, and enterprise ID 6876 (VMware).</p>
4702           <p>type: unsigned 32-bit integer.</p>
4703           <p>data type semantics: identifier.</p>
4704           <p>description: The IPv4 destination address in the tunnel IP
4705           packet header.</p>
4706         </dd>
4707         <dt>tunnelProtocolIdentifier:</dt>
4708         <dd>
4709           <p>ID: 895, and enterprise ID 6876 (VMware).</p>
4710           <p>type: unsigned 8-bit integer.</p>
4711           <p>data type semantics: identifier.</p>
4712           <p>description: The value of the protocol number in the tunnel
4713           IP packet header. The protocol number identifies the tunnel IP
4714           packet payload type.</p>
4715         </dd>
4716         <dt>tunnelSourceTransportPort:</dt>
4717         <dd>
4718           <p>ID: 896, and enterprise ID 6876 (VMware).</p>
4719           <p>type: unsigned 16-bit integer.</p>
4720           <p>data type semantics: identifier.</p>
4721           <p>description: The source port identifier in the tunnel transport
4722           header. For the transport protocols UDP, TCP, and SCTP, this is
4723           the source port number given in the respective header.</p>
4724         </dd>
4725         <dt>tunnelDestinationTransportPort:</dt>
4726         <dd>
4727           <p>ID: 897, and enterprise ID 6876 (VMware).</p>
4728           <p>type: unsigned 16-bit integer.</p>
4729           <p>data type semantics: identifier.</p>
4730           <p>description: The destination port identifier in the tunnel
4731           transport header. For the transport protocols UDP, TCP, and SCTP,
4732           this is the destination port number given in the respective header.
4733           </p>
4734         </dd>
4735       </dl>
4736
4737       <p>
4738         Before Open vSwitch 2.5.90, <ref column="other_config"
4739         key="enable-tunnel-sampling"/> was only supported with per-bridge
4740         sampling, and ignored otherwise.  Open vSwitch 2.5.90 and later support
4741         <ref column="other_config" key="enable-tunnel-sampling"/> for
4742         per-bridge and per-flow sampling.
4743       </p>
4744     </column>
4745
4746     <group title="Per-Bridge Sampling">
4747       <p>
4748         These values affect only per-bridge sampling.  See above for a
4749         description of the differences between per-bridge and flow-based
4750         sampling.
4751       </p>
4752
4753       <column name="sampling">
4754         The rate at which packets should be sampled and sent to each target
4755         collector.  If not specified, defaults to 400, which means one out of
4756         400 packets, on average, will be sent to each target collector.
4757       </column>
4758
4759       <column name="obs_domain_id">
4760         The IPFIX Observation Domain ID sent in each IPFIX packet.  If not
4761         specified, defaults to 0.
4762       </column>
4763
4764       <column name="obs_point_id">
4765         The IPFIX Observation Point ID sent in each IPFIX flow record.  If not
4766         specified, defaults to 0.
4767       </column>
4768
4769       <column name="other_config" key="enable-input-sampling"
4770               type='{"type": "boolean"}'>
4771         By default, Open vSwitch samples and reports flows at bridge port input
4772         in IPFIX flow records.  Set this column to <code>false</code> to
4773         disable input sampling.
4774       </column>
4775
4776       <column name="other_config" key="enable-output-sampling"
4777               type='{"type": "boolean"}'>
4778         By default, Open vSwitch samples and reports flows at bridge port
4779         output in IPFIX flow records.  Set this column to <code>false</code> to
4780         disable output sampling.
4781       </column>
4782     </group>
4783
4784     <group title="Common Columns">
4785       The overall purpose of these columns is described under <code>Common
4786       Columns</code> at the beginning of this document.
4787
4788       <column name="external_ids"/>
4789     </group>
4790   </table>
4791
4792   <table name="Flow_Sample_Collector_Set">
4793     <p>
4794       A set of IPFIX collectors of packet samples generated by OpenFlow
4795       <code>sample</code> actions.  This table is used only for IPFIX
4796       flow-based sampling, not for per-bridge sampling (see the <ref
4797       table="IPFIX"/> table for a description of the two forms).
4798     </p>
4799
4800     <column name="id">
4801       The ID of this collector set, unique among the bridge's
4802       collector sets, to be used as the <code>collector_set_id</code>
4803       in OpenFlow <code>sample</code> actions.
4804     </column>
4805
4806     <column name="bridge">
4807       The bridge into which OpenFlow <code>sample</code> actions can
4808       be added to send packet samples to this set of IPFIX collectors.
4809     </column>
4810
4811     <column name="ipfix">
4812       Configuration of the set of IPFIX collectors to send one flow
4813       record per sampled packet to.
4814     </column>
4815
4816     <group title="Common Columns">
4817       The overall purpose of these columns is described under <code>Common
4818       Columns</code> at the beginning of this document.
4819
4820       <column name="external_ids"/>
4821     </group>
4822   </table>
4823
4824   <table name="AutoAttach">
4825     <p>
4826       Auto Attach configuration within a bridge.  The IETF Auto-Attach SPBM
4827       draft standard describes a compact method of using IEEE 802.1AB Link
4828       Layer Discovery Protocol (LLDP) together with a IEEE 802.1aq Shortest
4829       Path Bridging (SPB) network to automatically attach network devices
4830       to individual services in a SPB network.  The intent here is to allow
4831       network applications and devices using OVS to be able to easily take
4832       advantage of features offered by industry standard SPB networks.
4833     </p>
4834
4835     <p>
4836       Auto Attach (AA) uses LLDP to communicate between a directly connected
4837       Auto Attach Client (AAC) and Auto Attach Server (AAS). The LLDP protocol
4838       is extended to add two new Type-Length-Value tuples (TLVs). The first
4839       new TLV supports the ongoing discovery of directly connected AA
4840       correspondents. Auto Attach operates by regularly transmitting AA
4841       discovery TLVs between the AA client and AA server. By exchanging these
4842       discovery messages, both the AAC and AAS learn the system name and
4843       system description of their peer. In the OVS context, OVS operates as
4844       the AA client and the AA server resides on a switch at the edge of the
4845       SPB network.
4846     </p>
4847
4848     <p>
4849       Once AA discovery has been completed the AAC then uses the second new TLV
4850       to deliver identifier mappings from the AAC to the AAS. A primary feature
4851       of Auto Attach is to facilitate the mapping of VLANs defined outside the
4852       SPB network onto service ids (ISIDs) defined within the SPM network. By
4853       doing so individual external VLANs can be mapped onto specific SPB
4854       network services. These VLAN id to ISID mappings can be configured and
4855       managed locally using new options added to the ovs-vsctl command.
4856     </p>
4857
4858     <p>
4859       The Auto Attach OVS feature does not provide a full implementation of
4860       the LLDP protocol. Support for the mandatory TLVs as defined by the LLDP
4861       standard and support for the AA TLV extensions is provided. LLDP
4862       protocol support in OVS can be enabled or disabled on a port by port
4863       basis. LLDP support is disabled by default.
4864     </p>
4865
4866     <column name="system_name">
4867       The system_name string is exported in LLDP messages.  It should uniquely
4868       identify the bridge in the network.
4869     </column>
4870
4871     <column name="system_description">
4872       The system_description string is exported in LLDP messages.  It should
4873       describe the type of software and hardware.
4874     </column>
4875
4876     <column name="mappings">
4877       A mapping from SPB network Individual Service Identifier (ISID) to VLAN
4878       id.
4879     </column>
4880   </table>
4881 </database>