Filter updates based on the out_group of a flow monitor. This is analogous to the existing treatment of out_port.
This is in preparation for supporting OpenFlow1.4 flow monitors. Signed-off-by: Simon Horman <ho...@verge.net.au> --- v3 * Rework for removal of asynchronous operations v2 * No change --- ofproto/connmgr.c | 5 +++++ ofproto/ofproto-provider.h | 2 ++ ofproto/ofproto.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 06f463e..98ffb68 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -2121,6 +2121,11 @@ ofmonitor_report(struct connmgr *mgr, struct rule *rule, && ofpacts_output_to_port(old_actions->ofpacts, old_actions->ofpacts_len, m->out_port))) + && (ofproto_rule_has_out_group(rule, m->out_group) + || (old_actions + && ofpacts_output_to_group(old_actions->ofpacts, + old_actions->ofpacts_len, + m->out_group))) && (ofconn == abbrev_ofconn || !(m->flags & OFPFMF14_ONLY_OWN)) && cls_rule_is_loose_match(&rule->cr, &m->match)) { flags |= m->flags; diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 60cba62..860cace 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -423,6 +423,8 @@ const struct rule_actions *rule_actions_create(const struct ofpact *, size_t); void rule_actions_destroy(const struct rule_actions *); bool ofproto_rule_has_out_port(const struct rule *, ofp_port_t port) OVS_REQUIRES(ofproto_mutex); +bool ofproto_rule_has_out_group(const struct rule *, uint32_t group_id) + OVS_REQUIRES(ofproto_mutex); /* A set of rules to which an OpenFlow operation applies. */ struct rule_collection { diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index b5abcb8..706784a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2587,7 +2587,7 @@ ofproto_rule_has_out_port(const struct rule *rule, ofp_port_t port) } /* Returns true if 'rule' has group and equals group_id. */ -static bool +bool ofproto_rule_has_out_group(const struct rule *rule, uint32_t group_id) OVS_REQUIRES(ofproto_mutex) { -- 2.0.0.rc2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev