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 B052EC433EF for ; Fri, 22 Apr 2022 18:29:45 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6EFnYyrZilf3Frletn74tV45aItbRi52+lemQE4b6WA=; b=gXGWS95ajWrXmk OeuM6PY83nkfMM6zG32L7Q3VS0DXd2IRzlJIHNRVbQ/DRU4b4l+HcZ4lZldI/o6PE3pSVN6mcYKMS bB+IbrL4B9vU4BzRSTgvX25yC3lC9pyf/5rFyXI5G09MBOEsuc71t3Ji3suXTr8N0cfLe3LHMpP9v pYHaSBtYntQ+f2B0psQ52TUqhPM3cB/PRhu3PZc6GyZjA/hvq/RCCKJd8tHDRnnNZ6AslZhevkBbS 3tzeHsx/FeTzaQas9Vsfutdib1DnDp9DeUBN+SZPKnvZwYMQAN6Svn8vJn2Hz645IWHmbsSqTJ81h MSuoqdG/EyMlBLBjEhOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhy1M-001xw1-2q; Fri, 22 Apr 2022 18:28:44 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhy1E-001xqz-HA for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 18:28:38 +0000 Received: by mail-pf1-x435.google.com with SMTP id c1so2205723pfo.0 for ; Fri, 22 Apr 2022 11:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=VZJZWU/RxygMbphG0Oj9zjd06v34ardwpbG1ITBoIDw=; b=YZrWTzrqWk1rSABVylk7srJID3fDK9uMYJG42OPvae8wfCRKj7ksYtYZn7xN0yrP8i e41Zp35cubbwqYSgd29HYOnVMmbr5qt6fEZ8X/yNW7wvKE6Of2E2X84vq2sbLpm0v1ft 7Yc10MU2AuvdmmQhwLN/afW/ybLHkuYWzff9R78t3w/+XyhG60uKEsY2w5UdcUX6Fu2J LMy2HV3lFWnIFWErseiwxIAg5WQVCIyoHpY/usBPF0WEoB6IZcWuDlIdWhOUBNbbC3U9 o1RNHfw+J/BuziFmLiNgBRaa2DJDNESPnhnvUgumXYSBsoCUt6ByYC2DxaEy9zCJP3wE T5/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=VZJZWU/RxygMbphG0Oj9zjd06v34ardwpbG1ITBoIDw=; b=PPDgsvzHnY+8+njLRwwk1drZ6OaNR99dsZFho5zY0mltQZFQy9Fgzh9meTJFqomD29 eXZiKNAkqg33q+3SqvG+3rRYDIUvv01gzrnHHsucCFq5+aR4CXZInl+Fsbp+edjjllev GfaD91QCKh82lPTaKL1NewwdSxB4kFvTJB03qAWKg0/hWaU7LXRO5O1+dU+QvsmVk30k IZwtOlpGV0ln/bdTZptJKZFYE8pHKrNZcZ86rITD9kEUK/imwQ39CsrS1WF6idpeuTzB +EBQFds4kjG0+1Yz8JbobwblPBITlx9uVyDAz+ZAantGC6/o9J+wC5bnn2xYQksCOUtD HpPg== X-Gm-Message-State: AOAM53022xuLO9mHNfz3oogyecbCksJVtU/pcp7ppusSTnebhaGN42tZ fWJVzSQD7lALSpthjQs2RQA= X-Google-Smtp-Source: ABdhPJzt8+ULZ4U/JS1QogjvrFZ9RPxY2qsOw5RmC0oJk1pCiWYhJttEH2fg8OhbQGWlcVH7Xy1Pxw== X-Received: by 2002:a65:41c3:0:b0:363:5711:e234 with SMTP id b3-20020a6541c3000000b003635711e234mr5039062pgq.386.1650652113575; Fri, 22 Apr 2022 11:28:33 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id b17-20020a056a000a9100b004e1b7cdb8fdsm3593300pfl.70.2022.04.22.11.28.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Apr 2022 11:28:32 -0700 (PDT) Message-ID: <68c4710d-013e-85e0-154d-413f4e13b27e@gmail.com> Date: Fri, 22 Apr 2022 11:28:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH net-next 2/5] net: dsa: add out-of-band tagging protocol Content-Language: en-US To: Maxime Chevallier , davem@davemloft.net, Rob Herring Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko References: <20220422180305.301882-1-maxime.chevallier@bootlin.com> <20220422180305.301882-3-maxime.chevallier@bootlin.com> From: Florian Fainelli In-Reply-To: <20220422180305.301882-3-maxime.chevallier@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_112836_653324_14901CE6 X-CRM114-Status: GOOD ( 18.77 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/22/22 11:03, Maxime Chevallier wrote: > This tagging protocol is designed for the situation where the link > between the MAC and the Switch is designed such that the Destination > Port, which is usually embedded in some part of the Ethernet Header, is > sent out-of-band, and isn't present at all in the Ethernet frame. > > This can happen when the MAC and Switch are tightly integrated on an > SoC, as is the case with the Qualcomm IPQ4019 for example, where the DSA > tag is inserted directly into the DMA descriptors. In that case, > the MAC driver is responsible for sending the tag to the switch using > the out-of-band medium. To do so, the MAC driver needs to have the > information of the destination port for that skb. > > This tagging protocol relies on a new set of fields in skb->shinfo to > transmit the dsa tagging information to and from the MAC driver. > > Signed-off-by: Maxime Chevallier First off, I am not a big fan of expanding skb::shared_info because it is sensitive to cache line sizes and is critical for performance at much higher speeds, I would expect Eric and Jakub to not be terribly happy about it. The Broadcom systemport (bcmsysport.c) has a mode where it can extract the Broadcom tag and put it in front of the actual packet contents which appears to be very similar here. From there on, you can have two strategies: - have the Ethernet controller mangle the packet contents such that the QCA tag is located in front of the actual Ethernet frame and create a new tagging protocol variant for QCA, similar to the TAG_BRCM versus TAG_BRCM_PREPEND - provide the necessary information for the tagger to work using an out of band mechanism, which is what you have done, in which case, maybe you can use skb->cb[] instead of using skb::shared_info? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel