[ovs-dev] [non-NORMAL learning 2/3] tag: Be more precise about choosing tags to add, in tag_set_add().

Ben Pfaff blp at nicira.com
Fri Aug 6 18:48:37 UTC 2010

On Thu, Aug 05, 2010 at 01:41:28PM -0400, Jesse Gross wrote:
> On Wed, Aug 4, 2010 at 10:27 AM, Ben Pfaff <blp at nicira.com> wrote:
> > There is no need to add "tag" values with only a single bit set, but until
> > now tag_set_add() would do so anyhow.  (That is not a bug, it is only a
> > possible performance loss.)  It is likely that no existing caller ever
> > tries to do this, but an upcoming commit will start creating 1-bit tags
> > and thus introduce the possibility, so it seems like a good idea to avoid
> > the problem before it starts.
> >
> I don't like the concept of 1 bit tags (see the response to the next patch
> in this series) so rather than try to handle them I would prefer that we
> just ensure that they never occur.

OK, I dropped that part.  Thanks.

> > It is also not necessary to add a "tag" if all of the bits in it are
> > already present in some member of the set, so add that optimization too.
> >
> This part looks fine.


More information about the dev mailing list