On Wed, Aug 26, 2015 at 04:56:20PM -0700, Andy Zhou wrote: > On Wed, Aug 26, 2015 at 4:46 PM, Ben Pfaff <b...@nicira.com> wrote: > > On Wed, Aug 26, 2015 at 12:34:07PM -0700, Andy Zhou wrote: > >> On Tue, Aug 25, 2015 at 9:37 PM, Ben Pfaff <b...@nicira.com> wrote: > >> > + SSET_FOR_EACH_SAFE (name, next, a) { > >> > + if (!sset_contains(b, name)) { > >> > + sset_delete(a, SSET_NODE_FROM_NAME(name)); > >> Why not use 'sset_find_and_delete()'? > > > > That would re-search the sset for 'name', but we already have a pointer > > to it via 'a'. > Sorry, did not get this. It seems they both call sset_find()...
SSET_NODE_FROM_NAME just expands to CONTAINER_OF, and sset_delete() is just: /* Deletes 'node' from 'set' and frees 'node'. */ void sset_delete(struct sset *set, struct sset_node *node) { hmap_remove(&set->map, &node->hmap_node); free(node); } so I'm not sure what you're looking at. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev