2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 09:58:01 +00:00

ovs-ofctl: Add "out_group" keyword for OF1.1+ matching on output group.

It seems that OVS has never supported this OpenFlow feature in ovs-ofctl,
which makes it hard to test.  This commit adds support.

(Open vSwitch has supported this in OpenFlow for a long time; it's only
ovs-ofctl that didn't.)

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Ben Pfaff 2015-09-08 15:21:45 -07:00
parent 4f20179ddc
commit 6d5d1f3bb7
3 changed files with 16 additions and 1 deletions

2
NEWS
View File

@ -10,6 +10,8 @@ Post-v2.4.0
* OpenFlow 1.4+ OFPTC_EVICTION is now implemented. * OpenFlow 1.4+ OFPTC_EVICTION is now implemented.
* OpenFlow 1.4+ OFPMP_TABLE_DESC is now implemented. * OpenFlow 1.4+ OFPMP_TABLE_DESC is now implemented.
* Allow modifying the ICMPv4/ICMPv6 type and code fields. * Allow modifying the ICMPv4/ICMPv6 type and code fields.
- ovs-ofctl:
* New "out_group" keyword for OpenFlow 1.1+ matching on output group.
- Support for matching/generating options as well as the OAM bit with - Support for matching/generating options as well as the OAM bit with
Geneve tunnels. Geneve tunnels.
- Support Multicast Listener Discovery (MLDv1 and MLDv2). - Support Multicast Listener Discovery (MLDv1 and MLDv2).

View File

@ -403,6 +403,12 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
error = xasprintf("%s is not a valid OpenFlow port", error = xasprintf("%s is not a valid OpenFlow port",
value); value);
} }
} else if (fields & F_OUT_PORT && !strcmp(name, "out_group")) {
*usable_protocols &= OFPUTIL_P_OF11_UP;
if (!ofputil_group_from_string(value, &fm->out_group)) {
error = xasprintf("%s is not a valid OpenFlow group",
value);
}
} else if (fields & F_PRIORITY && !strcmp(name, "priority")) { } else if (fields & F_PRIORITY && !strcmp(name, "priority")) {
uint16_t priority = 0; uint16_t priority = 0;

View File

@ -2469,13 +2469,20 @@ check is expensive so it is best to avoid it.)
. .
.PP .PP
The \fBdump\-flows\fR, \fBdump\-aggregate\fR, \fBdel\-flow\fR The \fBdump\-flows\fR, \fBdump\-aggregate\fR, \fBdel\-flow\fR
and \fBdel\-flows\fR commands support one additional optional field: and \fBdel\-flows\fR commands support these additional optional fields:
. .
.TP .TP
\fBout_port=\fIport\fR \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 be an OpenFlow port number or name (e.g. \fBlocal\fR). which must be an OpenFlow port number or name (e.g. \fBlocal\fR).
. .
.TP
\fBout_group=\fIport\fR
If set, a matching flow must include an \fBgroup\fR action naming
\fIgroup\fR, which must be an OpenFlow group number. This field
is supported in Open vSwitch 2.5 and later and requires OpenFlow 1.1
or later.
.
.SS "Table Entry Output" .SS "Table Entry Output"
. .
The \fBdump\-tables\fR and \fBdump\-aggregate\fR commands print information The \fBdump\-tables\fR and \fBdump\-aggregate\fR commands print information