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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 7733CC4338F for ; Sat, 21 Aug 2021 00:22:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5527261154 for ; Sat, 21 Aug 2021 00:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240840AbhHUAW5 (ORCPT ); Fri, 20 Aug 2021 20:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237700AbhHUAW4 (ORCPT ); Fri, 20 Aug 2021 20:22:56 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7453C061575 for ; Fri, 20 Aug 2021 17:22:17 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id gr13so23403427ejb.6 for ; Fri, 20 Aug 2021 17:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YAwt/5leZYbtMKTft3op5FVjvzIy22S+SPOXQpZ7thE=; b=NS4RQIIJchpv+cnqa/Xmnq0t/UJj73uV1XClrHNvwiLTiWnoj6zADUczt/5CA618zg iMbq8NCPw3LqpelLsbXhOxp7M6P9H7wKLgRmM2vH04jHxkAPWYtXHCRBVFy7YttrY/u5 Wp5BJjHhvKQaeFqYITQUuZHZWsLI4UhdxqT3VH86vnTzGz1lrt8co0EnC9WC46IoV0P9 7s8oZf3Ef4Rp6R4G6KJLTZNtjaxfB/6zZlopquW/oB+qa69sKVfx6aAC6oH1YRlQI7Gl BDYbG0GKov0W2Wrb/R03wIf1soeWVBfwPMuqeZDYpJekpNxAPHIohyp7irVrQNNWc8Vy 9xPw== 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; bh=YAwt/5leZYbtMKTft3op5FVjvzIy22S+SPOXQpZ7thE=; b=FNm9tTNylru97bBRD/mkd/Tx/JdMrK0wDObyKRwMzI1z/knBfbhsa7bJitUkP3FLty NQ695e4DFE2oyJdi6sEy8ZpunJCcy0X6IDk0Z0icOs0r5W81OJ0bd+hQr88Q3vrZHWjd 4nZl5dDw2tVerhOTbwVZFOQGZXa5xICBBnr3s6GFYjWwykjgvxc93cxQFfoXSvX6vWMn Ycv2vZY8bgEJcf/HelWPkIr2HSeaA7/cWZY2ln83qfAEypQGXv7LV8mhxdvcKKC/YgoT dPkH96VXWibzA5wmwLe+nD7zLxeSgReUcSzCWJQunLIdAJVlk/N9IQ85AL26/rqsGriQ osgA== X-Gm-Message-State: AOAM5338kr0hohGx+CDYeB0ENpeFL1uYbYnWkk7evA0WeW+hdtS6lLhX AKuK320luWAT4k/XSDgN3Ts= X-Google-Smtp-Source: ABdhPJzX2de4dtyJGYulm9ew63z23lUV99edTljCQ2JEFzVgbfvsRVEU5z6FBU/Sq4dRtIw9Um0gew== X-Received: by 2002:a17:906:2414:: with SMTP id z20mr23597785eja.363.1629505336370; Fri, 20 Aug 2021 17:22:16 -0700 (PDT) Received: from skbuf ([188.25.144.60]) by smtp.gmail.com with ESMTPSA id p5sm3487763ejl.73.2021.08.20.17.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 17:22:15 -0700 (PDT) Date: Sat, 21 Aug 2021 03:22:12 +0300 From: Vladimir Oltean To: Nikolay Aleksandrov Cc: Ido Schimmel , Vladimir Oltean , netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Roopa Prabhu , Andrew Lunn , Florian Fainelli , Vivien Didelot , Vadym Kochan , Taras Chornyi , Jiri Pirko , Ido Schimmel , UNGLinuxDriver@microchip.com, Grygorii Strashko , Marek Behun , DENG Qingfang , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , Sean Wang , Landen Chao , Claudiu Manoil , Alexandre Belloni , George McCollister , Ioana Ciornei , Saeed Mahameed , Leon Romanovsky , Lars Povlsen , Steen Hegelund , Julian Wiedmann , Karsten Graul , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Ivan Vecera , Vlad Buslov , Jianbo Liu , Mark Bloch , Roi Dayan , Tobias Waldekranz , Vignesh Raghavendra , Jesse Brandeburg Subject: Re: [PATCH v2 net-next 0/5] Make SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE blocking Message-ID: <20210821002212.ebi7cdugxdk5os7m@skbuf> References: <20210819160723.2186424-1-vladimir.oltean@nxp.com> <20210820093723.qdvnvdqjda3m52v6@skbuf> <20210820170639.rvzlh4b6agvrkv2w@skbuf> <65f3529f-06a3-b782-7436-83e167753609@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65f3529f-06a3-b782-7436-83e167753609@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Aug 21, 2021 at 02:36:26AM +0300, Nikolay Aleksandrov wrote: > Hi, > I don't like the double-queuing for each fdb for everyone either, it's forcing them > to rework it asap due to inefficiency even though that shouldn't be necessary. Let's be honest, with the vast majority of drivers having absurdities such as the "if (!fdb_info->added_by_user || fdb_info->is_local) => nothing to do here, bye" check placed _inside_ the actual work item (and therefore scheduling for nothing for entries dynamically learned by the bridge), it's hard to believe that driver authors cared too much about inefficiency when mindlessly copy-pasting that snippet from mlxsw [ which for the record does call mlxsw_sp_span_respin for dynamically learned FDB entries, so that driver doesn't schedule for nothing like the rest - although maybe even mlxsw could call mlxsw_sp_port_dev_lower_find_rcu instead of mlxsw_sp_port_dev_lower_find, and could save a queue_work for FDB entries on foreign && non-VXLAN ports. Who knows?! ] Now I get to care for them. But I can see how a partial conversion could leave things in an even more absurd position. I don't want to contribute to the absurdity. > In the > long run I hope everyone would migrate to such scheme, but perhaps we can do it gradually. > For most drivers this is introducing more work (as in processing) rather than helping > them right now, give them the option to convert to it on their own accord or bite > the bullet and convert everyone so the change won't affect them, it holds rtnl, it is blocking > I don't see why not convert everyone to just execute their otherwise queued work. > I'm sure driver maintainers would appreciate such help and would test and review it. You're > halfway there already.. Agree, this needs more work. Thanks for looking.