mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 06:45:17 +00:00
ovs-ofctl: Refine documentation of Geneve option mapping.
The text didn't say how to actually match on them. I took the liberty of massaging the text a little further, too. Suggested-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
This commit is contained in:
@@ -421,14 +421,25 @@ buckets of the group are removed.
|
|||||||
.
|
.
|
||||||
.SS "OpenFlow Switch Geneve Option Table Commands"
|
.SS "OpenFlow Switch Geneve Option Table Commands"
|
||||||
.
|
.
|
||||||
In order to work with Geneve options, it is necessary to maintain a mapping
|
Open vSwitch maintains a mapping table between Geneve options (defined
|
||||||
table between an option (defined by <class, type, length>) and an NXM field
|
by <class, type, length>) and an NXM field \fBtun_metadata\fIn\fR,
|
||||||
that can be operated on for the purposes of matches, actions, etc. This
|
where \fIn\fR ranges from 0 to 63, that can be operated on for the
|
||||||
mapping must be explicitly specified by the user through the following
|
purposes of matches, actions, etc. This mapping must be explicitly
|
||||||
commands. The format for \fIoptions\fR is given in \fBOption Syntax\fR below.
|
specified by the user through the following commands.
|
||||||
|
|
||||||
Note that a given mapping should not be changed while it is in active use by
|
A Geneve option mapping is specified with the syntax
|
||||||
a flow. The result of doing so is undefined.
|
\fB{class=\fIclass\fB,type=\fItype\fB,len=\fIlength\fB}->tun_metadata\fIn\fR.
|
||||||
|
When an option mapping exists for a given \fBtun_metadata\fIn\fR,
|
||||||
|
matching on the defined field becomes possible, e.g.:
|
||||||
|
|
||||||
|
.RS
|
||||||
|
ovs-ofctl add-geneve-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"
|
||||||
|
.PP
|
||||||
|
ovs-ofctl add-flow br0 tun_metadata0=1234,actions=controller
|
||||||
|
.RE
|
||||||
|
|
||||||
|
A mapping should not be changed while it is in active
|
||||||
|
use by a flow. The result of doing so is undefined.
|
||||||
|
|
||||||
Currently, the Geneve mapping table is shared between all OpenFlow
|
Currently, the Geneve mapping table is shared between all OpenFlow
|
||||||
switches in a given instance of Open vSwitch. This restriction will
|
switches in a given instance of Open vSwitch. This restriction will
|
||||||
@@ -437,29 +448,19 @@ be lifted in the future to allow for easier management.
|
|||||||
These commands are Nicira extensions to OpenFlow and require Open vSwitch
|
These commands are Nicira extensions to OpenFlow and require Open vSwitch
|
||||||
2.5 or later.
|
2.5 or later.
|
||||||
|
|
||||||
.IP "\fBadd\-geneve\-map \fIswitch options\fR"
|
.IP "\fBadd\-geneve\-map \fIswitch option\fR[\fB,\fIoption\fR]..."
|
||||||
Add each option entry to \fIswitch\fR's tables. Duplicate fields are
|
Add each \fIoption\fR to \fIswitch\fR's tables. Duplicate fields are
|
||||||
rejected.
|
rejected.
|
||||||
.
|
.
|
||||||
.IP "\fBdel\-geneve\-map \fIswitch \fR[\fIoptions\fR]"
|
.IP "\fBdel\-geneve\-map \fIswitch \fR[\fIoption\fR[\fB,\fIoption\fR]]..."
|
||||||
Delete each option entry in \fIswitch\fR's tables based on its field index.
|
Delete each \fIoption\fR from \fIswitch\fR's table, or all Geneve option
|
||||||
Fields that aren't already mapped will be ignored. If no options are
|
mapping if no \fIoption\fR is specified.
|
||||||
specified then the entire table will be cleared.
|
Fields that aren't mapped are ignored.
|
||||||
.
|
.
|
||||||
.IP "\fBdump\-geneve\-map \fIswitch\fR"
|
.IP "\fBdump\-geneve\-map \fIswitch\fR"
|
||||||
Show the currently mapped fields in the switch's option table as well
|
Show the currently mapped fields in the switch's option table as well
|
||||||
as switch capabilities.
|
as switch capabilities.
|
||||||
.
|
.
|
||||||
.IP "\fBOption Syntax\fR"
|
|
||||||
\fB{class=\fIclass\fB,type=\fItype\fB,len=\fIlength\fB}->tun_metadata\fIn\fR
|
|
||||||
|
|
||||||
An option can be specified in this form (repeating as necessary and
|
|
||||||
separated by commas). For example, the follow is used to map a new option:
|
|
||||||
|
|
||||||
.RS
|
|
||||||
add-geneve-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"
|
|
||||||
.RE
|
|
||||||
.
|
|
||||||
.SS "OpenFlow Switch Monitoring Commands"
|
.SS "OpenFlow Switch Monitoring Commands"
|
||||||
.
|
.
|
||||||
.IP "\fBsnoop \fIswitch\fR"
|
.IP "\fBsnoop \fIswitch\fR"
|
||||||
|
Reference in New Issue
Block a user