From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C77FC282D7 for ; Mon, 11 Feb 2019 16:10:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3928C20700 for ; Mon, 11 Feb 2019 16:10:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="Xh88oaML" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728822AbfBKQKK (ORCPT ); Mon, 11 Feb 2019 11:10:10 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35511 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbfBKOYz (ORCPT ); Mon, 11 Feb 2019 09:24:55 -0500 Received: by mail-wm1-f65.google.com with SMTP id t200so17520916wmt.0 for ; Mon, 11 Feb 2019 06:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=m5MrzQk7W4OK5ZRdHhKu4Ojz4k2q1oOgLRt1Rx0JPjQ=; b=Xh88oaMLncdFcDjKcODLtwCncmJFoB3x0DPyqkcDcoyJl0rhB9eW3hEmPFs1Kkj5lE mJb67U7WapkO97Qjn0wnN8qQm4VCmAk73iPOG4nucTIN8gn32Mc5O76CWX2Onxxgew/C BkFFlyoNqpjIY4rDS6Qw8pkLeN8Agoi6La9svddxfgtlS7bpWlfCsR7wVOuvVevVDR2M aszmCoJQQIOxw+4Y7d4o4ABZV5/S3rhb3qKSEgxG5ok3Wm6MFhSEuJRh8FQNIsbGJY7M KzL/9i8LOVy+0lGExPwRYJXrRKfbI5/ya048qabKrO71A/20jOjekOqTwRK4IDmYsFub 4esA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=m5MrzQk7W4OK5ZRdHhKu4Ojz4k2q1oOgLRt1Rx0JPjQ=; b=rdOPjcy51j1iabSul2gs3gycfLBGx0S8/SXPfdFbtO4FutJBqsgBhMkLkL9US3mIOV VxoEYk241dXRZkmr1ZNQA01OFE85RpwbT9/9cZNHsASDuEBSZJtFBFXibVGzndLmGw8P I1rnnkloQOP4GBvE4wwI4i0p5HiApdZqFC2PwnXP+sbX3bQ86LmT/T6H9PgOnD6WvRbh q/RuSAOEgdFr4AXH2aiXbHL8FOvPalkWyxZ5+QXLV0w8W9D0+ejLmyjdGVm72cEXhSo2 4ZvepwgFTLO9x/JVKGsZk221+2iKDchXZ27jlWEtP/+7rIbdDZYPutC4UE3AHEBdm7/b i7dQ== X-Gm-Message-State: AHQUAuYGx+7mBTF7jSUnp6pprIKaEW3rWvcDEuVirKd0ZBgKq5rC8mdo TNkkywF4IsfezNPDwcHXqetdIA== X-Google-Smtp-Source: AHgI3IY0sFFyqZOdipS4xUpNTtrFpK1+3rFg8XI/Mbs6H0dZMH0NfxuQgY8iiSMBiMM3yevbkmeM/A== X-Received: by 2002:a1c:f312:: with SMTP id q18mr9115784wmq.106.1549895093852; Mon, 11 Feb 2019 06:24:53 -0800 (PST) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id y25sm6245823wma.6.2019.02.11.06.24.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 06:24:53 -0800 (PST) Date: Mon, 11 Feb 2019 15:15:29 +0100 From: Jiri Pirko To: Vlad Buslov Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net Subject: Re: [PATCH net-next v4 02/17] net: sched: protect chain->explicitly_created with block->lock Message-ID: <20190211141529.GC2314@nanopsycho.orion> References: <20190211085548.7190-1-vladbu@mellanox.com> <20190211085548.7190-3-vladbu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211085548.7190-3-vladbu@mellanox.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Mon, Feb 11, 2019 at 09:55:33AM CET, vladbu@mellanox.com wrote: >In order to remove dependency on rtnl lock, protect >tcf_chain->explicitly_created flag with block->lock. Consolidate code that >checks and resets 'explicitly_created' flag into __tcf_chain_put() to >execute it atomically with rest of code that puts chain reference. > >Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko