From patchwork Tue Apr 23 17:48:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pravin B Shelar X-Patchwork-Id: 238972 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2C6D72C011C for ; Wed, 24 Apr 2013 03:48:59 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756660Ab3DWRs4 (ORCPT ); Tue, 23 Apr 2013 13:48:56 -0400 Received: from na3sys009aog126.obsmtp.com ([74.125.149.155]:46499 "HELO na3sys009aog126.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756381Ab3DWRsz (ORCPT ); Tue, 23 Apr 2013 13:48:55 -0400 Received: from mail-pa0-f69.google.com ([209.85.220.69]) (using TLSv1) by na3sys009aob126.postini.com ([74.125.148.12]) with SMTP ID DSNKUXbJhEG/BxNC2tnNabFPRLW3D7pXqxGX@postini.com; Tue, 23 Apr 2013 10:48:55 PDT Received: by mail-pa0-f69.google.com with SMTP id kl13so855205pab.8 for ; Tue, 23 Apr 2013 10:48:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=CVqqKxkvST3oya5e+5+1E1WslKu4Ll2bC0REzb1o7bs=; b=KSz7/NdNLHF3WaIW+2z52qemS99cVUCBHHhRgvGs5GPX8JJSaLgROErQQpB0z3emg3 Osiom2tcb/NcD11QnFrbFtKYOCNH+XXGYfOtO3XvOvL3N5QDCK6nLquoCmBTxavbJ6sk Tnz8k4D+ZLXdwVQS/+bpZmb+kwDvYvmwmgyXmy2Fv/XeJFflu9NxJh32m2ZMEyeBtQXq NjLVa1bUQF3kC6Z/Ixl/XDs7SE95RPyJTeQwuya13iFlRFMNyLUGvXRPv36qVAyEZdWW hLCxer/BjlouolbsjoBMXSk7Y6udZw6hcYkpoM93QLSyzDMJLmw9cJY06auEFxjbjeao FNYQ== X-Received: by 10.66.150.35 with SMTP id uf3mr14864857pab.34.1366739332888; Tue, 23 Apr 2013 10:48:52 -0700 (PDT) X-Received: by 10.66.150.35 with SMTP id uf3mr14864847pab.34.1366739332805; Tue, 23 Apr 2013 10:48:52 -0700 (PDT) Received: from localhost ([75.98.92.113]) by mx.google.com with ESMTPS id lo7sm32661147pab.19.2013.04.23.10.48.51 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 23 Apr 2013 10:48:52 -0700 (PDT) From: Pravin B Shelar To: netdev@vger.kernel.org Cc: dev@openvswitch.org, jesse@nicira.com, Pravin B Shelar Subject: [PATCH net-next v3 2/2] openvswitch: Use parallel_ops genl. Date: Tue, 23 Apr 2013 10:48:48 -0700 Message-Id: <1366739328-18224-1-git-send-email-pshelar@nicira.com> X-Mailer: git-send-email 1.8.2.135.g7b592fa X-Gm-Message-State: ALoCoQloFXbnjQy3QJy7F5mMOBCjnhgxRZ5aXKXl38ZByaFYbLoj+SMFS1UK4ZSMF3UMYYTNeHCVMA3A7s7pMH8d2JiQBy655ELiSL/h2/P6n/e6O07R1+kVOhD11DPgsuQURFFUnLw9V+AYw6h27BegOIuRhe9Zak4VLTqZ7fzLV2EbLAG8+zQ= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- v2-v3: - No change. v1-v2: - Updated commit msg according comment From Jesse. --- 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 d2f9f2e..74a5fe6 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -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, @@ -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 = { @@ -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 = { @@ -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 = {