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,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 87E43C282CB for ; Tue, 5 Feb 2019 13:40:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 534742175B for ; Tue, 5 Feb 2019 13:40:32 +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="uO0ev6wK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729456AbfBENkb (ORCPT ); Tue, 5 Feb 2019 08:40:31 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:39394 "EHLO mail-wr1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbfBENkb (ORCPT ); Tue, 5 Feb 2019 08:40:31 -0500 Received: by mail-wr1-f50.google.com with SMTP id t27so3647241wra.6 for ; Tue, 05 Feb 2019 05:40:29 -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=WiuaP10UZ4MexAtEjoAjT0iRabFVGH9Bn5OvfdAi7oY=; b=uO0ev6wKAy5ptTqMOaOuPaqWZ96czn4M9XcysTjFKPFWDKMqUeRT85Butiz4SRjEUY aojgd3ayAYR/30g1G6oY9P8ZLBbBtamui9soXtgfM06xjaGnEk0nYuITVxFSk0t6jeVx H23MJIqAUGLJh73Cp04So+F/lDlLInyjbNhHiU776YB0XpB6uQya2Ki+mqGM/AYrgyvE la0oz6SGW1Rq8m4KbvnCyanG09T46ESs+oAkcLBgPQpb6/FZWwuAL0fKyp5Zlx0/FqmD iZl+nPtzg4GLgK3xqjKhdzsRhiAl922JkXdVLYmmXle7XimLDj5YHo8STfKx37817d72 ymfA== 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=WiuaP10UZ4MexAtEjoAjT0iRabFVGH9Bn5OvfdAi7oY=; b=gWaoII2BoAGssKjrv4gZzLWQU5ZW88CuIVlLGRg4RuCbk+bDzAlRzL6yS7Lz2Y82Pt XbzMRaloINw6PU6BdbAk4HVJ236ya79dhxH6RXy3fARyP7agUtHjj/N8ZkRXeB7EVr4R mrcUhnZMzr/Yu5Dr8cntRfUCPw27zgRRKz0/7G6Ahzwf0Im7MTMyTVD9Swe+kxxGBKAr 1krqtOjVojHI/pHKsTI2KP8qQFZRL7UI2MrCRUf9gz7ephS5iZ9lR6kkslOVMR/mwiQ0 JVFQjEDc0a9AH88xcxGrnbmM5u4Fu7Ntfj1rpGmgiWL8KlPjpnWG8IsKCEBgsJ43KD5Y qJXw== X-Gm-Message-State: AHQUAuaB5R98/7+Zm4fbUsbCLJxYx+63AV2bfWXmH/seLvUN51LWyozX pht/F5hYADSPMX6fBcyvnuFw1g== X-Google-Smtp-Source: AHgI3IZ/aEXDNRyCqN+I1IVHCtvxvhfI61UX9BjLYh7EUcYXatTYqPpBRcMjv45jW8S1LYPFG+gLww== X-Received: by 2002:a05:6000:104b:: with SMTP id c11mr3752395wrx.303.1549374029253; Tue, 05 Feb 2019 05:40:29 -0800 (PST) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id y145sm12101071wmd.30.2019.02.05.05.40.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Feb 2019 05:40:28 -0800 (PST) Date: Tue, 5 Feb 2019 14:31:19 +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 v3 16/16] net: sched: unlock rules update API Message-ID: <20190205133119.GN2133@nanopsycho> References: <20190204123301.4223-1-vladbu@mellanox.com> <20190204123301.4223-17-vladbu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204123301.4223-17-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 04, 2019 at 01:33:01PM CET, vladbu@mellanox.com wrote: >Register netlink protocol handlers for message types RTM_NEWTFILTER, >RTM_DELTFILTER, RTM_GETTFILTER as unlocked. Set rtnl_held variable that >tracks rtnl mutex state to be false by default. > >Introduce tcf_proto_is_unlocked() helper that is used to check >tcf_proto_ops->flag to determine if ops can be called without taking rtnl >lock. Manually lookup Qdisc, class and block in rule update handlers. >Verify that both Qdisc ops and proto ops are unlocked before using any of >their callbacks, and obtain rtnl lock otherwise. > >Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko