Message ID | 20230920114343.1979843-1-lukma@denx.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4127101vqi; Wed, 20 Sep 2023 06:09:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlPirx9MJORObdEA0tuq8DOFXkQkmrv3BggF9aN+SSIwSJW+11s54MJ7sgzCjuOvRvejQ5 X-Received: by 2002:a17:90a:bd0a:b0:274:694c:167d with SMTP id y10-20020a17090abd0a00b00274694c167dmr2550908pjr.5.1695215340246; Wed, 20 Sep 2023 06:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695215340; cv=none; d=google.com; s=arc-20160816; b=Q8ObUZ6NDwwW8leUfsi4eOJ0BAnZO9nycAAV+oLwnLATKolKBIJuXGP2Qec/dMf8nW Xra3W3eMxs0FCwFIe52msPaN/oVD54OTNael3Ob7VAS312lz291/FmOECPOnu4y2TxDx mc1GMIYFmTR5Xvi6AKYdpr7tqh8CY4tWLbkXr7RVp/rQU0dj2NKmdBsikrZTqlKcfTVc m6qVyrocEDSVyhV0DldXdaBhmh1v2x6CTiPCGyp6EIwl8Zg7s6ieWZEMVin4cBGiwC7z uMfKhHNCTYFPeaTSpST8u5Mqh5v4EkpXvTbG1Ibz7p6OmJgNLurMFrc74oVQICPIPG10 qlZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wF48erZR6turOA3H1N7RgF/MSbbCoV3fPvoqpc+H5xI=; fh=Jfg3FS8fsRNBkvUGwLEW6Abzb8InqsTQ+ekYW23wRXI=; b=it/4rhYc7OMtj+zhfkhjCW3fhK8jxN0Gu9ua+xo2SxT5MAyUKLuwmxW/swizU5Od+l HQvSoF3ApalOKAAJyhybQ3TnhOWggcVJUDTPiBsA+VFF9DAfv/QRBoNtFc0u/2X9rk2X JkVAKiJUG5+r9jkDFhQwV7YYyqO/6dRw79L675FX4vx3+gyeY4CfDPOrLK+XDizlhcmh 2hBmUaC+4JkQQHJXNFR436Nn96eH0YVwNpfm0VZpwukXe0m8/cOnsE1Oc0IWQxBNCGsf uSUWr78yr8saJCeXlmDAaEtecPaL8K0cRfYL7fYcbhGEgQx2hahsAPmSPXiYrMbwEzmN 9Tng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=axHObFBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z15-20020a17090ab10f00b00274cd766a42si1468538pjq.171.2023.09.20.06.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:09:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=axHObFBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 49B1E8023909; Wed, 20 Sep 2023 04:44:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234487AbjITLoO (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Wed, 20 Sep 2023 07:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234463AbjITLoL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 20 Sep 2023 07:44:11 -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 BDAA7C2; Wed, 20 Sep 2023 04:44:02 -0700 (PDT) Received: from localhost.localdomain (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 707C6868D1; Wed, 20 Sep 2023 13:43:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1695210239; bh=wF48erZR6turOA3H1N7RgF/MSbbCoV3fPvoqpc+H5xI=; h=From:To:Cc:Subject:Date:From; b=axHObFBPvaEc0AggMBm0AhfpWgIJYOP92YPWpkSyIHUdBFcMG2PLWJxpcPXj67F+Y hvUBa3RIOmpL4JeOY+E1huato09UzTIBPrhgEKpe5UPXgGU9UsJbs7ocYDUHpht4sg mv1VuvKHZVkkDAEOz26HPNFIhHoRHKr9J+F+RD+UDjiCFqMq78kjvGLO98JmfCVevy sEjEc776lZHEGfABbGLQPARtu07ujCSoRi8bczLJP1R+Us8j0ePcZK1Ho4TLzd9t4b 9LwcdNGy9MqcYkI5eQsiJ4cz8UcbjOzqZx5uwz8N6l5k7MAhv+RV/bW9uvmUqx1c40 mCmvwUjGUW7FA== From: Lukasz Majewski <lukma@denx.de> To: Tristram.Ha@microchip.com, Eric Dumazet <edumazet@google.com>, Andrew Lunn <andrew@lunn.ch>, davem@davemloft.net, Woojung Huh <woojung.huh@microchip.com>, Vladimir Oltean <olteanv@gmail.com>, Oleksij Rempel <o.rempel@pengutronix.de> Cc: Florian Fainelli <f.fainelli@gmail.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lukasz Majewski <lukma@denx.de> Subject: [PATCH v5 net-next 0/5] net: dsa: hsr: Enable HSR HW offloading for KSZ9477 Date: Wed, 20 Sep 2023 13:43:38 +0200 Message-Id: <20230920114343.1979843-1-lukma@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 04:44:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777562120846389444 X-GMAIL-MSGID: 1777562120846389444 |
Series |
net: dsa: hsr: Enable HSR HW offloading for KSZ9477
|
|
Message
Lukasz Majewski
Sept. 20, 2023, 11:43 a.m. UTC
This patch series provides support for HSR HW offloading in KSZ9477 switch IC. To test this feature: ip link add name hsr0 type hsr slave1 lan1 slave2 lan2 supervision 45 version 1 ip link set dev lan1 up ip link set dev lan2 up ip a add 192.168.0.1/24 dev hsr0 ip link set dev hsr0 up To remove HSR network device: ip link del hsr0 To test if one can adjust MAC address: ip link set lan2 address 00:01:02:AA:BB:CC It is also possible to create another HSR interface, but it will only support HSR is software - e.g. ip link add name hsr1 type hsr slave1 lan3 slave2 lan4 supervision 45 version 1 Test HW: Two KSZ9477-EVB boards with HSR ports set to "Port1" and "Port2". Performance SW used: nuttcp -S --nofork nuttcp -vv -T 60 -r 192.168.0.2 nuttcp -vv -T 60 -t 192.168.0.2 Code: v6.6.0-rc1+ Linux repository Tested HSR v0 and v1 Results: With KSZ9477 offloading support added: RX: 100 Mbps TX: 98 Mbps With no offloading RX: 63 Mbps TX: 63 Mbps Lukasz Majewski (2): net: dsa: tag_ksz: Extend ksz9477_xmit() for HSR frame duplication net: dsa: microchip: Enable HSR offloading for KSZ9477 Vladimir Oltean (3): net: dsa: propagate extack to ds->ops->port_hsr_join() net: dsa: notify drivers of MAC address changes on user ports net: dsa: microchip: move REG_SW_MAC_ADDR to dev->info->regs[] drivers/net/dsa/microchip/ksz8795_reg.h | 7 -- drivers/net/dsa/microchip/ksz9477.c | 70 +++++++++++ drivers/net/dsa/microchip/ksz9477.h | 2 + drivers/net/dsa/microchip/ksz9477_reg.h | 7 -- drivers/net/dsa/microchip/ksz_common.c | 149 ++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 10 ++ drivers/net/dsa/xrs700x/xrs700x.c | 18 ++- include/net/dsa.h | 13 ++- net/dsa/port.c | 5 +- net/dsa/port.h | 3 +- net/dsa/slave.c | 9 +- net/dsa/tag_ksz.c | 8 ++ 12 files changed, 276 insertions(+), 25 deletions(-)
Comments
Hi Lukasz,
On Wed, Sep 20, 2023 at 01:43:38PM +0200, Lukasz Majewski wrote:
> Code: v6.6.0-rc1+ Linux repository
Your patches conflict with Oleksij's ACL patches, merged on the 14th of September.
https://patchwork.kernel.org/project/netdevbpf/patch/20230914131145.23336-1-o.rempel@pengutronix.de/
Please always submit patches formatted on the most recent tip of the
"main" branch of https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
at the time of submission, not "v6.6.0-rc1+ Linux repository". There is
nothing that will be done with patches formatted on older trees.
https://patchwork.kernel.org/project/netdevbpf/patch/20230920114343.1979843-2-lukma@denx.de/
netdev/apply fail Patch does not apply to net-next
Hi Vladimir, > Hi Lukasz, > > On Wed, Sep 20, 2023 at 01:43:38PM +0200, Lukasz Majewski wrote: > > Code: v6.6.0-rc1+ Linux repository > > Your patches conflict with Oleksij's ACL patches, merged on the 14th > of September. > https://patchwork.kernel.org/project/netdevbpf/patch/20230914131145.23336-1-o.rempel@pengutronix.de/ > > Please always submit patches formatted on the most recent tip of the > "main" branch of > https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git By mistake my net-next repo was pointing to: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Please correct me if I'm wrong but it looks like the net repo for current mainline fixes... > at the time of submission, not "v6.6.0-rc1+ Linux repository". There > is nothing that will be done with patches formatted on older trees. > > https://patchwork.kernel.org/project/netdevbpf/patch/20230920114343.1979843-2-lukma@denx.de/ > netdev/apply fail Patch does not apply to net-next However, after fetching net-next - I can apply v5 without issues on top of it. SHA1: 5a1b322cb0b7d0d33a2d13462294dc0f46911172 "Merge branch 'mlxsw-multicast'" https://source.denx.de/linux/linux-ksz9477/-/commits/net-next-ksz-HSR-devel-v5?ref_type=heads Linux version from `uname -a`: 6.6.0-rc2+ However, it looks like I would need to prepare v6 anyway... 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
On Fri, Sep 22, 2023 at 01:18:38PM +0200, Lukasz Majewski wrote: > By mistake my net-next repo was pointing to: > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net > > Please correct me if I'm wrong but it looks like the net repo for > current mainline fixes... Yes, net.git is for fixes to the current mainline branch, and net-next is for new features to be included in mainline during the next merge window. They are the same at the beginning of the development cycle and then they start to diverge. > However, after fetching net-next - I can apply v5 without issues on top > of it. > > SHA1: 5a1b322cb0b7d0d33a2d13462294dc0f46911172 > "Merge branch 'mlxsw-multicast'" > > https://source.denx.de/linux/linux-ksz9477/-/commits/net-next-ksz-HSR-devel-v5?ref_type=heads > Linux version from `uname -a`: 6.6.0-rc2+ > > However, it looks like I would need to prepare v6 anyway... I don't know. "git rebase" is a bit smarter than "git am" and can automatically resolve some conflicts, on which "git am" will simply bail out if even the context is not identical. Either way, both patchwork and me failed to apply your v5 series on net-next, and the patches won't be accepted without build testing.
Hi Vladimir, > On Fri, Sep 22, 2023 at 01:18:38PM +0200, Lukasz Majewski wrote: > > By mistake my net-next repo was pointing to: > > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net > > > > Please correct me if I'm wrong but it looks like the net repo for > > current mainline fixes... > > Yes, net.git is for fixes to the current mainline branch, and net-next > is for new features to be included in mainline during the next merge > window. They are the same at the beginning of the development cycle > and then they start to diverge. > > > However, after fetching net-next - I can apply v5 without issues on > > top of it. > > > > SHA1: 5a1b322cb0b7d0d33a2d13462294dc0f46911172 > > "Merge branch 'mlxsw-multicast'" > > > > https://source.denx.de/linux/linux-ksz9477/-/commits/net-next-ksz-HSR-devel-v5?ref_type=heads > > Linux version from `uname -a`: 6.6.0-rc2+ > > > > However, it looks like I would need to prepare v6 anyway... > > I don't know. "git rebase" is a bit smarter than "git am" and can > automatically resolve some conflicts, on which "git am" will simply > bail out if even the context is not identical. Either way, both > patchwork and me failed to apply your v5 series on net-next, and the > patches won't be accepted without build testing. Ok. I will test them with git am -3 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