Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2588198rdb; Fri, 22 Sep 2023 03:10:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo4UmpPE/Y+hjRrV5LHETr9cIf7uJGlNenXloknD8UJNe3q8pLAeKsi++AtbPOJ4qLtsUO X-Received: by 2002:a05:6808:2385:b0:3ae:912:ca7e with SMTP id bp5-20020a056808238500b003ae0912ca7emr4277790oib.41.1695377405566; Fri, 22 Sep 2023 03:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695377405; cv=none; d=google.com; s=arc-20160816; b=tQcgpJqmtj6+GmbQ5z6rJCvKFzBcR3Lzh/vRBFEbjROC7dGOvUQfM9pskiYssL7us4 5ZVa8N0yReJG2LX5orjoe5VK2mRLTBcMrb2Bnnsr5/9NgcWBjT77YLZdff5bV2mXwkdY pzyzr+3pWL99mXzP9c1vZdgW3fiwm4FLsVT33tUjd1vnKCJpCUTJYcZMLCIyyUMuqQrI RlyLW1+0RDUJx4aG1vCmBSkvyS+H1o1qgjWveP9FA9jTdaoO7jG3GjkPkyZ1qHp+HF/o dqiLNT8pKrWHTPYmvBJjqV4n9wBy64mMq+037wGlB+A4CwoYZXiKumeYERKNDj1UT6M8 DUOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XHuJ7BTGYLX/fwLQnd2cpHBWJn57UyO8h1tWeuupHTc=; fh=9p2Xdd4SpwuFHgY3DQxtkwFz17e/Z4OewEIo7vC16Ug=; b=cKWmeEOk4rn0Kf9o+w544iLD8792MHSzr5/zNhKpBsKnUblHO2YWcKRYRE9LiLswQP ZDCVU2DLX0K+EHjRGDj9QsTzoRiQLKFBV2+yidocOkzhe35az6ZKZIdlOBDghUPLNKa3 qQDlNE75eGgchCWMSm3ZnP5Xxvv5DLCT2t9iJH0zZP4Pmz4ZYHqehaEEsl+kpgvZLLHQ hQFEwfvJUO2DlaNDeEgPYzPppzwKqK755y6lfdAMyVSa5krjy7hFWaz1gZMiaVD1LfFD nUPEaCkzs7ZGyixrTvpEHlmsq6eQrlDiKf63I1gXJ45/L+qL+wEIzFxHEUeesbezvKU/ 9ugQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CXJcrC0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h2-20020a635302000000b0056336fb99aasi3258965pgb.850.2023.09.22.03.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 03:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CXJcrC0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CA1D680354A0; Thu, 21 Sep 2023 14:51:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232894AbjIUVvZ (ORCPT + 99 others); Thu, 21 Sep 2023 17:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbjIUVvH (ORCPT ); Thu, 21 Sep 2023 17:51:07 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C97AE66372; Thu, 21 Sep 2023 10:53:07 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-690fa0eea3cso1096734b3a.0; Thu, 21 Sep 2023 10:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695318781; x=1695923581; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XHuJ7BTGYLX/fwLQnd2cpHBWJn57UyO8h1tWeuupHTc=; b=CXJcrC0Unp4Xm/ZygVRivLfwIRnDI6NxWIliMteblc5Tg+/FYRvXw4LFglIjM/IE1P IaKW5wPNJGEPdzoH2CCPKHDLSLK7mvEqKM0nFdb8X1okDkIxmAiKc14fRitNfgdx8yoN lrzsliClqnrTJPH/folRjOReG7BsRVTK/Yt4Im4l1FumDUqDp0lm/wNTKDkTnd/xQ3AH 9q81Mr7WlSzzF70ecCigl7cxArFyxk1D6fsjCxHwl2tqGtrDgFe7Rskgqu5CBlkZe35I eLIhYclLgQNykRPRWF9fenhBisfje/2yEr+zwJeMRZWs1i2XIzOLU1SXkSkjoIeVFwRL CUTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695318781; x=1695923581; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XHuJ7BTGYLX/fwLQnd2cpHBWJn57UyO8h1tWeuupHTc=; b=VG7cttTSSzrD/VDvlvZVJW4sOI6viLCdK4PJ87ykQMNfnDdvyBJQJoWNoKXgCQ/YST s8QBMhcor5GJxnpQJ2PaK8ZIRQ7GAaRN4vQjon3/nyG6RcntPRiAyto2kHFpbHMomzrZ nVwzIliwMWggImkNBu8fHt2uEI9sn/bTtgw0YsSm4HXT5M6Q9A7uf475w8zPtCGe1ukE HC14wgbWpcQ9Fn+EzwgLaJe5rvoKAItBPJBiFYTUa4hmR4M/4BLGDFny5L6I4Bhqovgl 2rDiU91roHkejv4kHU7Fty3LjqTdKMN6MuWEDcS/j79qPwpON0s7Ojj+jAvZfty67jln 5kUQ== X-Gm-Message-State: AOJu0YyDNoNqDRScBq4T4KMkypUVaFA1FJFnOSFr7kYzkiU+HKwbhtDU DfdLkOeRRLiRiMf8CKb0oag= X-Received: by 2002:a05:6a21:498a:b0:15d:5f9a:3921 with SMTP id ax10-20020a056a21498a00b0015d5f9a3921mr2021043pzc.27.1695318781163; Thu, 21 Sep 2023 10:53:01 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id b2-20020aa78702000000b0068620bee456sm1659432pfo.209.2023.09.21.10.52.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Sep 2023 10:53:00 -0700 (PDT) Message-ID: Date: Thu, 21 Sep 2023 10:52:58 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v5 net-next 5/5] net: dsa: microchip: Enable HSR offloading for KSZ9477 Content-Language: en-US To: Lukasz Majewski , Tristram.Ha@microchip.com, Eric Dumazet , Andrew Lunn , davem@davemloft.net, Woojung Huh , Vladimir Oltean , Oleksij Rempel Cc: Jakub Kicinski , Paolo Abeni , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Oltean References: <20230920114343.1979843-1-lukma@denx.de> <20230920114343.1979843-6-lukma@denx.de> From: Florian Fainelli In-Reply-To: <20230920114343.1979843-6-lukma@denx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 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]); Thu, 21 Sep 2023 14:51:37 -0700 (PDT) On 9/20/23 04:43, Lukasz Majewski wrote: > This patch adds functions for providing in KSZ9477 switch HSR > (High-availability Seamless Redundancy) hardware offloading. > > According to AN3474 application note following features are provided: > - TX packet duplication from host to switch (NETIF_F_HW_HSR_DUP) > - RX packet duplication discarding > - Prevention of packet loop > > For last two ones - there is a probability that some packets will not > be filtered in HW (in some special cases - described in AN3474). > Hence, the HSR core code shall be used to discard those not caught frames. > > Moreover, some switch registers adjustments are required - like setting > MAC address of HSR network interface. > > Additionally, the KSZ9477 switch has been configured to forward frames > between HSR ports (e.g. 1,2) members to provide support for > NETIF_F_HW_HSR_FWD flag. > > Join and leave functions are written in a way, that are executed with > single port - i.e. configuration is NOT done only when second HSR port > is configured. > > Co-developed-by: Vladimir Oltean > Signed-off-by: Vladimir Oltean > Signed-off-by: Lukasz Majewski Reviewed-by: Florian Fainelli -- Florian