summaryrefslogtreecommitdiff
path: root/lib/ofp-parse.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2015-09-08 15:21:45 -0700
committerBen Pfaff <blp@ovn.org>2015-11-29 10:56:41 -0800
commit6d5d1f3bb76ca76b31fa8614bb914f91aace3f52 (patch)
tree3852ce35410962e22a554c01029abc13ab4daec6 /lib/ofp-parse.c
parent4f20179ddc79843ef89f68d2c8342df0eb69a814 (diff)
downloadopenvswitch-6d5d1f3bb76ca76b31fa8614bb914f91aace3f52.tar.gz
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>
Diffstat (limited to 'lib/ofp-parse.c')
-rw-r--r--lib/ofp-parse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index fe372cb7f..ea7938e67 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -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",
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")) {
uint16_t priority = 0;