[ovs-dev] [PATCH] ofproto: Send only one OFPT_FLOW_REMOVED message when a flow expires.
Ben Pfaff
blp at nicira.com
Mon Oct 21 19:49:41 UTC 2013
Thanks, applied to master and branch-2.0.
On Fri, Oct 18, 2013 at 05:25:05PM -0700, Justin Pettit wrote:
> Acked-by: Justin Pettit <jpettit at nicira.com>
>
> --Justin
>
>
> On Oct 18, 2013, at 4:30 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> > Commit 15aaf59932a3 (ofproto: Add global locking around flow table
> > changes.) introduced doubled messages for expirations.
> >
> > Reported-by: John Hurley <john.hurley at netronome.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > ofproto/ofproto.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> > index f44a7c4..f67e1fb 100644
> > --- a/ofproto/ofproto.c
> > +++ b/ofproto/ofproto.c
> > @@ -1139,7 +1139,8 @@ ofproto_get_snoops(const struct ofproto *ofproto, struct sset *snoops)
> > }
> >
> > static void
> > -ofproto_rule_delete__(struct ofproto *ofproto, struct rule *rule)
> > +ofproto_rule_delete__(struct ofproto *ofproto, struct rule *rule,
> > + uint8_t reason)
> > OVS_REQUIRES(ofproto_mutex)
> > {
> > struct ofopgroup *group;
> > @@ -1147,7 +1148,7 @@ ofproto_rule_delete__(struct ofproto *ofproto, struct rule *rule)
> > ovs_assert(!rule->pending);
> >
> > group = ofopgroup_create_unattached(ofproto);
> > - delete_flow__(rule, group, OFPRR_DELETE);
> > + delete_flow__(rule, group, reason);
> > ofopgroup_submit(group);
> > }
> >
> > @@ -1202,7 +1203,7 @@ ofproto_flush__(struct ofproto *ofproto)
> > ovs_rwlock_unlock(&table->cls.rwlock);
> > CLS_CURSOR_FOR_EACH_SAFE (rule, next_rule, cr, &cursor) {
> > if (!rule->pending) {
> > - ofproto_rule_delete__(ofproto, rule);
> > + ofproto_rule_delete__(ofproto, rule, OFPRR_DELETE);
> > }
> > }
> > }
> > @@ -4322,8 +4323,7 @@ ofproto_rule_expire(struct rule *rule, uint8_t reason)
> > ovs_assert(reason == OFPRR_HARD_TIMEOUT || reason == OFPRR_IDLE_TIMEOUT
> > || reason == OFPRR_DELETE || reason == OFPRR_GROUP_DELETE);
> >
> > - ofproto_rule_send_removed(rule, reason);
> > - ofproto_rule_delete__(ofproto, rule);
> > + ofproto_rule_delete__(ofproto, rule, reason);
> > }
> >
> > /* Reduces '*timeout' to no more than 'max'. A value of zero in either case
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list