openvswitch: Minimize dp and vport critical sections.
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 5 May 2014 21:13:32 +0000 (14:13 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 22 May 2014 23:27:35 +0000 (16:27 -0700)
commit6093ae9abac18871afd0bbc5cf093dff53112fcb
tree23ea64a6a9987a2e1b45e7fbe5689c7767cb3f5b
parent56c19868e115fcf8d62d843e1b9616bb9837d0db
openvswitch: Minimize dp and vport critical sections.

Move most memory allocations away from the ovs_mutex critical
sections.  vport allocations still happen while the lock is taken, as
changing that would require major refactoring. Also, vports are
created very rarely so it should not matter.

Change ovs_dp_cmd_get() now only takes the rcu_read_lock(), rather
than ovs_lock(), as nothing need to be changed.  This was done by
ovs_vport_cmd_get() already.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
net/openvswitch/datapath.c