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 E5D49C43381 for ; Thu, 21 Mar 2019 14:04:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1FC52183E for ; Thu, 21 Mar 2019 14:04:03 +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="TqfHiHfW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728032AbfCUOEC (ORCPT ); Thu, 21 Mar 2019 10:04:02 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35798 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726787AbfCUOEC (ORCPT ); Thu, 21 Mar 2019 10:04:02 -0400 Received: by mail-wr1-f68.google.com with SMTP id w1so6767471wrp.2 for ; Thu, 21 Mar 2019 07:04:01 -0700 (PDT) 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=UiVY3Wz87UY30yqM/mhujfcRWyYfmsutPd0nARHqWm8=; b=TqfHiHfWkUDak9qLaNOKeSo5JHZK9kZ5xFR1/FiOXCBpYlG+tU96otPD2PLzxNeM8B oW7y2/JYWd0L2ltrF5nP9oembyDBFE4mZMeSDaPWafDmpYpDT4d2YIyD2n2RCC3Wp1/k BYwPKUFgfNHBwHzd0bT2/rdGHukPg2p7upVyYEQHZlgo3S9sk+KkCqwVUVmmn9Nvnjgx u8aTckqTAVgRR8eTiL3rhkX1hljudnePBjr5BG6Bxpw1t6lm+GG7Z+TBuJL96St00csg mm59AjS3jtxGuOfsmNyw8/gYL4n6W5YHbvqeBhYlrxWLn6e3K1DlimFXwdHNGRV5ntEP 4C8Q== 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=UiVY3Wz87UY30yqM/mhujfcRWyYfmsutPd0nARHqWm8=; b=ixWW2y0kpSe9StkJILXFAWtVDhnK7RW8QHDj8JYsmKGIG5hRncBo8HtuABzHJmFlHK VzhKJk0gJ3doO3sfGALOhKAMgCKbyidw785zKtPOjUqdTDmcHV6SoHcwFT0QrZWHwxIk NTRzh4g83h3XfSJw2DZw2hp74YpvH9mcpoo0CmIIbhMBnnXxRLEnQDJEh9CDX9lYLDXN qn0wjnqE/qsK3mwEsNjX1a/ZQTx4LZtG3lPm3BlBOoHQhTmQ/xuPdZ6qf0bv+xnoRPHu SFkfq7SzTVzYF2/hNhsOHgAGeyYaTekd5WHcPccEd1MqRVrAWncsgQCRvJmrC+BPK6KA 6lrg== X-Gm-Message-State: APjAAAXlkYJNlwsEWGQIa5OR2SXGYQG/UBbPUYeNPXbIN9j9X2XomxJK +6kZoPpXv7bxig8yUOmnKJAzD1E/ObQ= X-Google-Smtp-Source: APXvYqzh/ssbd2tA9OEhmpyMnUsLSVXw6ym5lkFFPb4PvTSfgonW/TRxrlYhv6zLj7W2eG0axhhegw== X-Received: by 2002:adf:dc8e:: with SMTP id r14mr2801357wrj.118.1553177040599; Thu, 21 Mar 2019 07:04:00 -0700 (PDT) Received: from localhost ([195.39.71.253]) by smtp.gmail.com with ESMTPSA id b4sm4495944wmj.3.2019.03.21.07.03.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 07:04:00 -0700 (PDT) Date: Thu, 21 Mar 2019 14:53:20 +0100 From: Jiri Pirko To: Vlad Buslov Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net, sbrivio@redhat.com Subject: Re: [PATCH net-next v3 02/12] net: sched: flower: refactor fl_change Message-ID: <20190321135320.GJ2087@nanopsycho> References: <20190321131744.19224-1-vladbu@mellanox.com> <20190321131744.19224-3-vladbu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190321131744.19224-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 Thu, Mar 21, 2019 at 02:17:34PM CET, vladbu@mellanox.com wrote: >As a preparation for using classifier spinlock instead of relying on >external rtnl lock, rearrange code in fl_change. The goal is to group the >code which changes classifier state in single block in order to allow >following commits in this set to protect it from parallel modification with >tp->lock. Data structures that require tp->lock protection are mask >hashtable and filters list, and classifier handle_idr. > >fl_hw_replace_filter() is a sleeping function and cannot be called while >holding a spinlock. In order to execute all sequence of changes to shared >classifier data structures atomically, call fl_hw_replace_filter() before >modifying them. > >Signed-off-by: Vlad Buslov >Reviewed-by: Stefano Brivio Acked-by: Jiri Pirko