linux/net/openvswitch
Jarno Rajahalme 0e9796b4af 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>
2014-05-22 16:27:36 -07:00
..
actions.c openvswitch: Use ether_addr_copy 2014-05-16 13:40:29 -07:00
datapath.c openvswitch: Reduce locking requirements. 2014-05-22 16:27:36 -07:00
datapath.h openvswitch: Use net_ratelimit in OVS_NLERR 2014-05-16 13:40:28 -07:00
dp_notify.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
flow_netlink.c openvswitch: Compact sw_flow_key. 2014-05-22 16:27:34 -07:00
flow_netlink.h openvswitch: Remove 5-tuple optimization. 2014-05-16 13:40:29 -07:00
flow_table.c openvswitch: Fix typo. 2014-05-22 16:27:35 -07:00
flow_table.h openvswitch: Per NUMA node flow stats. 2014-05-16 13:40:29 -07:00
flow.c openvswitch: Fix ovs_flow_stats_get/clear RCU dereference. 2014-05-22 16:27:35 -07:00
flow.h openvswitch: Fix ovs_flow_stats_get/clear RCU dereference. 2014-05-22 16:27:35 -07:00
Kconfig openvswitch: Add SCTP support 2013-08-26 14:03:13 -07:00
Makefile openvswitch: Restructure datapath.c and flow.c 2013-10-03 18:16:47 -07:00
vport-gre.c net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c 2014-05-16 13:40:29 -07:00
vport-internal_dev.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
vport-internal_dev.h openvswitch: Replace Nicira Networks. 2012-05-03 18:55:23 -07:00
vport-netdev.c openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-netdev.h openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-vxlan.c net: rename local_df to ignore_df 2014-05-12 14:03:41 -04:00
vport.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
vport.h openvswitch: avoid cast-qual warning in vport_priv 2014-05-16 13:40:28 -07:00