Skip to content

Commit

Permalink
openvswitch: Use parallel_ops genl.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pravin B Shelar authored and David S. Miller committed Apr 25, 2013
1 parent def3117 commit 3a4e0d6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ static struct genl_family dp_packet_genl_family = {
.name = OVS_PACKET_FAMILY,
.version = OVS_PACKET_VERSION,
.maxattr = OVS_PACKET_ATTR_MAX,
.netnsok = true
.netnsok = true,
.parallel_ops = true,
};

int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
Expand Down Expand Up @@ -836,7 +837,8 @@ static struct genl_family dp_flow_genl_family = {
.name = OVS_FLOW_FAMILY,
.version = OVS_FLOW_VERSION,
.maxattr = OVS_FLOW_ATTR_MAX,
.netnsok = true
.netnsok = true,
.parallel_ops = true,
};

static struct genl_multicast_group ovs_dp_flow_multicast_group = {
Expand Down Expand Up @@ -1269,7 +1271,8 @@ static struct genl_family dp_datapath_genl_family = {
.name = OVS_DATAPATH_FAMILY,
.version = OVS_DATAPATH_VERSION,
.maxattr = OVS_DP_ATTR_MAX,
.netnsok = true
.netnsok = true,
.parallel_ops = true,
};

static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
Expand Down Expand Up @@ -1623,7 +1626,8 @@ static struct genl_family dp_vport_genl_family = {
.name = OVS_VPORT_FAMILY,
.version = OVS_VPORT_VERSION,
.maxattr = OVS_VPORT_ATTR_MAX,
.netnsok = true
.netnsok = true,
.parallel_ops = true,
};

struct genl_multicast_group ovs_dp_vport_multicast_group = {
Expand Down

0 comments on commit 3a4e0d6

Please sign in to comment.