Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-13 Thread Jarno Rajahalme
Pushed to master. Thanks On Feb 12, 2014, at 9:45 AM, Ben Pfaff wrote: > On Wed, Feb 12, 2014 at 08:59:18AM -0800, Jarno Rajahalme wrote: >> >> On Feb 11, 2014, at 4:40 PM, Ben Pfaff wrote: >> >>> On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: Reading the hmap count

Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-12 Thread Ben Pfaff
On Wed, Feb 12, 2014 at 08:59:18AM -0800, Jarno Rajahalme wrote: > > On Feb 11, 2014, at 4:40 PM, Ben Pfaff wrote: > > > On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: > >> Reading the hmap count for determining if it is empty or not is thread > >> safe, so avoid locking when n

Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-12 Thread Jarno Rajahalme
On Feb 11, 2014, at 4:40 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: >> Reading the hmap count for determining if it is empty or not is thread >> safe, so avoid locking when not necessary. >> >> Signed-off-by: Jarno Rajahalme > > It might be worth a

Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: > Reading the hmap count for determining if it is empty or not is thread > safe, so avoid locking when not necessary. > > Signed-off-by: Jarno Rajahalme It might be worth adding an atomic_thread_fence(memory_order_acquire); before

[ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-11 Thread Jarno Rajahalme
Reading the hmap count for determining if it is empty or not is thread safe, so avoid locking when not necessary. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif-xlate.c | 19 +-- ofproto/ofproto-dpif.c | 17 +++-- 2 files changed, 20 insertions(+),