summaryrefslogtreecommitdiff
path: root/Documentation/kobject.txt
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-05-05 21:28:07 (GMT)
committerPravin B Shelar <pshelar@nicira.com>2014-05-22 23:27:36 (GMT)
commit0e9796b4af9ef490e203158cb738a5a4986eb75c (patch)
tree31cd60e58dbf7f4fc11a4e57d921bef8a4667a57 /Documentation/kobject.txt
parent86ec8dbae27e5fa2b5d54f10f77286d9ef55732a (diff)
downloadlinux-0e9796b4af9ef490e203158cb738a5a4986eb75c.tar.xz
openvswitch: Reduce locking requirements.
Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(), ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info(). A datapath pointer is available only when holding a lock. Change ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a dp_ifindex directly, rather than a datapath pointer that is then (only) used to get the dp_ifindex. This is useful, since the dp_ifindex is available even when the datapath pointer is not, both before and after taking a lock, which makes further critical section reduction possible. Make ovs_flow_cmd_alloc_info() take an 'acts' argument instead a 'flow' pointer. This allows some future patches to do the allocation before acquiring the flow pointer. The locking requirements after this patch are: ovs_flow_cmd_alloc_info(): May be called without locking, must not be called while holding the RCU read lock (due to memory allocation). If 'acts' belong to a flow in the flow table, however, then the caller must hold ovs_mutex. ovs_flow_cmd_fill_info(): Either ovs_mutex or RCU read lock must be held. ovs_flow_cmd_build_info(): This calls both of the above, so the caller must hold ovs_mutex. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'Documentation/kobject.txt')
0 files changed, 0 insertions, 0 deletions