Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5819378ioo; Wed, 1 Jun 2022 13:16:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBQvzK37cRDgM6ghXV1KucBYAJIxJBoh0Cy/Vtqqd+/VJrHcyJTMu/TF/YWF6M+4kvOXD5 X-Received: by 2002:a17:902:b58f:b0:15e:b2f4:b75 with SMTP id a15-20020a170902b58f00b0015eb2f40b75mr1169042pls.25.1654114585141; Wed, 01 Jun 2022 13:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654114585; cv=none; d=google.com; s=arc-20160816; b=eo3EeByJ1TikM99AlSqe3mNs5jZ3iuedHuRT97heH7MDWSkDX6vIORHph9+rcA7tR4 KMRfEv3AUEh9xFXLAZBCYYqJrrPOw+o9c6EIUqBmigElI0P9qXgq8Sy4Nizu9acBgZSx 24MxY/mzMlMbb+Uu99UYfywXyFOkS7wP9wBmLCl4wJAxRGL+ccc2isx1rNBywvp5dOf8 o3qy69RBgOOKj1QUC62DjTKJNBeyBGJNd+626MBYrPqrei1vRPQUpzvBwOA6ExzJUtR2 M8wAA/QetMIvI2H13vV/3TiHetTkJGxc75uBMZwXMgUC2XACFaahUTKxClqMkZzv1zxG K+Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=A44GayFxXseGVVD0HVJY3qkIMetyjm2M3KFYhOBPZao=; b=HFdoUaMNVenPU6PrQQZ9NZogOReC93PfoPjgNXE50E+2Er2Klnshsp8aqOtjVkQ60X d1pNRB2FIvJG4v+Y+y2UjJZCMNQbf6Tgz/l6KdM3NMwFHCJe1+YatADokpq4wp6Q/1eY v2bQ+6CS1zFpYICgAKqEKopMWzB9OyfZr1rzr6KFO+Rg4sktL5iarVd/It4hlubus6hc qpXQf8QLEFdeq449jU1OtW4Dr152zJR0vOShCLx6Yc/KjpX6hev7S9Ra6/CttZQ9MnlX AS7o/UQaKxm3lULPEEQvSjyCW8ojJGa9omEjMbin3LZ7dZbvv2pb5aUNnavRHJ1AQLIP AXuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lc2SkHq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t18-20020a17090ad15200b001e3361d308esi2928662pjw.154.2022.06.01.13.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:16:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lc2SkHq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 234AD19597B; Wed, 1 Jun 2022 12:30:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345882AbiEaPto (ORCPT + 99 others); Tue, 31 May 2022 11:49:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345784AbiEaPtn (ORCPT ); Tue, 31 May 2022 11:49:43 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A16E3055A; Tue, 31 May 2022 08:49:41 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id a23so15122078ljd.9; Tue, 31 May 2022 08:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=A44GayFxXseGVVD0HVJY3qkIMetyjm2M3KFYhOBPZao=; b=Lc2SkHq0n+vROccbAbpL/H+0Dgf53+UBnImyq5CgM9VVRWDpx10kq2qoKeRy5CiiNv FpYqx7RLrPfzOXP1dLFMNnKOMJjfs0j3CllR2+GJRAa+xeBU5+JbMkHbXZorezgexw5d HGgZ4udmYbVkujDnMOIolsGQ7yZ9Um0MhApXuj0MmHNdk/aseo7VgnbONDaDGCgKVE3c FuTyGFUkXda1QvJT4RQyWKfbQAi8S/iBAKCnvKjFKVSRdK55tF/42d80eLGIxnVHMeV9 i67I3EIzPReqjqpeR0xbzcuj79b5DdwnddziDXHyUbsQumSonS/xMlSxLAb4ToZY3hR+ QdzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=A44GayFxXseGVVD0HVJY3qkIMetyjm2M3KFYhOBPZao=; b=t4Ead4NSPuX1/HrbMeDCne6KnyP8cpdd33kTfZfanLUzISYgtq3SIvgyJWKjvZ5P0v Kkss2wuxMUqGkudW4OFlWYjKyhLKL1HWBzeMBUVI7+betapHrI3+sMHAA1aakFQa/C3h QYK8Y8mggHwOfOomk4jBt7Z/SqvtrdvOwZOmugdx+Y0alH9Jm7mKspQbeG7YelARQ6S7 gPbhmPRPotqWafAPZPaFZXCvJQMWxIEyGvIF1YP+Zb35/PwApFw1PVoblTHSS4Dm9Zs0 etKA8SC9QgVBymaNX1s7be1LmSEPiRxLkJZJIoyBjQPeVufqueaE8QHy4+uW7ZP0fKF0 oS/g== X-Gm-Message-State: AOAM532xhJctZoN/bvQNXsYpneGWEqpnfYCfNqdJUNxEVEimPMWef+ZN C1+FhF18JP0yXosn/y6E/W5cHuf98W5bdg== X-Received: by 2002:a05:651c:1a22:b0:255:61fc:4645 with SMTP id by34-20020a05651c1a2200b0025561fc4645mr1543446ljb.99.1654012179713; Tue, 31 May 2022 08:49:39 -0700 (PDT) Received: from wse-c0127 (2-104-116-184-cable.dk.customer.tdc.net. [2.104.116.184]) by smtp.gmail.com with ESMTPSA id p16-20020a2e9ad0000000b002556428fcb6sm233597ljj.61.2022.05.31.08.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 08:49:39 -0700 (PDT) From: Hans Schultz X-Google-Original-From: Hans Schultz To: Ido Schimmel , Hans Schultz Cc: Ido Schimmel , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH V3 net-next 1/4] net: bridge: add fdb flag to extent locked port feature In-Reply-To: References: <20220524152144.40527-1-schultz.hans+netdev@gmail.com> <20220524152144.40527-2-schultz.hans+netdev@gmail.com> <86sfov2w8k.fsf@gmail.com> <86sfoqgi5e.fsf@gmail.com> Date: Tue, 31 May 2022 17:49:32 +0200 Message-ID: <868rqh3do3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On tis, maj 31, 2022 at 17:23, Ido Schimmel wrote: > On Tue, May 31, 2022 at 11:34:21AM +0200, Hans Schultz wrote: >> > Just to give you another data point about how this works in other >> > devices, I can say that at least in Spectrum this works a bit >> > differently. Packets that ingress via a locked port and incur an FDB >> > miss are trapped to the CPU where they should be injected into the Rx >> > path so that the bridge will create the 'locked' FDB entry and notify it >> > to user space. The packets are obviously rated limited as the CPU cannot >> > handle billions of packets per second, unlike the ASIC. The limit is not >> > per bridge port (or even per bridge), but instead global to the entire >> > device. >> >> Btw, will the bridge not create a SWITCHDEV_FDB_ADD_TO_DEVICE event >> towards the switchcore in the scheme you mention and thus add an entry >> that opens up for the specified mac address? > > It will, but the driver needs to ignore FDB entries that are notified > with locked flag. I see that you extended 'struct > switchdev_notifier_fdb_info' with the locked flag, but it's not > initialized in br_switchdev_fdb_populate(). Can you add it in the next > version? Yes, definitely. I have only had focus on it in the messages coming up from the driver, and neglected it the other way.