Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1841742rwl; Fri, 4 Nov 2022 20:54:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45Y2iWEiaFeu2jAz1aZJfzEK/D/MOZHjcqj9rw0HnP/SlC7IoOSv79KhjmK1//4usBE2tZ X-Received: by 2002:a17:906:9bd4:b0:7ad:2d86:418c with SMTP id de20-20020a1709069bd400b007ad2d86418cmr37871294ejc.380.1667620454234; Fri, 04 Nov 2022 20:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667620454; cv=none; d=google.com; s=arc-20160816; b=xKbJCxDrz3WmbK8BxA6nwmLqbu12CTJLEExy5z5YMPC44IGER0sCYA3Ys2IK/hyhzi /GUcpby2lyTNgOXXbYEukdKN9pJp9MWrBNVctO7wf+GI57K+s5yq7BNaJyYjoIhhHI4t M15PE9kVFDX9qu3TVzqw8PUgHsrt3NIiFf0ZpCAbRdPXNtqMIPXUfI7daYlIOWMqCuap 7IGybUYYgyykzJO6EcqtGSzWIw4DAGRp4WwzXLFejWJ6EbQuf5Ve3lcLMxWlnb2/eX/m jm0/k98zflhXw6w0YrnCh9mRZJR1PkvG6JfV3pLGoYKdpIS5dMp4uXWCwlDdw0VzqPst HPgA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZTzHEkmzeDMAIqc7NCOHMqGbuKl/4p2kkFjpT+Wj8gc=; b=Q1c4V9wMKuExA4jz8hK0W/NFejIaUROiqzdX0cVPiXgJk62XOo/PEzPEfM09kf7BC4 GtOV/wpNbTpK98ztSHsSIgTOJaFiQG0avX+iru4E88iPUSGDOFl7j4n+eMVEEpjckcLO sBDrmwPCS7HQ8L2QHHLkGLv0xmZMNlDV8gCQ4JKNEb4f3ULaPgMXC5VrGpKjomxGeDFJ jmzXtY72hNbWobmDlXaF7SPPxnaQC5k7V2fpANjuctPW80RuycZHIMCXqVVUne3NLVxc daqq0HAKe+u2Tmblo99CtTKqKR45/x0H24yDU7PpC+bG+wMIJymOB2CrM3XmQQ6s1G68 u1Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RUSpKDoQ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a17090699c200b0078d27c1b499si1004182ejn.500.2022.11.04.20.53.51; Fri, 04 Nov 2022 20:54:14 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=RUSpKDoQ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiKEDFi (ORCPT + 97 others); Fri, 4 Nov 2022 23:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiKEDFf (ORCPT ); Fri, 4 Nov 2022 23:05:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 002C521E33; Fri, 4 Nov 2022 20:05:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B28E0B82EFE; Sat, 5 Nov 2022 03:05:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D3E8C433C1; Sat, 5 Nov 2022 03:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667617532; bh=Umqv5TifrdYvGAgkEbrHB+9F3i1kl8URY4lxJt5JgnU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RUSpKDoQsUpxmyw84iR9hk2MKXk7x5jXy6Xa0rtAwELAhA9ChEw0eDcSsMpAt0Rsg OfQamM2RJW8LILzbI9mqVMpZfYbgHI+gYDBUp7ojOWiwyb87JXWxklp+4LVxXiUEoF 8+PW9kdzcEkptfjRWbC2D/h1LZBU25kJqE47QqUEUdk5sGBeXBJFToyIKl1LCiKsYx R3M47E8D97phyiZzWBgG4LdHQLVwepDiPGLEzSS4zI7Wyx3Rhc6GRBRvAbbZR5vBI5 P/pAoGO3UqsmiqNYgpye5ZUAlphbI0esHmfAyRGBeqd+DDsryrAhfW2qB8jw1J9K7n oAtvm8YGzN60g== Date: Fri, 4 Nov 2022 20:05:30 -0700 From: Jakub Kicinski To: Maxime Chevallier Cc: 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: <20221104200530.3bbe18c6@kernel.org> In-Reply-To: <20221104174151.439008-4-maxime.chevallier@bootlin.com> References: <20221104174151.439008-1-maxime.chevallier@bootlin.com> <20221104174151.439008-4-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Fri, 4 Nov 2022 18:41:49 +0100 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. > > Add a new tagging protocol based on SKB extensions to convey the > information about the destination port to the MAC driver This is what METADATA_HW_PORT_MUX is for, you shouldn't have to allocate a piece of memory for every single packet. Also the series doesn't build.