Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2004523rda; Tue, 24 Oct 2023 09:24:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4xhgg87sST0jxrHt5IffX3Xq8ol+N8JqWe6seSZ7acPFvp+IpTWBeezYId+kmKMsfATeA X-Received: by 2002:a05:6359:5c20:b0:168:e177:b2bf with SMTP id pu32-20020a0563595c2000b00168e177b2bfmr5868805rwb.5.1698164660895; Tue, 24 Oct 2023 09:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698164660; cv=none; d=google.com; s=arc-20160816; b=JUJR8SSeO0xDPWxAj2mPuiGAmlm0c36rJ1DdAa8/ZfEudTaUJm6kGVBOe59GVxIiU/ y/xHzuNaoeUGzJIQgyTZTWqj3sLQBSR3p6P6PUavfJMR1wc58Ptc+YI/wkEijJce/OUW JeWQtQd4CcUl5lIXXau0w17FTCGBUUa3RQaCZ2fqL3EZAMCIOkZbGXk3R5sVrapgtdlz wOQeDAwLS1V0zRpYNsrQiAqbgvoqKChehodj9mL+HeIRgN5r5El6IC4Q8d3MWExwBeUw 7kVJ2MtnQ7fVxr8f3MgwhMKCJEEp2V414j6q0PAVcVyybEyDbf80YDxBVwWSqe34EF9s vT/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZKTm1mrgyLc1h8Vt1hMbh4XUq9UQSm1P9ND6vgHtPB4=; fh=NPg/dVoZ8Ph/3XRlCg7ogA8VS1cSAd4h7Oxz2KFWgAU=; b=basXkkbavo71/WfyLT8xsH795eN4VZoiDpM9D7sPeJeaK+JQWOPPIuT+8/z0cGCM0/ DE2hMPsCYMhPiU0CIrNxOLrurJaVdICLEKELVXmZQrivr9HnvLiKB7yn9OiR96ApJYCo wVImlyqpFfHhE+KxunE0R90bcFd4OUjfbef6VBJXOWoXWToaHyIpiTDEVd47GNrXHjIY tRDLTLphYYdB1rhCkRDmzyXRxI+j0/5scwyQXz3iHFiTlQFYEfY/pb/gN3oOQqa5SrWv Ty0ST+JxU9vsXMQQ8a6yo/EHPvb4EfmNESvlLfR9PDO8PJ0ntJ/SLHQVt0FsUlzoHm3U ZNSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura.hr header.s=sartura header.b=k4MIVHE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=sartura.hr Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ck22-20020a056a02091600b00573f885c4easi8515182pgb.753.2023.10.24.09.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 09:24:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@sartura.hr header.s=sartura header.b=k4MIVHE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=sartura.hr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0F547802A7D3; Tue, 24 Oct 2023 09:24:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343811AbjJXQYP (ORCPT + 99 others); Tue, 24 Oct 2023 12:24:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343816AbjJXQYM (ORCPT ); Tue, 24 Oct 2023 12:24:12 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABB11B3 for ; Tue, 24 Oct 2023 09:24:10 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6bd0e1b1890so3657958b3a.3 for ; Tue, 24 Oct 2023 09:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura.hr; s=sartura; t=1698164649; x=1698769449; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZKTm1mrgyLc1h8Vt1hMbh4XUq9UQSm1P9ND6vgHtPB4=; b=k4MIVHE+0PbeZIPTGn5y3n93OW81aHxr2DHqvg+mjJpDYtKmt+bhBwWyYLEdpkvpQ4 qeDKwvVdjsxLw1u72xTXBHq0Ev/DT0c61BuiyOaKlHruXjyaBe61Ls/UXghY67A1UnRo Riy4CrAoHEHn0uqUUcMqaQ/+RMev2zIZ6AxVokNe48o5mlFQq8GaG/pYpY4i4st7dDE9 6Yxlty5xikWBvI7WUCrMQwnIbiQdAS23IcSH+Wxt3iaq8V8OBjxXY7MpcZNHkCBPvSug 8JR62EOTJ+x21AtT8YmylanyYYBhJlgKc/vIu4RWTTuxTGvCTfSCikRh1kMGh4pAXfbK xGRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698164649; x=1698769449; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZKTm1mrgyLc1h8Vt1hMbh4XUq9UQSm1P9ND6vgHtPB4=; b=w6h6bJ7XnF+YLyma7+QzUJbEiEepqW2PKb0JU/sEpTIPUtWhn8jO3q1c3hgDiuKzNL K40vZDxhaIoRMqp1P+C1aN1FTvbEx7t3iwYpWvptl9UHmBuk8Ukr8BUX/uzro+yeZCM2 yazXEJdd+9jrBsrQcMlY/WV5KTm9EOvJUQwIN/LALWMHUi4PTXOvLc7RclO3pd4WL2r4 UBmipFGZbBwVFTAZFO4M6qS/GxCGQXFDDzHhtMbAVDhqddSLo1Ur8POcYJeyWdc5O2Ly WvcQyO8k4ouwALrsTbMEKOucnhmT4KqA6/vyvSFevdgO52p3O0yscILRUx81jLFOWOir 7eVQ== X-Gm-Message-State: AOJu0YwzFATGs1daM5vFRyPS6XjVjsepubtsWKtQj4+56J4Lmg7d1ngP pESq81RGvwv2JF6qQNblelSlAzxzImhmZ0if/GZB3w== X-Received: by 2002:a05:6a00:c8d:b0:6bc:635a:aad3 with SMTP id a13-20020a056a000c8d00b006bc635aaad3mr10680827pfv.9.1698164649373; Tue, 24 Oct 2023 09:24:09 -0700 (PDT) MIME-Version: 1.0 References: <20231023155013.512999-1-romain.gantois@bootlin.com> <20231023155013.512999-4-romain.gantois@bootlin.com> <932bef01-b498-4c1a-a7f4-3357fe94e883@lunn.ch> In-Reply-To: <932bef01-b498-4c1a-a7f4-3357fe94e883@lunn.ch> From: Robert Marko Date: Tue, 24 Oct 2023 18:23:58 +0200 Message-ID: Subject: Re: [PATCH net-next 3/5] net: ipqess: introduce the Qualcomm IPQESS driver To: Andrew Lunn Cc: Romain Gantois , davem@davemloft.net, Rob Herring , Krzysztof Kozlowski , Jakub Kicinski , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Andy Gross , Bjorn Andersson , Konrad Dybcio , Maxime Chevallier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 24 Oct 2023 09:24:20 -0700 (PDT) On Tue, Oct 24, 2023 at 4:08=E2=80=AFPM Andrew Lunn wrote: > > > > > + for (c =3D 0; c < priv->info->mib_count; c++) { > > > > + mib =3D &ar8327_mib[c]; > > > > + reg =3D QCA8K_PORT_MIB_COUNTER(port->index) + mib->offset= ; > > > > + > > > > + ret =3D qca8k_read(priv, reg, &val); > > > > + if (ret < 0) > > > > + continue; > > > > > > Given the switch is built in, is this fast? The 8k driver avoids doin= g > > > register reads for this. > > > > Sorry, I don't quite understand what you mean. Are you referring to the= existing > > QCA8k DSA driver? From what I've seen, it calls qca8k_get_ethtool_stats= defined > > in qca8k-common.c and this uses the same register read. > > It should actually build an Ethernet frame containing a command to get > most of the statistics in one operation. That frame is sent to the > switch over the SoCs ethernet interface. The switch replies with a > frame containing the statistics. This should be faster than doing lots > of register reads over a slow MDIO bus. > > Now, given that this switch is built into the SoC, i assume the MDIO > bus is gone, so register access is fast. So you don't need to use > Ethernet frames. It is being accessed as regular MMIO so the MDIO bottleneck is not present, so we never tried if the special ethernet packets are even support, especia= lly since the tag is completely different from that in regular qca8k switches. Regards, Robert > > Andrew --=20 Robert Marko Staff Embedded Linux Engineer Sartura Ltd. Lendavska ulica 16a 10000 Zagreb, Croatia Email: robert.marko@sartura.hr Web: www.sartura.hr