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 0CE53C282CB for ; Tue, 5 Feb 2019 13:16:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEB40206DD for ; Tue, 5 Feb 2019 13:16:23 +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="Ai+cRL8Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729304AbfBENQW (ORCPT ); Tue, 5 Feb 2019 08:16:22 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55462 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbfBENQW (ORCPT ); Tue, 5 Feb 2019 08:16:22 -0500 Received: by mail-wm1-f67.google.com with SMTP id y139so3552400wmc.5 for ; Tue, 05 Feb 2019 05:16:21 -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=GvA04a2+oEtvFifF7Rri5M9bD0QR/vOcmofU8gfRPe8=; b=Ai+cRL8QCgR5zSjzxGvR7pgtQOlK7Su7vVeBJo91ZymDqdhlJMF7d6/X6NlpXiPUua wcE6FiGWC8YO9knD2w2wwsdZMJBjHjXLMDXodNFxsl8qJYZTN4hXm1K6AnTsAKkP8QOV COOYc7t59T39jYfB68sVlio1LoS1NRI0CtMzcWJ0m0AErANC3/EVUDE++cWYudFkd+GM Q01kivmQS9448YD+qzHoRkwl/AtPrFAIYer07NeRuYmcM+DUgUKE11Wb839Ezrj9B2WG MMLTF6BKS/DG4c6veZJs8qGr+2lqe/EKA3ZD7g3G3q/vMhJH1dNPz+Qro8q+4+9LvtCc xxoA== 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=GvA04a2+oEtvFifF7Rri5M9bD0QR/vOcmofU8gfRPe8=; b=XvpuYocKJ5H3OnAK9ujPxVC2L+qW6uoxDqc3S0xcvZwSX7MIHS5l/0KySPQbn0suM0 3jVwE7TolpVb3y1FT99HTsCxawa15hCYjj7gnxgq8d7j+zcIZF8dGLUBw1imt98A+Rh6 DExaCZF/tQVnR/IVa7HTlegDxODyfpXiGo3bO2xIpv8VkUKTVXW/T49Vx9Fzw+NK0y4j O/8Rl5dNwRivimBckPw75Ifsk2ibHCxGfZS288Ez80H8eh07z7QJmOHdKY7NvaCV679X GqnMXQb5YHfjXqJiUJ+nPffSH9d9pbOoUA6I5YNdj8d4iJ2CZMPvdwrzXZMjkk5n87Ea FFxA== X-Gm-Message-State: AHQUAubzRmOvZNnm5f6ZY4sbKkHMaVENGGkrubXHXNZyhS1U785bu3Da QgQPrY++GqVYRU22HbzKzHSAXA== X-Google-Smtp-Source: AHgI3IbFdAw6eL+d6PciHe6pi/SehnhUWq0R+5X9zvDCg/u835mIDUT6JsZ9fvzlPh0tJT1lDil5lQ== X-Received: by 2002:a7b:c218:: with SMTP id x24mr3779614wmi.58.1549372580270; Tue, 05 Feb 2019 05:16:20 -0800 (PST) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id f137sm11514758wmg.29.2019.02.05.05.16.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Feb 2019 05:16:18 -0800 (PST) Date: Tue, 5 Feb 2019 14:07:09 +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 08/16] net: sched: traverse classifiers in chain with tcf_get_next_proto() Message-ID: <20190205130709.GE2133@nanopsycho> References: <20190204123301.4223-1-vladbu@mellanox.com> <20190204123301.4223-9-vladbu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204123301.4223-9-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:32:53PM CET, vladbu@mellanox.com wrote: >All users of chain->filters_chain rely on rtnl lock and assume that no new >classifier instances are added when traversing the list. Use >tcf_get_next_proto() to traverse filters list without relying on rtnl >mutex. This function iterates over classifiers by taking reference to >current iterator classifier only and doesn't assume external >synchronization of filters list. > >Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko