> > I think you could make it work as you stop iterating upon deletion, > like this: > > for (i = 0; i < ma->count - 1; i++) { > if (mask == ma->masks[i]) { > [...] > break; > } > } > > This is also how other similar kernel code looks like.
You are right. The mask insertion and deletion are operated under mutex lock, so I should not worry about duplicated entries which my original loop was trying to catch. I will switch to using for loop. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev