datapath: Minimize dp and vport critical sections.
authorJarno Rajahalme <jrajahalme@nicira.com>
Fri, 28 Mar 2014 20:44:23 +0000 (13:44 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Sun, 30 Mar 2014 00:16:19 +0000 (17:16 -0700)
commitd81eef1b874c3c51669fa56f57e69ba5e77ad2c5
tree34644f382ec350f8f7c8deae47fe862aa3a16d5d
parent0641a4fbd74d47648ae79208ab36ae3d35284a4d
datapath: 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>
datapath/datapath.c