Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5895841rwl; Tue, 4 Apr 2023 05:22:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZDIooUum7iV5fOfENX6bT/B/55IW8+Y88id62h1Y6K+6LtBOeXVxPLqdpjhN8EOi/LyKGE X-Received: by 2002:a17:903:32cf:b0:19b:afb:b92e with SMTP id i15-20020a17090332cf00b0019b0afbb92emr3215617plr.40.1680610948127; Tue, 04 Apr 2023 05:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680610948; cv=none; d=google.com; s=arc-20160816; b=wWMIjQFyyaA2Y84pE/zr0ZUKYGAeg+psh6xymNql9EhyDu+VutOSOmprta+zfkPCwO YrE4j/ijFLXwfSAz9BHpu2uPRISKSBzvnOiv8MES0zHvc62aKrdGzg5FML1r3rYM/RW2 XufnPC5n749As0BQfNpw8VbCwpd1W91xxxXnUW9cAdQIi4V3KizsSOjkmp9g8svbDyiJ dVCssPczmUJE4xGyOgfDU4G6QB/oQpe+RO1Us1OptknaLCB2vH7dkmYvUhqe5ZoSowAT ICYKnXo6diyBzfNZ4kOVVrGS0/YefCgY6MeJwSJGn6mxnppzM5xPKeeIRQYq90AvWHRb Lu1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=HjH0ryLZv7Ovy5w+A+uAjq0lWVW7pSMJWZQIc26qcNk=; b=C8UUn2ehPnmhwOIT+5hbEooBxLp+OJ20g/usTbzmJ/QUF72iY7dJrREC/6bwa7NXMB Xn+HhNPkOybDXujaqnj0lkIqpppzfLRxaqdbwJVnrf6HF9oyf+fzAH1sMYpEcVkxE4jT rCqEBzQxy70OlMgBW240jynjl0qZ33YFGT03f+lKNsDQG5ia/Nes00XN6NV4kaj1wG9W 0MoY/hWJn/mMvjjKaYBIoD2OvhUEbo2fxErKwqJX30tVB1hBwahGVhYYWuzaFJDrmBXg PGlFW745qurKCOHv+ACA3h2QfN+ewpMFBW9Wp10FFibJzsh8YHs0MCP4AKFHM6UE3vIa etSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63610a000000b00513f0faa286si1624873pgb.816.2023.04.04.05.22.16; Tue, 04 Apr 2023 05:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234711AbjDDMUk (ORCPT + 99 others); Tue, 4 Apr 2023 08:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234352AbjDDMTi (ORCPT ); Tue, 4 Apr 2023 08:19:38 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 609381BC7 for ; Tue, 4 Apr 2023 05:19:18 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjfd2-0004oI-5t; Tue, 04 Apr 2023 14:19:12 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pjfd1-0000jI-BH; Tue, 04 Apr 2023 14:19:11 +0200 Date: Tue, 4 Apr 2023 14:19:11 +0200 From: Oleksij Rempel To: Vladimir Oltean Cc: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Woojung Huh , Arun Ramadoss , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net-next v1 2/7] net: dsa: microchip: ksz8: Implement add/del_fdb and use static MAC table operations Message-ID: <20230404121911.GA4044@pengutronix.de> References: <20230404101842.1382986-1-o.rempel@pengutronix.de> <20230404101842.1382986-1-o.rempel@pengutronix.de> <20230404101842.1382986-3-o.rempel@pengutronix.de> <20230404101842.1382986-3-o.rempel@pengutronix.de> <20230404113124.nokweynmxtj3yqgt@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230404113124.nokweynmxtj3yqgt@skbuf> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Tue, Apr 04, 2023 at 02:31:24PM +0300, Vladimir Oltean wrote: > On Tue, Apr 04, 2023 at 12:18:37PM +0200, Oleksij Rempel wrote: > > Add support for add/del_fdb operations and utilize the refactored static > > MAC table code. This resolves kernel warnings caused by the lack of fdb > > add function support in the current driver. > > > > Signed-off-by: Oleksij Rempel > > --- > > Side note, I wonder if it's so simple, why this was not done in > e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")? If I compare KSZ879CLX and KSZ8873MLL datasheets, i do not see direct answer. The only reason I can imagine is the size of static MAC table. All KSZ88xx and KSZ87xx variants have only 8 entries. One is already used for STP (even if STP is not enabled, can be optimized). If BRIDGE_VLAN compiled, each local address will be configured 2 times. So, depending on system configuration the static MAC table will full very soon. I tested this patch on KSZ8873. Without this patch, if we do not send any thing from CPU port, local MAC addresses will be forgotten by the dynamic MAC table. Sending packets to a local MAC address from swp0 will flood packets to CPU and swp1. With this patch, packets fill be forwarded only to CPU - as expected. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |