OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
])
-AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1])
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=3,actions=2])
+AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl add-flows br0 -])
+AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=2])
+AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=4,actions=3])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=0 actions=output:1
- in_port=1 actions=output:0
- table=1, in_port=3 actions=output:2
+ in_port=1 actions=output:2
+ in_port=2 actions=output:1
+ table=1, in_port=4 actions=output:3
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply:
])
-AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl -F openflow10 add-flows br0 -])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 in_port=0,actions=1])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=3,actions=2])
+AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl -F openflow10 add-flows br0 -])
+AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 in_port=1,actions=2])
+AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=4,actions=3])
AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=0 actions=output:1
- in_port=1 actions=output:0
- table=1, in_port=3 actions=output:2
+ in_port=1 actions=output:2
+ in_port=2 actions=output:1
+ table=1, in_port=4 actions=output:3
OFPST_FLOW reply:
])
AT_CHECK([ovs-ofctl -F openflow10 dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
AT_SETUP([ofproto - dump flows with cookie])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=3
])
AT_CHECK([ovs-ofctl dump-flows br0 cookie=0x3/-1 | ofctl_strip | sort], [0], [dnl
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl dump-aggregate br0 cookie=0x3/-1 | STRIP_XIDS], [0], [dnl
AT_SETUP([ofproto - dump flows with cookie mask])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=3
])
AT_CHECK([ovs-ofctl dump-flows br0 cookie=0x3/0x1 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl dump-aggregate br0 cookie=0x3/0x1 | STRIP_XIDS], [0], [dnl
AT_SETUP([ofproto - mod flow with cookie change (OpenFlow 1.0)])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 cookie=0x1,in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 cookie=0x1,in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
OFPST_FLOW reply:
])
-AT_CHECK([ovs-ofctl -F openflow10 mod-flows br0 cookie=0x2,in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F openflow10 mod-flows br0 cookie=0x2,in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=1 actions=output:0
+ cookie=0x2, in_port=1 actions=output:1
OFPST_FLOW reply:
])
OVS_VSWITCHD_STOP
AT_SETUP([ofproto - mod flow with cookie change (NXM)])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 cookie=0x1,in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F nxm add-flow br0 cookie=0x1,in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
NXST_FLOW reply:
])
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=0x2,in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=0x2,in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=1 actions=output:0
+ cookie=0x2, in_port=1 actions=output:1
NXST_FLOW reply:
])
OVS_VSWITCHD_STOP
AT_SETUP([ofproto - mod flows based on cookie mask])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x1, in_port=2 actions=output:0
- cookie=0x2, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x1, in_port=2 actions=output:1
+ cookie=0x2, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
cookie=0x1, in_port=1 actions=output:4
cookie=0x1, in_port=2 actions=output:4
- cookie=0x2, in_port=3 actions=output:0
+ cookie=0x2, in_port=3 actions=output:1
NXST_FLOW reply:
])
OVS_VSWITCHD_STOP
AT_SETUP([ofproto - mod flows based on cookie mask with cookie change])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x1, in_port=2 actions=output:0
- cookie=0x2, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x1, in_port=2 actions=output:1
+ cookie=0x2, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=1/-1,cookie=4,actions=4])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=3 actions=output:0
+ cookie=0x2, in_port=3 actions=output:1
cookie=0x4, in_port=1 actions=output:4
cookie=0x4, in_port=2 actions=output:4
NXST_FLOW reply:
AT_SETUP([ofproto - mod flow with cookie miss (mask==0)])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F nxm mod-flows br0 in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:0
+ in_port=1 actions=output:1
NXST_FLOW reply:
])
OVS_VSWITCHD_STOP
AT_SETUP([ofproto - mod flow with cookie miss (mask!=0)])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=1/1,in_port=1,actions=0])
+AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=1/1,in_port=1,actions=1])
AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
NXST_FLOW reply:
])
AT_SETUP([ofproto - del flows with cookies])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_SETUP([ofproto - del flows based on cookie])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3/-1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
NXST_FLOW reply:
])
OVS_VSWITCHD_STOP
AT_SETUP([ofproto - del flows based on cookie mask])
OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
+AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:0
- cookie=0x2, in_port=2 actions=output:0
- cookie=0x3, in_port=3 actions=output:0
+ cookie=0x1, in_port=1 actions=output:1
+ cookie=0x2, in_port=2 actions=output:1
+ cookie=0x3, in_port=3 actions=output:1
NXST_FLOW reply:
])
AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3/0x1])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=2 actions=output:0
+ cookie=0x2, in_port=2 actions=output:1
NXST_FLOW reply:
])
OVS_VSWITCHD_STOP
# Send some packet-outs with OFPP_NONE and OFPP_CONTROLLER (65533) as in_port.
AT_CHECK([ovs-ofctl packet-out br0 none controller '0001020304050010203040501234'])
-AT_CHECK([ovs-ofctl packet-out br0 65533 controller '0001020304050010203040505678'])
+AT_CHECK([ovs-ofctl packet-out br0 controller controller '0001020304050010203040505678'])
# Stop the monitor and check its output.
ovs-appctl -t ovs-ofctl ofctl/barrier
associated with \fIswitch\fR (version 1.7 or later). This is a subset
of the information provided by the \fBshow\fR command.
.
-.TP
-\fBmod\-port \fIswitch\fR \fInetdev\fR \fIaction\fR
-Modify characteristics of an interface monitored by \fIswitch\fR.
-\fInetdev\fR can be referred to by its OpenFlow assigned port number or
-the device name, e.g. \fBeth0\fR. The \fIaction\fR may be any one of the
-following:
+.IP "\fBmod\-port \fIswitch\fR \fIport\fR \fIaction\fR"
+Modify characteristics of port \fBport\fR in \fIswitch\fR. \fIport\fR
+may be an OpenFlow port number or name or the keyword \fBLOCAL\fR (the
+preferred way to refer to the OpenFlow local port). The \fIaction\fR
+may be any one of the following:
.
.RS
.IQ \fBup\fR
.
.IP "\fBqueue\-stats \fIswitch \fR[\fIport \fR[\fIqueue\fR]]"
Prints to the console statistics for the specified \fIqueue\fR on
-\fIport\fR within \fIswitch\fR. Either of \fIport\fR or \fIqueue\fR
-or both may be omitted (or equivalently specified as \fBALL\fR). If
-both are omitted, statistics are printed for all queues on all ports.
-If only \fIqueue\fR is omitted, then statistics are printed for all
-queues on \fIport\fR; if only \fIport\fR is omitted, then statistics
-are printed for \fIqueue\fR on every port where it exists.
+\fIport\fR within \fIswitch\fR. \fIport\fR can be an OpenFlow port
+number or name, the keyword \fBLOCAL\fR (the preferred way to refer to
+the OpenFlow local port), or the keyword \fBALL\fR. Either of
+\fIport\fR or \fIqueue\fR or both may be omitted (or equivalently the
+keyword \fBALL\fR). If both are omitted, statistics are printed for
+all queues on all ports. If only \fIqueue\fR is omitted, then
+statistics are printed for all queues on \fIport\fR; if only
+\fIport\fR is omitted, then statistics are printed for \fIqueue\fR on
+every port where it exists.
.
.SS "OpenFlow Switch Flow Table Commands"
.
Connects to \fIswitch\fR and instructs it to execute the OpenFlow
\fIactions\fR on each \fIpacket\fR. For the purpose of executing the
actions, the packets are considered to have arrived on \fIin_port\fR,
-which may be an OpenFlow assigned port number, an OpenFlow port name
-(e.g. \fBeth0\fR), the keyword \fBlocal\fR for the OpenFlow ``local''
-port \fBOFPP_LOCAL\fR, or the keyword \fBnone\fR to indicate that the
-packet was generated by the switch itself.
+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
+``local'' port), or the keyword \fBNONE\fR to indicate that the packet
+was generated by the switch itself.
.
.SS "OpenFlow Switch Monitoring Commands"
.
Limits the monitoring to the table with the given \fInumber\fR between
0 and 254. By default, all tables are monitored.
.IP "\fBout_port=\fIport\fR"
-If set, only flows that output to \fIport\fR are monitored.
+If set, only flows that output to \fIport\fR are monitored. The
+\fIport\fR may be an OpenFlow port number or keyword
+(e.g. \fBLOCAL\fR).
.IP "\fIfield\fB=\fIvalue\fR"
Monitors only flows that have \fIfield\fR specified as the given
\fIvalue\fR. Any syntax valid for matching on \fBdump\-flows\fR may
may be specified to explicitly mark any of these fields as a wildcard.
(\fB*\fR should be quoted to protect it from shell expansion.)
.
-.IP \fBin_port=\fIport_no\fR
-Matches OpenFlow port \fIport_no\fR. Ports are numbered as
-displayed by \fBovs\-ofctl show\fR.
+.IP \fBin_port=\fIport\fR
+Matches OpenFlow port \fIport\fR, which may be an OpenFlow port number
+or keyword (e.g. \fBLOCAL\fR).
+\fBovs\-ofctl show\fR.
.IP
(The \fBresubmit\fR action can search OpenFlow flow tables with
arbitrary \fBin_port\fR values, so flows that match port numbers that
.IP \fBactions=\fR[\fItarget\fR][\fB,\fItarget\fR...]\fR
Specifies a comma-separated list of actions to take on a packet when the
flow entry matches. If no \fItarget\fR is specified, then packets
-matching the flow are dropped. The \fItarget\fR may be a decimal port
+matching the flow are dropped. The \fItarget\fR may be an OpenFlow port
number designating the physical port on which to output the packet, or one
of the following keywords:
.
.RS
-.IP \fBoutput\fR:\fIport\fR
-.IQ \fBoutput\fR:\fIsrc\fB[\fIstart\fB..\fIend\fB]
-Outputs the packet. If \fIport\fR is an OpenFlow port number, outputs directly
-to it. Otherwise, outputs to the OpenFlow port number read from \fIsrc\fR
-which must be an NXM field as described above. Outputting to an NXM field is
-an OpenFlow extension which is not supported by standard OpenFlow switches.
-.IP
-Example: \fBoutput:NXM_NX_REG0[16..31]\fR outputs to the OpenFlow port number
-written in the upper half of register 0.
-.
-.IP \fBenqueue\fR:\fIport\fB:\fIqueue\fR
+.IP \fBoutput:\fIport\fR
+Outputs the packet to \fIport\fR, which must be an OpenFlow port
+number or keyword (e.g. \fBLOCAL\fR).
+.
+.IP \fBoutput:\fIsrc\fB[\fIstart\fB..\fIend\fB]
+Outputs the packet to the OpenFlow port number read from \fIsrc\fR,
+which must be an NXM field as described above. For example,
+\fBoutput:NXM_NX_REG0[16..31]\fR outputs to the OpenFlow port number
+written in the upper half of register 0. This form of \fBoutput\fR
+uses an OpenFlow extension that is not supported by standard OpenFlow
+switches.
+.
+.IP \fBenqueue:\fIport\fB:\fIqueue\fR
Enqueues the packet on the specified \fIqueue\fR within port
-\fIport\fR. The number of supported queues depends on the switch;
-some OpenFlow implementations do not support queuing at all.
+\fIport\fR, which must be an OpenFlow port number or keyword
+(e.g. \fBLOCAL\fR).. The number of supported queues depends on the
+switch; some OpenFlow implementations do not support queuing at all.
.
.IP \fBnormal\fR
Subjects the packet to the device's normal L2/L3 processing. (This
.
.TP
\fBout_port=\fIport\fR
-If set, a matching flow must include an output action to \fIport\fR.
+If set, a matching flow must include an output action to \fIport\fR,
+which must an OpenFlow port number or name (e.g. \fBlocal\fR).
.
.SS "Table Entry Output"
.