Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4429380imm; Mon, 14 May 2018 07:28:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqS6nCzMaRO/6QyJb+MDXGJgaLQd+ct1VRqH6lDKrZ/H12z7abFgXTHRAdhjtk6qByp0jci X-Received: by 2002:a17:902:8307:: with SMTP id bd7-v6mr10084413plb.234.1526308090692; Mon, 14 May 2018 07:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526308090; cv=none; d=google.com; s=arc-20160816; b=p9lZ+/GebbPC4IvejDS0RMB1IUSTMGCvvH64hFsHvblzRt+PYUz0inYgEepgec1gc5 UuZJafz9CDEW8QWiwv68Osof+IHIiJwxbht9wZ9Q5v8MLHmOQgb9BOa7sYmJGwGj1Qj/ E83uxLmuAAUhscH1gfj0W0deLUCAycqb6bFAcyJDJD+IVB3wUr75WU+pQnUe6yWsnrnp u6lQPTWCLTCX9CdYZJBxA2/+laemqX+qBtxC2PB9dXR/cPmflHHJwPdJ0E1BFnmGihhM ckdUAt1nEk860Fj5kFvkftUkwpC2g+BfVVAcLvO8zz9LophQD/p/GuGRIYa434LKlvVJ +tKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=30n3tOIPiMwOhrxSCFmn993fM2VH/ZWKl4M/IGbSloI=; b=rDHEZhLBbm1vhi8RhfCIl9IVQHpKXyil24/srRXsqKRq3n5tcv8mW43g5T78cq6hK7 YYPj6uBC4c7qX7bBOpZWNJ7G0o2pwADlKt6onOtg5XKPlMDj2HnUHztOV+DLAafxH3wP tk5Fgxk0GCxqnWWCwn0rDED4oGQRoV4Dc7461wUQgXgHVKUX3VgBxwzfOwDjbGQt7wd6 Kj285nuvHQdDz4tG9Mm2naMu7iX47RZxAr4Auw/tPhAdSPxPAUgS80kFZV3vQ2jqRRja 2uIEMP2KDx+C6ugEWswkbzfwicrj4QxZzbBNOfZFIVqb0jGXNHFv/uD167aEUM3Cyngk YrUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si2958553pgo.590.2018.05.14.07.27.55; Mon, 14 May 2018 07:28:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753942AbeENO1h (ORCPT + 99 others); Mon, 14 May 2018 10:27:37 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:34963 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753476AbeENO1g (ORCPT ); Mon, 14 May 2018 10:27:36 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from vladbu@mellanox.com) with ESMTPS (AES256-SHA encrypted); 14 May 2018 17:29:22 +0300 Received: from reg-r-vrt-018-180.mtr.labs.mlnx (reg-r-vrt-018-180.mtr.labs.mlnx [10.213.18.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w4EERXLS002750; Mon, 14 May 2018 17:27:33 +0300 From: Vlad Buslov To: netdev@vger.kernel.org Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, ast@kernel.org, daniel@iogearbox.net, edumazet@google.com, vladbu@mellanox.com, keescook@chromium.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, kliteyn@mellanox.com Subject: [PATCH 00/14] Modify action API for implementing lockless actions Date: Mon, 14 May 2018 17:27:01 +0300 Message-Id: <1526308035-12484-1-git-send-email-vladbu@mellanox.com> X-Mailer: git-send-email 2.7.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a first step to remove rtnl lock dependency from TC rules update path. It updates act API to use atomic operations, rcu and spinlocks for fine-grained locking. It also extend API with functions that are needed to update existing actions for parallel execution. Outline of changes: - Change tc action to use atomic reference and bind counters, rcu mechanism for cookie update. - Extend action ops API with 'delete' function and 'unlocked' flag. - Change action API to work with actions in lockless manner based on primitives implemented in previous patches. - Extend action API with new functions necessary to implement unlocked actions. Vlad Buslov (14): net: sched: use rcu for action cookie update net: sched: change type of reference and bind counters net: sched: add 'delete' function to action ops net: sched: implement unlocked action init API net: sched: always take reference to action net: sched: implement reference counted action release net: sched: use reference counting action init net: sched: account for temporary action reference net: sched: don't release reference on action overwrite net: sched: extend act API for lockless actions net: core: add new/replace rate estimator lock parameter net: sched: retry action check-insert on concurrent modification net: sched: use unique idr insert function in unlocked actions net: sched: implement delete for all actions include/net/act_api.h | 16 ++- include/net/gen_stats.h | 2 + include/net/pkt_cls.h | 1 + net/core/gen_estimator.c | 58 ++++++--- net/netfilter/xt_RATEEST.c | 2 +- net/sched/act_api.c | 298 ++++++++++++++++++++++++++++++++------------- net/sched/act_bpf.c | 33 +++-- net/sched/act_connmark.c | 29 +++-- net/sched/act_csum.c | 33 +++-- net/sched/act_gact.c | 30 +++-- net/sched/act_ife.c | 37 ++++-- net/sched/act_ipt.c | 41 +++++-- net/sched/act_mirred.c | 32 +++-- net/sched/act_nat.c | 29 +++-- net/sched/act_pedit.c | 30 +++-- net/sched/act_police.c | 35 ++++-- net/sched/act_sample.c | 33 +++-- net/sched/act_simple.c | 31 +++-- net/sched/act_skbedit.c | 30 +++-- net/sched/act_skbmod.c | 33 +++-- net/sched/act_tunnel_key.c | 34 ++++-- net/sched/act_vlan.c | 34 ++++-- net/sched/cls_api.c | 6 +- net/sched/sch_api.c | 2 + net/sched/sch_cbq.c | 4 +- net/sched/sch_drr.c | 4 +- net/sched/sch_hfsc.c | 4 +- net/sched/sch_htb.c | 4 +- net/sched/sch_qfq.c | 4 +- 29 files changed, 673 insertions(+), 256 deletions(-) -- 2.7.5