[ovs-dev] [PATCH 5/5] lib/cmap: Use atomics for all bucket data.

Ben Pfaff blp at nicira.com
Wed May 28 23:54:14 UTC 2014


On Wed, May 28, 2014 at 04:49:46PM -0700, Jarno Rajahalme wrote:
> On May 27, 2014, at 4:58 PM, Ben Pfaff <blp at nicira.com> wrote:
> > I don't really like the look of this:
> > +    for (struct cmap_node *iter = &b->nodes[slot];;) {
> > Would you mind writing it as this?
> > +    struct cmap_node *iter = &b->nodes[slot];
> > +    for (;;) {
> > 
> 
> Done. Mixing declarations and code in action?

Yeah, let's dip a toe into the waters.

Mostly I think for (declaration;;) looks ugly.

> > I think this makes the code uglier but it also seems to put the memory
> > ordering issues to rest.
> > 
> > Acked-by: Ben Pfaff <blp at nicira.com>
> 
> I?m almost ready to push the series, waiting for your final comment on 4/5.

I'm done.



More information about the dev mailing list