Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6671949rwb; Tue, 15 Nov 2022 01:54:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ycdmREIVp/82EDMg3uFDkMKLkVGLcxSa1TYECQIcYepl6je6EnN5VleShDG1Vz7Rt3nm6 X-Received: by 2002:a17:907:8dcd:b0:78a:efde:b84a with SMTP id tg13-20020a1709078dcd00b0078aefdeb84amr13149425ejc.744.1668506060712; Tue, 15 Nov 2022 01:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668506060; cv=none; d=google.com; s=arc-20160816; b=m7pFzkpjGnrqvguURWFlz2iaIu/gHCLAa4CFu8Yh+t3fCwNmpYeMd8BTDqFqZyB1c0 9zAV3jzmK1jVeJc5Zkhl/Q3WwtFnBZXzqvGIY0GuRWLOd/H5F5cM91Hh51gxUp4/IGoH a+5GqtpRmB4izp2aRgMdLxI0Ektl/mRWUcx765M9dSf+1PA7tRw+WuVlfDiCJvFBPeom xgP8Vrwobk46ioQzYUP+T0e+BwlnD872AEsLDjF6az688FgIWsMo3DhCC7l30wEAa88J WF8Lm7YnwhRQuwNO8qxso1lfi4YaKKFixmhxJHLguEM8yER+C5mL898GaSUGBtZ+/vz+ sGFQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=ZzaCUVqgu6mLezJNdaf9hoUrWcdXw3DoAzvtlQBAKeQ=; b=Fvvy2zb+Z7g3vgjQqCHismcKUfPNBHoJO13+J0IBS8VruFjM6dWlSkEg0PbNjWYhyD baUqcYHeusgUPwrRhS46FraqhWQF1r1CS4siLRH3Eci/2GYBnsIE97z/+E/ZCekZ8qPO /1DcKdSugxKCp2Nqgp/7RnP8ro3YRjfYWJabPae/jxTcIUwg0U+nynXvs6rp3JImdg6v dUxTVRrlueozrqs4U7dicewq3jujuZB/EaQ3LmV6PY4J4X6ioOBZbSe/a/rfARdgqNpq DNGwmbJPOfgl0tXxmNluvaWssrkLnjhvPQ2yHC3txKOhItRPV1viB657y0TVLtXT+PGZ UUSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aaPtb1oq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170906771100b007ae4c686a4dsi9196871ejm.649.2022.11.15.01.53.57; Tue, 15 Nov 2022 01:54:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aaPtb1oq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229657AbiKOJ3e (ORCPT + 90 others); Tue, 15 Nov 2022 04:29:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbiKOJ3c (ORCPT ); Tue, 15 Nov 2022 04:29:32 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14737BC26; Tue, 15 Nov 2022 01:29:30 -0800 (PST) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id BA77A1BF205; Tue, 15 Nov 2022 09:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668504569; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZzaCUVqgu6mLezJNdaf9hoUrWcdXw3DoAzvtlQBAKeQ=; b=aaPtb1oqHYVfOd92rUhN0mfRqGQ1qVa3CRwZUYCUC6Le+grUEPUTvdV6f/PLBnE4YN7C+F WiOYm+yhAXMLd7CDfzecO1Mhttx52JlQC+K/vsEXOIgVdD8s45yI49KuBAyYV/NTGypt1D js+hVHFIHXh8cx3HHgw2cQrD6dQ0uOaoilX1dBaMmXhKpbTfe+Z093sr8CqT/EiOkLfW3G j/T1S0NOogy0YF9yZQYzXWts2jKRqea6lCO7qIGH4iR7FD4/XyQmXovLrUYMcRBqRAa9eo MDlUJf7Ir4cQekCdhYA0IA9P4D+O9EFAzerbE980Hq9GsVXqxH96mGlJR4SQnA== Date: Tue, 15 Nov 2022 10:29:24 +0100 From: Maxime Chevallier To: Felix Fietkau Cc: Jakub Kicinski , davem@davemloft.net, Rob Herring , Krzysztof Kozlowski , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko , Andy Gross , Bjorn Andersson , Konrad Dybcio Subject: Re: [PATCH net-next v8 3/5] net: dsa: add out-of-band tagging protocol Message-ID: <20221115102924.1329b49f@pc-7.home> In-Reply-To: <6b38ec27-65a3-c973-c5e1-a25bbe4f6104@nbd.name> References: <20221104174151.439008-1-maxime.chevallier@bootlin.com> <20221104174151.439008-4-maxime.chevallier@bootlin.com> <20221104200530.3bbe18c6@kernel.org> <20221107093950.74de3fa1@pc-8.home> <6b38ec27-65a3-c973-c5e1-a25bbe4f6104@nbd.name> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, Felix, thanks for the feedback ! On Tue, 8 Nov 2022 13:22:17 +0100 Felix Fietkau wrote: [...] > FYI, I'm currently working on hardware DSA untagging on the mediatek > mtk_eth_soc driver. On this hardware, I definitely need to keep the > custom DSA tag driver, as hardware untagging is not always available. > For the receive side, I came up with this patch (still untested) for > using METADATA_HW_PORT_MUX. > It has the advantage of being able to skip the tag protocol rcv ops > call for offload-enabled packets. > > Maybe for the transmit side we could have some kind of netdev feature > or capability that indicates offload support and allows skipping the > tag xmit function as well. > In that case, ipqess could simply use a no-op tag driver. If I'm not mistaken, Florian also proposed a while ago an offload mechanism for taggin/untagging : https://lore.kernel.org/lkml/1438322920.20182.144.camel@edumazet-glaptop2.roam.corp.google.com/T/ It uses some of the points you're mentionning, such as the netdev feature :) All in all, I'm still a bit confused about the next steps. If I can summarize a bit, we have a lot of approaches, all with advantages and inconvenients, I'll try to summarize the state : - We could simply use the skb extensions as-is, rename the tagger something like "DSA_TAG_IPQDMA" and consider this a way to perform tagging on this specific class of hardware, without trying too hard to make it generic. - We could try to move forward with this mechanism of offloading tagging and untagging from the MAC driver, this would address Florian's first try at this, Felix's use-case and would fit well the IPQESS case - There's the option discussed by Vlad and Jakub to add several frontends, one being a switchev driver, here I'm a bit lost TBH, if we go this way I could definitely use a few pointers from Vlad :) When looking at it from this point of view, option 2 looks pretty promising, but I would like to make sure we're on the same page at that point. On my side, I've tried several approaches for this tagging and so far none are acceptable, for good reasons. I would like to make sure then that I grasp the full picture and I didn't miss other possible ways of addressing this. Thanks everyone for your help ! Maxime