On Sat, Jun 14, 2014 at 08:33:13AM +0900, Simon Horman wrote: > Previously the out_port of a flow monitor was > checked in ofmonitor_report() using ofoperation_has_out_port(). > > When ofoperation_has_out_port() was removed so was the call to > it in ofmonitor_report() thus flow monitor updates are longer > filtered on the out_port. > > This restores filtering on the out_port by using > ofproto_rule_has_out_port to check the actions of the rule. > If the actions have been changed by a modify actions then > ofpacts_output_to_port() is also used to check the old actions. > > This patch also adds a test to exercise out_ports for flow monitors. > > This resolves what appears to be a regression introduced by > b20f4073eecd4761 ("ofproto: Do straightforward removal of asynchronous flow > operations.") > > Signed-off-by: Simon Horman <ho...@verge.net.au>
Good catch. Thank you! In modify_flows__(), moving the destruction of 'actions' later wasn't necessary, because rule_actions_destroy() postpones the actual destruction until the next RCU grace period, but it is less confusing to readers to "destroy" it after the last use, so I'm happy to move it later. However, in that case we should move it after the *actual* last use, so I folded in this incremental: diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 50ba91a..458703d 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -4202,9 +4202,9 @@ modify_flows__(struct ofproto *ofproto, struct ofputil_flow_mod *fm, } if (change_actions) { - rule_actions_destroy(actions); learned_cookies_inc(ofproto, rule_get_actions(rule)); learned_cookies_dec(ofproto, actions, &dead_cookies); + rule_actions_destroy(actions); } } learned_cookies_flush(ofproto, &dead_cookies); With that change, I applied this to master. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev