datapath-windows: Define OVS_DPPORT_NUMBER_INVALID
[cascardo/ovs.git] / utilities / ovs-ofctl.8.in
index 16d6d93..bcc3f33 100644 (file)
@@ -63,6 +63,31 @@ Prints to the console statistics for each of the flow tables used by
 Prints to the console features for each of the flow tables used by
 \fIswitch\fR.
 .
+.IP "\fBmod\-table \fIswitch\fR \fItable_id\fR  \fIflow_miss_handling\fR"
+An OpenFlow 1.0 switch looks up each packet that arrives at the switch
+in table 0, then in table 1 if there is no match in table 0, then in
+table 2, and so on until the packet finds a match in some table.
+Finally, if no match was found, the switch sends the packet to the
+controller
+.IP
+OpenFlow 1.1 and later offer more flexibility.  This command
+configures the flow table miss handling configuration for table
+\fItable_id\fR in \fIswitch\fR.  \fItable_id\fR may be an OpenFlow
+table number between 0 and 254, inclusive, or the keyword \fBALL\fR to
+modify all tables.  \fIflow_miss_handling\fR may be any one of the
+following:
+.RS
+.IP \fBdrop\fR
+Drop the packet.
+.IP \fBcontinue\fR
+Continue to the next table in the pipeline.  (This is how an OpenFlow
+1.0 switch always handles packets that do not match any flow, in
+tables other than the last one.)
+.IP \fBcontroller\fR
+Send to controller.  (This is how an OpenFlow 1.0 switch always
+handles packets that do not match any flow in the last table.)
+.RE
+.
 .TP
 \fBdump\-ports \fIswitch\fR [\fInetdev\fR]
 Prints to the console statistics for network devices associated with 
@@ -70,11 +95,19 @@ Prints to the console statistics for network devices associated with
 associated with that device will be printed.  \fInetdev\fR can be an
 OpenFlow assigned port number or device name, e.g. \fBeth0\fR.
 .
-.TP
-\fBdump\-ports\-desc \fIswitch\fR
+.IP "\fBdump\-ports\-desc \fIswitch\fR [\fIport\fR]"
 Prints to the console detailed information about network devices
-associated with \fIswitch\fR (version 1.7 or later).  This is a subset
-of the information provided by the \fBshow\fR command.
+associated with \fIswitch\fR.  To dump only a specific port, specify
+its number as \fIport\fR.  Otherwise, if \fIport\fR is omitted, or if
+it is specified as \fBANY\fR, then all ports are printed.  This is a
+subset of the information provided by the \fBshow\fR command.
+.IP
+If the connection to \fIswitch\fR negotiates OpenFlow 1.0, 1.2, or
+1.2, this command uses an OpenFlow extension only implemented in Open
+vSwitch (version 1.7 and later).
+.IP
+Only OpenFlow 1.5 and later support dumping a specific port.  Earlier
+versions of OpenFlow always dump all ports.
 .
 .IP "\fBmod\-port \fIswitch\fR \fIport\fR \fIaction\fR"
 Modify characteristics of port \fBport\fR in \fIswitch\fR.  \fIport\fR
@@ -223,31 +256,6 @@ Prints to the console statistics for the specified \fIgroups in the
 groups are printed.  See \fBGroup Syntax\fR, below, for the syntax of
 \fIgroups\fR.
 .
-.IP "\fBmod\-table \fIswitch\fR \fItable_id\fR  \fIflow_miss_handling\fR"
-An OpenFlow 1.0 switch looks up each packet that arrives at the switch
-in table 0, then in table 1 if there is no match in table 0, then in
-table 2, and so on until the packet finds a match in some table.
-Finally, if no match was found, the switch sends the packet to the
-controller
-.IP
-OpenFlow 1.1 and later offer more flexibility.  This command
-configures the flow table miss handling configuration for table
-\fItable_id\fR in \fIswitch\fR.  \fItable_id\fR may be an OpenFlow
-table number between 0 and 254, inclusive, or the keyword \fBALL\fR to
-modify all tables.  \fIflow_miss_handling\fR may be any one of the
-following:
-.RS
-.IP \fBdrop\fR
-Drop the packet.
-.IP \fBcontinue\fR
-Continue to the next table in the pipeline.  (This is how an OpenFlow
-1.0 switch always handles packets that do not match any flow, in
-tables other than the last one.)
-.IP \fBcontroller\fR
-Send to controller.  (This is how an OpenFlow 1.0 switch always
-handles packets that do not match any flow in the last table.)
-.RE
-.
 .SS "OpenFlow 1.3+ Switch Meter Table Commands"
 .
 These commands manage the meter table in an OpenFlow switch.  In each
@@ -345,7 +353,8 @@ differences were found.
 .
 .IP "\fBpacket\-out \fIswitch in_port actions packet\fR..."
 Connects to \fIswitch\fR and instructs it to execute the OpenFlow
-\fIactions\fR on each \fIpacket\fR.  For the purpose of executing the
+\fIactions\fR on each \fIpacket\fR.  Each \fBpacket\fR is specified as a
+series of hex digits.  For the purpose of executing the
 actions, the packets are considered to have arrived on \fIin_port\fR,
 which may be an OpenFlow port number or name (e.g. \fBeth0\fR), the
 keyword \fBLOCAL\fR (the preferred way to refer to the OpenFlow
@@ -528,8 +537,8 @@ if it also specifies particular L2 and L3 protocol types.  For
 example, if the L2 protocol type \fBdl_type\fR is wildcarded, then L3
 fields \fBnw_src\fR, \fBnw_dst\fR, and \fBnw_proto\fR must also be
 wildcarded.  Similarly, if \fBdl_type\fR or \fBnw_proto\fR (the L3
-protocol type) is wildcarded, so must be \fBtp_dst\fR and
-\fBtp_src\fR, which are L4 fields.  \fBovs\-ofctl\fR will warn about
+protocol type) is wildcarded, so must be the L4 fields \fBtcp_dst\fR and
+\fBtcp_src\fR.  \fBovs\-ofctl\fR will warn about
 flows not in normal form.
 .PP
 The following field assignments describe how a flow matches a packet.
@@ -679,21 +688,27 @@ When \fBdl_type\fR is wildcarded or set to a value other than 0x0800 or
 above).
 .IP
 .
-.IP \fBtp_src=\fIport\fR
-.IQ \fBtp_dst=\fIport\fR
-When \fBdl_type\fR and \fBnw_proto\fR specify TCP or UDP or SCTP, \fBtp_src\fR
-and \fBtp_dst\fR match the UDP or TCP or SCTP source or destination port
-\fIport\fR, respectively, which is specified as a decimal number
-between 0 and 65535, inclusive (e.g. 80 to match packets originating
-from a HTTP server).
-.IP
-When \fBdl_type\fR and \fBnw_proto\fR take other values, the values of
-these settings are ignored (see \fBFlow Syntax\fR above).
-.
-.IP \fBtp_src=\fIport\fB/\fImask\fR
-.IQ \fBtp_dst=\fIport\fB/\fImask\fR
-Bitwise match on TCP (or UDP or SCTP) source or destination port,
-respectively.  The \fIport\fR and \fImask\fR are 16-bit numbers
+.IP \fBtcp_src=\fIport\fR
+.IQ \fBtcp_dst=\fIport\fR
+.IQ \fBudp_src=\fIport\fR
+.IQ \fBudp_dst=\fIport\fR
+.IQ \fBsctp_src=\fIport\fR
+.IQ \fBsctp_dst=\fIport\fR
+Matches a TCP, UDP, or SCTP source or destination port \fIport\fR,
+which is specified as a decimal number between 0 and 65535, inclusive.
+.IP
+When \fBdl_type\fR and \fBnw_proto\fR are wildcarded or set to values
+that do not indicate an appropriate protocol, the values of these
+settings are ignored (see \fBFlow Syntax\fR above).
+.
+.IP \fBtcp_src=\fIport\fB/\fImask\fR
+.IQ \fBtcp_dst=\fIport\fB/\fImask\fR
+.IQ \fBudp_src=\fIport\fB/\fImask\fR
+.IQ \fBudp_dst=\fIport\fB/\fImask\fR
+.IQ \fBsctp_src=\fIport\fB/\fImask\fR
+.IQ \fBsctp_dst=\fIport\fB/\fImask\fR
+Bitwise match on TCP (or UDP or SCTP) source or destination port.
+The \fIport\fR and \fImask\fR are 16-bit numbers
 written in decimal or in hexadecimal prefixed by \fB0x\fR.  Each 1-bit
 in \fImask\fR requires that the corresponding bit in \fIport\fR must
 match.  Each 0-bit in \fImask\fR causes the corresponding bit to be
@@ -731,27 +746,32 @@ accomplish the same results:
 which become the following when written in the syntax required by
 \fBovs\-ofctl\fR:
 .br
-.B "tcp,tp_src=0x03e8/0xfff8"
+.B "tcp,tcp_src=0x03e8/0xfff8"
 .br
-.B "tcp,tp_src=0x03f0/0xfff0"
+.B "tcp,tcp_src=0x03f0/0xfff0"
 .br
-.B "tcp,tp_src=0x0400/0xfe00"
+.B "tcp,tcp_src=0x0400/0xfe00"
 .br
-.B "tcp,tp_src=0x0600/0xff00"
+.B "tcp,tcp_src=0x0600/0xff00"
 .br
-.B "tcp,tp_src=0x0700/0xff80"
+.B "tcp,tcp_src=0x0700/0xff80"
 .br
-.B "tcp,tp_src=0x0780/0xffc0"
+.B "tcp,tcp_src=0x0780/0xffc0"
 .br
-.B "tcp,tp_src=0x07c0/0xfff0"
+.B "tcp,tcp_src=0x07c0/0xfff0"
 .IP
 Only Open vSwitch 1.6 and later supports bitwise matching on transport
 ports.
 .IP
-Like the exact-match forms of \fBtp_src\fR and \fBtp_dst\fR described
+Like the exact-match forms described
 above, the bitwise match forms apply only when \fBdl_type\fR and
 \fBnw_proto\fR specify TCP or UDP or SCTP.
 .
+.IP \fBtp_src=\fIport\fR
+.IQ \fBtp_dst=\fIport\fR
+These are deprecated generic forms of L4 port matches.  In new code,
+please use the TCP-, UDP-, or SCTP-specific forms described above.
+.
 .IP \fBtcp_flags=\fIflags\fB/\fImask\fR
 .IQ \fBtcp_flags=\fR[\fB+\fIflag\fR...][\fB-\fIflag\fR...]
 Bitwise match on TCP flags.  The \fIflags\fR and \fImask\fR are 16-bit
@@ -1075,7 +1095,22 @@ indicates that the corresponding bit in \fIvalue\fR must match
 exactly, and a 0-bit wildcards that bit.
 .IP
 When a packet enters an OpenFlow switch, all of the registers are set
-to 0.  Only explicit Nicira extension actions change register values.
+to 0.  Only explicit actions change register values.
+.
+.IP "\fBxreg\fIidx\fB=\fIvalue\fR[\fB/\fImask\fR]"
+Matches \fIvalue\fR either exactly or with optional \fImask\fR in
+64-bit ``extended register'' number \fIidx\fR.  Each of the 64-bit
+extended registers overlays two of the 32-bit registers: \fBxreg0\fR
+overlays \fBreg0\fR and \fBreg1\fR, with \fBreg0\fR supplying the
+most-significant bits of \fBxreg0\fR and \fBreg1\fR the
+least-significant.  \fBxreg1\fR similarly overlays \fBreg2\fR and
+\fBreg3\fR, and so on.
+.IP
+These fields were added in Open vSwitch 2.3 to conform with the
+OpenFlow 1.5 (draft) specification.  OpenFlow 1.5 calls these fields
+just the ``packet registers,'' but Open vSwitch already had 32-bit
+registers by that name, which is why Open vSwitch refers to the
+standard registers as ``extended registers''.
 .
 .IP \fBpkt_mark=\fIvalue\fR[\fB/\fImask\fR]
 Matches packet metadata mark \fIvalue\fR either exactly or with optional
@@ -1136,6 +1171,10 @@ This form of \fBoutput\fR was added in Open vSwitch 1.3.0.  This form
 of \fBoutput\fR uses an OpenFlow extension that is not supported by
 standard OpenFlow switches.
 .
+.IP \fBgroup:\fIgroup_id\fR
+Outputs the packet to the OpenFlow group \fIgroup_id\fR. Group tables
+are only supported in OpenFlow 1.1+. See Group Syntax for more details.
+.
 .IP \fBnormal\fR
 Subjects the packet to the device's normal L2/L3 processing.  (This
 action is not implemented by all OpenFlow switches.)
@@ -1380,13 +1419,36 @@ six bits numbered 0 through 5, inclusive, in register 0 into bits 26
 through 31, inclusive;
 \fBmove:NXM_NX_REG0[0..15]\->NXM_OF_VLAN_TCI[]\fR copies the least
 significant 16 bits of register 0 into the VLAN TCI field.
-.
-.IP "\fBload:\fIvalue\fB\->\fIdst\fB[\fIstart\fB..\fIend\fB]"
-Writes \fIvalue\fR to bits \fIstart\fR through \fIend\fR, inclusive,
-in field \fIdst\fR.
 .IP
-Example: \fBload:55\->NXM_NX_REG2[0..5]\fR loads value 55 (bit pattern
-\fB110111\fR) into bits 0 through 5, inclusive, in register 2.
+In OpenFlow 1.0 through 1.4, \fBmove\fR uses an Open vSwitch extension
+to OpenFlow.  In OpenFlow 1.5, \fBmove\fR uses the OpenFlow 1.5
+(draft) standard \fBcopy_field\fR action.
+.
+.IP "\fBset_field:\fIvalue\fR[/\fImask\fR]\fB\->\fIdst"
+.IQ "\fBload:\fIvalue\fB\->\fIdst\fB[\fIstart\fB..\fIend\fB]"
+Loads a literal value into a field or part of a field.  With
+\fBset_field\fR, \fBvalue\fR and the optional \fBmask\fR are given in
+the customary syntax for field \fIdst\fR, which is expressed as a
+field name.  For example, \fBset_field:00:11:22:33:44:55->eth_src\fR
+sets the Ethernet source address to 00:11:22:33:44:55.  With
+\fBload\fR, \fIvalue\fR must be an integer value (in decimal or
+prefixed by \fB0x\fR for hexadecimal) and \fIdst\fR is the NXM or OXM
+name for the field.  For example,
+\fBload:0x001122334455->OXM_OF_ETH_DST[]\fR has the same effect as the
+prior \fBset_field\fR example.
+.IP
+The two forms exist for historical reasons.  Open vSwitch 1.1
+introduced \fBNXAST_REG_LOAD\fR as a Nicira extension to OpenFlow 1.0
+and used \fBload\fR to express it.  Later, OpenFlow 1.2 introduced a
+standard \fBOFPAT_SET_FIELD\fR action that was restricted to loading
+entire fields, so Open vSwitch added the form \fBset_field\fR with
+this restriction.  OpenFlow 1.5 extended \fBOFPAT_SET_FIELD\fR to the
+point that it became a superset of \fBNXAST_REG_LOAD\fR.  Open vSwitch
+translates either syntax as necessary for the OpenFlow version in use:
+in OpenFlow 1.0 and 1.1, \fBNXAST_REG_LOAD\fR; in OpenFlow 1.2, 1.3,
+and 1.4, \fBNXAST_REG_LOAD\fR for \fBload\fR or for loading a
+subfield, \fBOFPAT_SET_FIELD\fR otherwise; and OpenFlow 1.5 and later,
+\fBOFPAT_SET_FIELD\fR.
 .
 .IP "\fBpush:\fIsrc\fB[\fIstart\fB..\fIend\fB]"
 Pushes \fIstart\fR to \fIend\fR bits inclusive, in fields
@@ -1405,14 +1467,6 @@ Example: \fBpop:NXM_NX_REG2[0..5]\fR pops the value from top of the stack.
 Set register 2 bits 0 through 5, inclusive, based on bits 0 through 5 from the
 value just popped.
 .
-.IP "\fBset_field:\fIvalue\fB\->\fIdst"
-Writes the literal \fIvalue\fR into the field \fIdst\fR, which should
-be specified as a name used for matching.  (This is similar to
-\fBload\fR but more closely matches the set-field action defined in
-OpenFlow 1.2 and above.)
-.
-.IP
-Example: \fBset_field:00:11:22:33:44:55->eth_src\fR.
 .
 .IP "\fBmultipath(\fIfields\fB, \fIbasis\fB, \fIalgorithm\fB, \fIn_links\fB, \fIarg\fB, \fIdst\fB[\fIstart\fB..\fIend\fB])\fR"
 Hashes \fIfields\fR using \fIbasis\fR as a universal hash parameter,
@@ -1468,8 +1522,10 @@ specified.
 .IP \fBidle_timeout=\fIseconds\fR
 .IQ \fBhard_timeout=\fIseconds\fR
 .IQ \fBpriority=\fIvalue\fR
-These key-value pairs have the same meaning as in the usual
-\fBovs\-ofctl\fR flow syntax.
+.IQ \fBcookie=\fIvalue\fR
+.IQ \fBsend_flow_rem\fR
+These arguments have the same meaning as in the usual \fBovs\-ofctl\fR
+flow syntax.
 .
 .IP \fBfin_idle_timeout=\fIseconds\fR
 .IQ \fBfin_hard_timeout=\fIseconds\fR
@@ -1481,6 +1537,16 @@ The table in which the new flow should be inserted.  Specify a decimal
 number between 0 and 254.  The default, if \fBtable\fR is unspecified,
 is table 1.
 .
+.IP \fBdelete_learned\fR
+This flag enables deletion of the learned flows when the flow with the
+\fBlearn\fR action is removed.  Specifically, when the last
+\fBlearn\fR action with this flag and particular \fBtable\fR and
+\fBcookie\fR values is removed, the switch deletes all of the flows in
+the specified table with the specified cookie.
+.
+.IP
+This flag was added in Open vSwitch 2.4.
+.
 .IP \fIfield\fB=\fIvalue\fR
 .IQ \fIfield\fB[\fIstart\fB..\fIend\fB]=\fIsrc\fB[\fIstart\fB..\fIend\fB]\fR
 .IQ \fIfield\fB[\fIstart\fB..\fIend\fB]\fR
@@ -1527,9 +1593,6 @@ keep the learned flows separate from the primary flow table 0.)
 .RE
 .
 .RS
-.IP \fBapply_actions(\fR[\fIaction\fR][\fB,\fIaction\fR...]\fB)
-Applies the specific action(s) immediately. The syntax of actions are same
-to \fBactions=\fR field.
 .
 .IP \fBclear_actions\fR
 Clears all the actions in the action set immediately.
@@ -1568,6 +1631,8 @@ the action set, the one written later replaces the earlier action:
 .IP 5.
 \fBload\fR
 .IQ
+\fBmove\fR
+.IQ
 \fBmod_dl_dst\fR
 .IQ
 \fBmod_dl_src\fR
@@ -1597,9 +1662,10 @@ the action set, the one written later replaces the earlier action:
 \fBset_tunnel64\fR
 .IQ
 The action set can contain any number of these actions, with
-cumulative effect.  That is, when multiple actions modify the same
-part of a field, the later modification takes effect, and when they
-modify different parts of a field (or different fields), then both
+cumulative effect. They will be applied in the order as added.
+That is, when multiple actions modify the same part of a field,
+the later modification takes effect, and when they modify
+different parts of a field (or different fields), then both
 modifications are applied.
 .
 .IP 6.
@@ -1610,11 +1676,14 @@ modifications are applied.
 .IQ
 \fBoutput\fR
 .IQ
-If both actions are present, then \fBgroup\fR is executed and
-\fBoutput\fR is ignored, regardless of the order in which they were
-added to the action set.  (If neither action is present, the action
-set has no real effect, because the modified packet is not sent
-anywhere and thus the modifications are not visible.)
+\fBresubmit\fR
+.IQ
+If more than one of these actions is present, then the one listed
+earliest above is executed and the others are ignored, regardless of
+the order in which they were added to the action set.  (If none of these
+actions is present, the action set has no real effect, because the
+modified packet is not sent anywhere and thus the modifications are
+not visible.)
 .RE
 .IP
 Only the actions listed above may be written to the action set.
@@ -1875,11 +1944,13 @@ be specified.
 \fIbucket_parameters\fR consists of a list of \fIfield\fB=\fIvalue\fR
 assignments, separated by commas or white space followed by a
 comma-separated list of actions.
-The syntax of actions are same
-to \fBactions=\fR field described in \fBFlow Syntax\fR above.
 The fields for \fIbucket_parameters\fR are:
 .
 .RS
+.IP \fBactions=\fR[\fIaction\fR][\fB,\fIaction\fR...]\fR
+The syntax of actions are identical to the \fBactions=\fR field described in
+\fBFlow Syntax\fR above. Specyfing \fBactions=\fR is optional, any unknown
+bucket parameter will be interpreted as an action.
 .IP \fBweight=\fIvalue\fR
 The relative weight of the bucket as an integer. This may be used by the switch
 during bucket select for groups whose \fBtype\fR is \fBselect\fR.
@@ -2077,6 +2148,7 @@ These options currently affect only \fBdump\-flows\fR output.
 \fBovs\-ofctl\fR detaches only when executing the \fBmonitor\fR or \
 \fBsnoop\fR commands.
 .so lib/daemon.man
+.so lib/unixctl.man
 .SS "Public Key Infrastructure Options"
 .so lib/ssl.man
 .so lib/vlog.man