diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-04-23 03:48:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-25 01:43:15 -0400 |
commit | 3a4e0d6a95b2b6f7b22eb7c7361a0fc4289478eb (patch) | |
tree | 9d18818f7712eba0b9c7545bb04ed37d1ff11aaa /net/openvswitch/datapath.c | |
parent | def3117493eafd9dfa1f809d861e0031b2cc8a07 (diff) |
openvswitch: Use parallel_ops genl.
OVS locking was recently changed to have private OVS lock which
simplified overall locking. Therefore there is no need to have
another global genl lock to protect OVS data structures. Following
patch uses of parallel_ops genl family for OVS. This also allows
more granual OVS locking using ovs_mutex for protecting OVS data
structures, which gives more concurrencey. E.g multiple genl
operations OVS_PACKET_CMD_EXECUTE can run in parallel, etc.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index d2f9f2e57298..74a5fe6feae3 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -270,7 +270,8 @@ static struct genl_family dp_packet_genl_family = { | |||
270 | .name = OVS_PACKET_FAMILY, | 270 | .name = OVS_PACKET_FAMILY, |
271 | .version = OVS_PACKET_VERSION, | 271 | .version = OVS_PACKET_VERSION, |
272 | .maxattr = OVS_PACKET_ATTR_MAX, | 272 | .maxattr = OVS_PACKET_ATTR_MAX, |
273 | .netnsok = true | 273 | .netnsok = true, |
274 | .parallel_ops = true, | ||
274 | }; | 275 | }; |
275 | 276 | ||
276 | int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb, | 277 | int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb, |
@@ -836,7 +837,8 @@ static struct genl_family dp_flow_genl_family = { | |||
836 | .name = OVS_FLOW_FAMILY, | 837 | .name = OVS_FLOW_FAMILY, |
837 | .version = OVS_FLOW_VERSION, | 838 | .version = OVS_FLOW_VERSION, |
838 | .maxattr = OVS_FLOW_ATTR_MAX, | 839 | .maxattr = OVS_FLOW_ATTR_MAX, |
839 | .netnsok = true | 840 | .netnsok = true, |
841 | .parallel_ops = true, | ||
840 | }; | 842 | }; |
841 | 843 | ||
842 | static struct genl_multicast_group ovs_dp_flow_multicast_group = { | 844 | static struct genl_multicast_group ovs_dp_flow_multicast_group = { |
@@ -1269,7 +1271,8 @@ static struct genl_family dp_datapath_genl_family = { | |||
1269 | .name = OVS_DATAPATH_FAMILY, | 1271 | .name = OVS_DATAPATH_FAMILY, |
1270 | .version = OVS_DATAPATH_VERSION, | 1272 | .version = OVS_DATAPATH_VERSION, |
1271 | .maxattr = OVS_DP_ATTR_MAX, | 1273 | .maxattr = OVS_DP_ATTR_MAX, |
1272 | .netnsok = true | 1274 | .netnsok = true, |
1275 | .parallel_ops = true, | ||
1273 | }; | 1276 | }; |
1274 | 1277 | ||
1275 | static struct genl_multicast_group ovs_dp_datapath_multicast_group = { | 1278 | static struct genl_multicast_group ovs_dp_datapath_multicast_group = { |
@@ -1623,7 +1626,8 @@ static struct genl_family dp_vport_genl_family = { | |||
1623 | .name = OVS_VPORT_FAMILY, | 1626 | .name = OVS_VPORT_FAMILY, |
1624 | .version = OVS_VPORT_VERSION, | 1627 | .version = OVS_VPORT_VERSION, |
1625 | .maxattr = OVS_VPORT_ATTR_MAX, | 1628 | .maxattr = OVS_VPORT_ATTR_MAX, |
1626 | .netnsok = true | 1629 | .netnsok = true, |
1630 | .parallel_ops = true, | ||
1627 | }; | 1631 | }; |
1628 | 1632 | ||
1629 | struct genl_multicast_group ovs_dp_vport_multicast_group = { | 1633 | struct genl_multicast_group ovs_dp_vport_multicast_group = { |