[ovs-dev] [Scalability 02/10] bridge: Optimize iface_lookup() and port_lookup_iface() with a hash.

Ben Pfaff blp at nicira.com
Wed May 5 21:01:39 UTC 2010


On Wed, May 05, 2010 at 01:57:29PM -0700, Jesse Gross wrote:
> On Mon, May 3, 2010 at 3:50 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> >  void
> > +shash_add_assert(struct shash *sh, const char *name, const void *data)
> > +{
> > +    bool added OVS_UNUSED = shash_add_once(sh, name, data);
> > +    assert(added);
> > +}
> 
> How come "added" is marked as unused?

It avoids a warning with -DNDEBUG (in which case 'added' really is
unused).

> >     /* Check and delete duplicate interfaces. */
> > -    svec_init(&ifaces);
> > -    iterate_and_prune_ifaces(br, check_duplicate_ifaces, &ifaces);
> > -    svec_destroy(&ifaces);
> > +    //svec_init(&ifaces);
> > +    //iterate_and_prune_ifaces(br, check_duplicate_ifaces, &ifaces);
> > +    //svec_destroy(&ifaces);
> >
> 
> I think we can just dump these lines.

Oops.  Yes, I meant to delete them entirely.  Thanks!




More information about the dev mailing list