From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9308C00A8F for ; Tue, 24 Oct 2023 09:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PkVUAQXRUgzSeQlB7gPh908xDkvci7QBVT6wZIj0JJU=; b=lkjCPIaTtiZjw8 SPgWxig+DmtkEdoPKo95rCAQcaEZ3+taEw5reCyF8TpzeciVm0DQu/Tq7cy5/dsgsy/t0ciWd0yym zK5y1bajhIHwkhT6PZpAYGlkEZVonOni8Bhjwa2Ib/eADkA4OSoHKkPf66f87Fovt6dYnjwgQ/Nxv uU3Wu7gQBrjvmLO1nskrGO+XOsLbJVRKNRjCo13K2ElF+BPvdoc08OPohClJrS1VRfYYJBvi9qJBd Y4jKRlBkKDdK7tls2KD1N/GRfGskHoQS8itF9RTOsmFO8CmI/gY2QK4bA80f7tSoIi2am9Q5C6fAf jEaI9ymfKgDahbQdkYEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvDWO-009HU2-20; Tue, 24 Oct 2023 09:16:20 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvDWL-009HSX-2P for linux-arm-kernel@lists.infradead.org; Tue, 24 Oct 2023 09:16:19 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 42A0660004; Tue, 24 Oct 2023 09:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698138974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=md6/yyZqKkyjUlet2bPLNG/W7nE8H467rQvEuNTnneo=; b=BXfZq//4KXiali7NIh5LYiazMLA56n3s3V/t1dnc7sGhlbBzgd80H8ksKkYdkb++IlGnvC tVUuGfQOfnKD28g+ViRq0MGt8wcTPf/moe4+SMB6UIuhYJcpbl+zbr2gtPX/EwlZMXIPsl FzT0unj13nA5QPdZJVyFA5u1713cK1kjQlQX/rIrP9zB/rzsi+vJggfr6Zx7JTbNi26/x3 fPXErPC2j2Jvxlf12sqn4twV81QKVzEE2/nPGVJ4YJkP5EaLMn18nyNFRuBxnVDtq0o7sJ ZdgbeNB6UW+Ir1UKd2/HrGLcDtVlrHueSgm8KDMmtPEDoY+nVOwYfNpTW8cQSA== Date: Tue, 24 Oct 2023 11:16:27 +0200 (CEST) From: Romain Gantois 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 , Robert Marko , Andy Gross , Bjorn Andersson , Konrad Dybcio , Maxime Chevallier Subject: Re: [PATCH net-next 3/5] net: ipqess: introduce the Qualcomm IPQESS driver In-Reply-To: Message-ID: References: <20231023155013.512999-1-romain.gantois@bootlin.com> <20231023155013.512999-4-romain.gantois@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: romain.gantois@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231024_021617_932393_77D8209D X-CRM114-Status: GOOD ( 20.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Andrew, On Mon, 23 Oct 2023, Andrew Lunn wrote: [...] > > + struct qca8k_priv *priv = port->sw->priv; > > + struct ipqess_port_dump_ctx dump = { > > + .dev = dev, > > + .skb = skb, > > + .cb = cb, > > + .idx = *idx, > > + }; > > And with a little bit of refactoring, you should be able to use the > core of qca8k_port_fdb_dump(). All that seems to differ is how you get > to the struct qca8k_priv *priv. > > That then makes me wounder if there is more code here which could be > removed with a little refactoring of the DSA driver? Yes, I think this should be possible for a few more functions, I'll look into it for the v2. > > +static int ipqess_port_get_eeprom_len(struct net_device *dev) > > +{ > > + return 0; > > +} > > Is this actually useful? What does it default to if not provided? 42? It's not, I'll remove it. > > > + for (c = 0; c < priv->info->mib_count; c++) { > > + mib = &ar8327_mib[c]; > > + reg = QCA8K_PORT_MIB_COUNTER(port->index) + mib->offset; > > + > > + ret = qca8k_read(priv, reg, &val); > > + if (ret < 0) > > + continue; > > Given the switch is built in, is this fast? The 8k driver avoids doing > 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. Thanks, Romain _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel