On Wed, Mar 19, 2014 at 06:31:10PM -0700, Jesse Gross wrote:
> On Fri, Feb 28, 2014 at 1:14 PM, Ben Pfaff <b...@nicira.com> wrote:
> > diff --git a/datapath/flow.c b/datapath/flow.c
> > index c3e3fcb..e9a2a27 100644
> > --- a/datapath/flow.c
> > +++ b/datapath/flow.c
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (c) 2007-2013 Nicira, Inc.
> > + * Copyright (c) 2007-2014 Nicira, Inc.
> >   *
> >   * This program is free software; you can redistribute it and/or
> >   * modify it under the terms of version 2 of the GNU General Public
> > @@ -148,7 +148,7 @@ void ovs_flow_stats_get(struct sw_flow *flow, struct 
> > ovs_flow_stats *ovs_stats,
> >                          * block bottom-halves here.
> >                          */
> >                         spin_lock_bh(&stats->lock);
> > -                       if (time_after(stats->used, *used))
> > +                       if (!*used || time_after(stats->used, *used))
> 
> Is there a corner case here if we have an actual used time that is
> exactly zero?

Yes.  It's not a new corner case though since the caller also considers
a 'used' of zero to be unused.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to