Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2609133rdb; Tue, 12 Sep 2023 07:09:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpwO0dd3W7YLiIginPSOodwW4RX1SFiWxV2ADOKuRgRU5BnHMoiRc3EeuPjnh5n39pCzXt X-Received: by 2002:a05:6a20:734f:b0:14d:7b6:cf3b with SMTP id v15-20020a056a20734f00b0014d07b6cf3bmr3597954pzc.6.1694527761405; Tue, 12 Sep 2023 07:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694527761; cv=none; d=google.com; s=arc-20160816; b=t85peaSwBXvTZY05IZ5L8QbHYdsFPo5ZKvdrRQIU1/9OtIukQ/DlKwEDS8exf4gOw3 buqU4gzcv+6qVHyi39+nthWL9NoNQpHoRiU3VlLaTMBOUOHjGHBkJ7Z1CznUb3DqyBYh cwZmzIH5uCEjtKvbMwSXkIiINBwzNgyp4MEyLklYSdyMX0hnO7Vo5vLFmT9LYZ7FODqr 2o2GCSlDii4zWCr2nqaQPGVUjwYtOH5QOZkqnGcGUfyWZejCoh44jxcEg6QoEEMe8bGn ZzP6GjXJXEF5e9N/YUxhJBRfMUGc9Ej7tRTr1JLOU4tsPVKi6dlNjLQY9Zd/yeIbd9an 8pTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:organization:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=DtoeluLm01NnQZKGYOEwCpPPjDcwpgfZ+EHpQIgHa3o=; fh=2g2uXMCOVfyTah6PvJw/uZI8OKc4sTapjnhODp9WhEw=; b=ZKOvUeo0fCLFP1kDqerptwyKE4CZRih7oBsD4LZusIg1xN12BdIL9FNBcMnBFvgYvt Lk3f5O3MX3HhKg+hNqSlRVOX23eDncwZ9u+rxOkg1PfA4ED1ZJo5KBdndqGar04c0qZ8 4NB55YmU/PbYs3RZQVyZ4IzI0Z27bIdfgGgua7/pmKIxnDLUeA+DUl9+tvpI56z0fS8y XWU/H+d3jyydhIvHNbtn+W1RAucNdOKS1/5tEpaqq65oP6dYurWN9VtmN41wmJ95bqk8 O1Nbenf/Qg8nG8lwwlPvUAn0oxyhdNmTF6vmIkBEpEUIhhWup+CQAxEuJorHFgpjitH2 W38w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=zitroCYo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 73-20020a63004c000000b0056c0e3c77f7si7943099pga.805.2023.09.12.07.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 07:09:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=zitroCYo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E4FC08026589; Tue, 12 Sep 2023 01:18:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232281AbjILISD (ORCPT + 99 others); Tue, 12 Sep 2023 04:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjILISC (ORCPT ); Tue, 12 Sep 2023 04:18:02 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4ECDE73; Tue, 12 Sep 2023 01:17:58 -0700 (PDT) Received: from wsk (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 6C25486A49; Tue, 12 Sep 2023 10:17:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1694506676; bh=DtoeluLm01NnQZKGYOEwCpPPjDcwpgfZ+EHpQIgHa3o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zitroCYos6925tU//kpUU62WzBI9L3cRs6GaHr8j/q4LpefEJIth0dmobbQtxY6yn VjAd3BTcJaxrM2RNV1dvA7Xz6lmIfMtHydErLVJ3baOIJGrooemB1+vvldEjv2S+y2 GhBq6Kl61vNkuhSiGv8q88HspjusyW/maBE5KoCLQHYIHtjeSX4qVyT+yukdxIlsJd GhuEiYX86mt/82BTN81uMneHj+YD8sxfriccy14GT+OH5RhVtpYaFgMhSs76m0y/ma vHM4rfyLv4mxMc0OZiPfr1xKBguD1nhoVOrTisj94r590pRFUE7QqRCXaLuixw5+zf MCbuigDnNe7wg== Date: Tue, 12 Sep 2023 10:17:48 +0200 From: Lukasz Majewski To: Vladimir Oltean Cc: Tristram.Ha@microchip.com, Eric Dumazet , Andrew Lunn , davem@davemloft.net, Woojung Huh , Oleksij Rempel , Florian Fainelli , Jakub Kicinski , Paolo Abeni , UNGLinuxDriver@microchip.com, Oleksij Rempel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW offloading for KSZ9477 Message-ID: <20230912101748.0ca4eec8@wsk> In-Reply-To: <20230911160501.5vc4nttz6fnww56h@skbuf> References: <20230906152801.921664-1-lukma@denx.de> <20230911165848.0741c03c@wsk> <20230911160501.5vc4nttz6fnww56h@skbuf> Organization: denx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bwRV6NUh6F=O0WEHRBFibVB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Sep 2023 01:18:22 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email --Sig_/bwRV6NUh6F=O0WEHRBFibVB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Vladimir, > On Mon, Sep 11, 2023 at 04:58:48PM +0200, Lukasz Majewski wrote: > > Dear Community, > >=20 > > Are there any comments regarding this new revision of the HSR > > support for KSZ9477 switch? > >=20 > > Best regards, > >=20 > > Lukasz Majewski =20 >=20 > Yeah, the integration with the DSA master's MAC address is not quite > what I was expecting to see. >=20 > See, both the DSA master's MAC address, as well as the HSR device's > MAC address, can be changed at runtime with: >=20 > ip link set eth0 address AA:BB:CC:DD:EE:FF # DSA master > ip link set lan1 address AA:BB:CC:DD:EE:FF # indirectly changes the > HSR's address too IMHO, somebody who will use HSR will not fiddle with mac addresses of LAN1 and ETH0. It will be setup by savvy user once at boot up. >=20 > which is problematic because the hardware does not get updated in that > case, but the address change is not refused either. >=20 > Actually, the reason why I haven't yet said anything is because it > made me realize that there is a pre-existing bug in net/dsa/slave.c > where we have this pattern: >=20 > if (!ether_addr_equal(dev->dev_addr, master->dev_addr)) > dev_uc_add(master, dev->dev_addr); >=20 > but there is no replay of the dev_uc_add() call when the > master->dev_addr changes. This really results in RX packet loss, as I > have tested. I don't know what is the best way to solve it. >=20 > Anyway, programming the MAC address of the DSA master or of the HSR > device to hardware seems to require tracking the NETDEV_CHANGEADDR and > NETDEV_PRE_CHANGEADDR events, even if only to reject those changes. Please correct me if I'm wrong, but the above issue (with lack of sync of mac address change in DSA master and its ports) seems to be affecting HSR support in a minimal way (when considering the above). If I may ask - what is your suggestion to have the HSR join feature merged for KSZ9477 SoC ? Will the above problem block the HSR offloading support mainlining, even when the self mac address filtering is one of four HW based features for this SoC? Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/bwRV6NUh6F=O0WEHRBFibVB Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmUAHqwACgkQAR8vZIA0 zr3IyQf/brMDtjdKMvUTCOs5kkNPIHCYms3dezF4itq3jM5N47duldHVXKhZ8o9V oDZrpOA+5SNQz41tHOdsUNEHF8Cw1GF1nGn68UYtvVJYQ8xXiiLhQb3qUOEoxCCi 8RaPOx+a00JekyLPgp7i3tqsCakqx5SAWjqdwWkwJzvaLnGANLeRrmdne9PPUbcI UfiE3jA9PO5qib7p7E8DePY4hL3iHcbfvoF/Xs9IlcByAR2V8/lEn3vpZSMpqHyC M6a73XyAcIl8zv+jyPCZOXxMedyzEU2h2w0VoVeeX32EvXway9zpLxE/TDvTVdvE PQziSTtAdi2zhLu2cMH/2GVkA60EQg== =EbJK -----END PGP SIGNATURE----- --Sig_/bwRV6NUh6F=O0WEHRBFibVB--