Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1986167pxu; Sun, 13 Dec 2020 09:40:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmqkOaJ5pOD6pG8cf9KVCctoej9+SUcu2sFWYPQ+285rNOt6G3qTF1qcXky5ogSautJ+Rw X-Received: by 2002:a17:906:7f10:: with SMTP id d16mr19378903ejr.104.1607881256602; Sun, 13 Dec 2020 09:40:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607881256; cv=none; d=google.com; s=arc-20160816; b=lQKS7WndWYP0kKV7Nu2laAAdiUacP6LNpGUzO1xiJjoXkBpvV2WEMKTZWSg0WTMD4W X3qDo1XOGGfgwd3Pe/6rApTHKtKS6B2vg1Gnk7x52bzecIkQtzmZtJ13HaDjbM31s24D Sh6UJEG83qZl57GE2RkmnGmseTHaPEHEuXH0oC12nmk5/9h/6Achu1xKiB1LyOnvx0JR D90qErPtLvErrqUKB/0bsopco/wAYxaF2tuBBUVtTUCGz0xglXSOX1RVrbc0A2FOxgjD y2ydDqelGVvhmcXdJuEowXiPYKqIx3IkTQzyiouroKCH2FK/f7XpxIQGzg+RvJ45a2EM C6IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=aLMv7bv//grEdHcZE3Ga0rjuWlHjH5Gf0eUa19zRJrQ=; b=PLwt5yfqiVV/hxBX8+f/4LQ5PSZ0+SnFK//DEgRpqaHALDU7m30QKxUxv7mZmOUMoW o+Z4T1DQUeG1+RtZnP7DGQQPGy1ptpiS+cf5w6Hfg9jy8dlVge7JwjZ6bma2U/NpWPIG i7JFvte5Ep7mbW5VKP816Usb1EfoZeO6GdRhZL4oRU4pREA9xsXSL+sdkRGGgusT/BO2 H5d4WtNB51dG2EzBF7DFZxhw3TR5qnp2dzq/fwT3+x67LolDVvdwDEpkADYvD66qopYr yOLJUkgFlz/76Eadwv5GfDKyY6BqPFhz2V8IdiPsrIzXlhA4G/LR5AU3Ly++33yES4Q8 w01A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sA271PWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb5si7779717ejc.585.2020.12.13.09.40.33; Sun, 13 Dec 2020 09:40:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sA271PWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392168AbgLMDnz (ORCPT + 99 others); Sat, 12 Dec 2020 22:43:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbgLMDnz (ORCPT ); Sat, 12 Dec 2020 22:43:55 -0500 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D83C0613CF; Sat, 12 Dec 2020 19:43:14 -0800 (PST) Received: by mail-oi1-x244.google.com with SMTP id q25so15090073oij.10; Sat, 12 Dec 2020 19:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aLMv7bv//grEdHcZE3Ga0rjuWlHjH5Gf0eUa19zRJrQ=; b=sA271PWlMNitfIcgRi1Rvcy+v+0cABEo3Du/WflzKU/dTtae3WDiwSk0qaSwmCPEvb qbLHCzQtRY4zP+A34qnL+yyxD6dwK0mT/7EHOOvyCrsvGu2GzMageMe68FA+r7qfkGG3 FZqX24Gh5FRbda9BOPJpSUExXPURHVEY2PZwy+RUn7na7BgKA+RcKf10S6+FtqnI2inX +079tFPY5xaemXlaY89MVgkBaJ1A5ma2afSgCOwH61a2E6CKe1FbYc96GeGWWeIvdofM 4T8dpVJqXwd6snwzb9L2ScFaljBRicUt6yQRFAPWUIzAlLZ/5gjvr1tH09TyALZAn2yp Zrcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aLMv7bv//grEdHcZE3Ga0rjuWlHjH5Gf0eUa19zRJrQ=; b=KAPtw/xBUDm36yO67Yu5Bwri3a/VeRMu3JuC0TWEUVRTDKFJxqiDSQcYJWteflbNOy l1FIz8U5MCefUrf7fGk6UO1w6yHMdvHk3xkzFNiNSPmcOGg/5ztWfLKAsEL6aeDw/LTN K6m2oRgx+Ba5m7KXdEH5vwxraHTZohJk5XMuv1r0jnQsrGKnKjG262mpQrlfHFWr8Gng QB46CdI8kZvZPIoxU+mkPPANOeI5zNam6q4xET21X2VX1bcJrQQ00cGZlWdPXyx427PH 0RmQ683ngfy16xgWca/4oX5/COOxNMpY3FMG03BRw/SL8qK7+9Inw/rYJlTSujVMz/0k oaJw== X-Gm-Message-State: AOAM5339N4OtsiULRPT3imyff4hdsiIq5NINmGGScW42RpPm8TB+bXjh x1SrEvFwQwNRVfuMkruoeyw= X-Received: by 2002:aca:2418:: with SMTP id n24mr13792346oic.62.1607830994270; Sat, 12 Dec 2020 19:43:14 -0800 (PST) Received: from ?IPv6:2600:1700:dfe0:49f0:5c21:b591:3efd:575e? ([2600:1700:dfe0:49f0:5c21:b591:3efd:575e]) by smtp.gmail.com with ESMTPSA id s26sm3160664otd.8.2020.12.12.19.43.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Dec 2020 19:43:13 -0800 (PST) Subject: Re: [PATCH v2 net-next 2/6] net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work To: Vladimir Oltean , Andrew Lunn , Vivien Didelot , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" Cc: DENG Qingfang , Tobias Waldekranz , Marek Behun , Russell King - ARM Linux admin , Alexandra Winter , Jiri Pirko , Ido Schimmel , Claudiu Manoil References: <20201213024018.772586-1-vladimir.oltean@nxp.com> <20201213024018.772586-3-vladimir.oltean@nxp.com> From: Florian Fainelli Message-ID: <6ee91a90-9c27-9001-66af-9bf16081f3b5@gmail.com> Date: Sat, 12 Dec 2020 19:43:10 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20201213024018.772586-3-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2020 6:40 PM, Vladimir Oltean wrote: > Currently DSA doesn't add FDB entries on the CPU port, because it only > does so through switchdev, which is associated with a net_device, and > there are none of those for the CPU port. > > But actually FDB addresses on the CPU port have some use cases of their > own, if the switchdev operations are initiated from within the DSA > layer. There is just one problem with the existing code: it passes a > structure in dsa_switchdev_event_work which was retrieved directly from > switchdev, so it contains a net_device. We need to generalize the > contents to something that covers the CPU port as well: the "ds, port" > tuple is fine for that. > > Note that the new procedure for notifying the successful FDB offload is > inspired from the rocker model. > > Also, nothing was being done if added_by_user was false. Let's check for > that a lot earlier, and don't actually bother to schedule the worker > for nothing. > > Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian