]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath: Use parallel_ops genl.
authorPravin B Shelar <pshelar@nicira.com>
Thu, 1 Aug 2013 22:36:06 +0000 (15:36 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Sat, 10 Aug 2013 23:07:52 +0000 (16:07 -0700)
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>
Acked-by: Jesse Gross <jesse@nicira.com>
acinclude.m4
datapath/compat.h
datapath/datapath.c

index 6033bfa381a621405ee665b650fbfdab1fb904cc..73ee5ce30eb5a48a60ce4f6fbd9e829751c84f6a 100644 (file)
@@ -271,6 +271,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_replace4])
   OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_unfold])
 
+  OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [parallel_ops])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [NLA_NUL_STRING])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_get_be16])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be16])
index 4dfd1926df979ad354e287fb1497ab08966951fb..65734ff151bc1424c2a534c47bab3478d3330978 100644 (file)
@@ -61,6 +61,13 @@ static inline void skb_clear_rxhash(struct sk_buff *skb)
 #define SET_NETNSOK    .netnsok = true,
 #endif
 
+#ifdef HAVE_PARALLEL_OPS
+#define SET_PARALLEL_OPS       .parallel_ops = true,
+#else
+#define SET_PARALLEL_OPS
+#endif
+
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
 #ifdef CONFIG_NETFILTER
 static inline u32 skb_get_mark(struct sk_buff *skb)
index 6b7cbc1cbd8165f759369004c9b15975c2fad7da..a6bf70ca9b99e86ede19ebe59dfb2c6aa8a3ff22 100644 (file)
@@ -280,6 +280,7 @@ static struct genl_family dp_packet_genl_family = {
        .version = OVS_PACKET_VERSION,
        .maxattr = OVS_PACKET_ATTR_MAX,
         SET_NETNSOK
+        SET_PARALLEL_OPS
 };
 
 int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
@@ -1010,6 +1011,7 @@ static struct genl_family dp_flow_genl_family = {
        .version = OVS_FLOW_VERSION,
        .maxattr = OVS_FLOW_ATTR_MAX,
         SET_NETNSOK
+        SET_PARALLEL_OPS
 };
 
 static struct genl_multicast_group ovs_dp_flow_multicast_group = {
@@ -1589,6 +1591,7 @@ static struct genl_family dp_datapath_genl_family = {
        .version = OVS_DATAPATH_VERSION,
        .maxattr = OVS_DP_ATTR_MAX,
         SET_NETNSOK
+        SET_PARALLEL_OPS
 };
 
 static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
@@ -1968,6 +1971,7 @@ static struct genl_family dp_vport_genl_family = {
        .version = OVS_VPORT_VERSION,
        .maxattr = OVS_VPORT_ATTR_MAX,
         SET_NETNSOK
+        SET_PARALLEL_OPS
 };
 
 struct genl_multicast_group ovs_dp_vport_multicast_group = {