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>
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/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])
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])
#define SET_NETNSOK .netnsok = true,
#endif
#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)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
#ifdef CONFIG_NETFILTER
static inline u32 skb_get_mark(struct sk_buff *skb)
.version = OVS_PACKET_VERSION,
.maxattr = OVS_PACKET_ATTR_MAX,
SET_NETNSOK
.version = OVS_PACKET_VERSION,
.maxattr = OVS_PACKET_ATTR_MAX,
SET_NETNSOK
};
int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
};
int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
.version = OVS_FLOW_VERSION,
.maxattr = OVS_FLOW_ATTR_MAX,
SET_NETNSOK
.version = OVS_FLOW_VERSION,
.maxattr = OVS_FLOW_ATTR_MAX,
SET_NETNSOK
};
static struct genl_multicast_group ovs_dp_flow_multicast_group = {
};
static struct genl_multicast_group ovs_dp_flow_multicast_group = {
.version = OVS_DATAPATH_VERSION,
.maxattr = OVS_DP_ATTR_MAX,
SET_NETNSOK
.version = OVS_DATAPATH_VERSION,
.maxattr = OVS_DP_ATTR_MAX,
SET_NETNSOK
};
static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
};
static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
.version = OVS_VPORT_VERSION,
.maxattr = OVS_VPORT_ATTR_MAX,
SET_NETNSOK
.version = OVS_VPORT_VERSION,
.maxattr = OVS_VPORT_ATTR_MAX,
SET_NETNSOK
};
struct genl_multicast_group ovs_dp_vport_multicast_group = {
};
struct genl_multicast_group ovs_dp_vport_multicast_group = {