Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1400774rwb; Mon, 7 Nov 2022 00:56:41 -0800 (PST) X-Google-Smtp-Source: AMsMyM5qK5X+gQ1uO5uGywry9ODTBc9Xifov+qDycDAKIz+juCBHhGEFPSOHGQhitwVOij56pdqP X-Received: by 2002:a05:6a00:14c1:b0:56d:18e5:b00a with SMTP id w1-20020a056a0014c100b0056d18e5b00amr47582653pfu.57.1667811401078; Mon, 07 Nov 2022 00:56:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667811401; cv=none; d=google.com; s=arc-20160816; b=BIzdc10tY7gOq86nDkslWIpkpVTNf6YouzpuhttVzWhqEhA4s1+ru+B03uut9Bwjh2 JrgnDoZYMWZQ2o8p1WAAzQ0vFiAQurE+ahtizfOWL4rzwqKw22/++yyaTwrOfMfOp6Cc CcZCLHC6hb7YnrQKX2kBK877fHfFywcHjfXs2FzFZZF60Q8QvX4hvjEdODiEjmmuuk7g bw4ed1/+QOAFK7hS0Fc/VHrLSiM+PevpX/eK/YWzoWIjMybVsBZ9c/PBtdiMK7sdawiV RvXhtRzBETSO8XjTaSxmAyZaM6tsWQHm/VLEWhwWVF9NkfXGLBILjHlryPU1v9TWE/nJ eR2g== 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=Kt3YaVgos6aTLVWYjMs61pa3ceG8lp2j8XYt+Ucplyw=; b=zfJVn9+UbRaDYn0FJPEY/YYJ+9BNY76DPXsRlEbKGjixFhtU+y5HuPRYtutvRynqFo hBIj/ASnQdWzK0E5UVOyq3lsXUvl6ResMu3R+sDTirGWVd6+OAiPJCjTIRcMDbC6YcLB poTLE8P8Z7bosUtIFSJsY0bi7YD3t/p5VTTIEuzot74s+/oJ9qE3p+SrQW+5CC96284e yWjdneH/0UZ1qefto5EDRDoqy2s/owB25KiwzPpfObuDIT3DbD0npH6lG2ipuzETRCTO jnQ8m1zjM7VxTWk9sgWY68EKZQ7OG20o+TQPnM53hDAYc/neccqWkYt+zR/s3bSUShNg Ge/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AscLybvq; 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 nn16-20020a17090b38d000b00212ec29c79asi10363781pjb.62.2022.11.07.00.56.29; Mon, 07 Nov 2022 00:56:41 -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=AscLybvq; 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 S231319AbiKGIkB (ORCPT + 95 others); Mon, 7 Nov 2022 03:40:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231226AbiKGIj6 (ORCPT ); Mon, 7 Nov 2022 03:39:58 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D5F515709; Mon, 7 Nov 2022 00:39:57 -0800 (PST) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id AE13B240012; Mon, 7 Nov 2022 08:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667810395; 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=Kt3YaVgos6aTLVWYjMs61pa3ceG8lp2j8XYt+Ucplyw=; b=AscLybvqBkKKgJLxu4it0nKtw+XOslDBXsHBsvlHVxB0Quj8CJoOpqRBmXiqfOd1/kasH9 I+cRuyTQ77O+3UrGUe3ZGeH7rU1c/DtCrPXXS+URrPf5lzaNMrG7+Bc9qi70AWFk/HuaSt jolcAbhp1rSvg2qX53A0bk241bSR4UCNLi0r3AMKmZCI5JP75FU80j+GTBU53Iy1XyffQi Uv2CTDUq7j4BuVRIrD5Rb5nvrcN87Urg4Q7WbnybzhsxcFFSPae5Z7j42qmFbMKsj+HI3J vXojYdsYBdNtD5o2z/B8c6rgd+JXFd3YWUtUB46TeWGWJbN4757yjat0WVARgg== Date: Mon, 7 Nov 2022 09:39:50 +0100 From: Maxime Chevallier To: Jakub Kicinski 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: <20221107093950.74de3fa1@pc-8.home> In-Reply-To: <20221104200530.3bbe18c6@kernel.org> References: <20221104174151.439008-1-maxime.chevallier@bootlin.com> <20221104174151.439008-4-maxime.chevallier@bootlin.com> <20221104200530.3bbe18c6@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.1.0 (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 Jakub, On Fri, 4 Nov 2022 20:05:30 -0700 Jakub Kicinski wrote: > 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. Does this work with DSA ? The information conveyed in the extension is the DSA port identifier. I'm not familiar at all with METADATA_HW_PORT_MUX, should we extend that mechanism to convey the DSA port id ? I also agree that allocating data isn't the best way to go, but from the history of this series, we've tried 3 approaches so far : - Adding a new field to struct sk_buff, which isn't a good idea - Using the skb headroom, but then we can't know for sure is the skb contains a DSA tag or not - Using skb extensions, that comes with the cost of this memory allocation. Is this approach also incorrect then ? > Also the series doesn't build. Can you elaborate more ? I can't reproduce the build failure on my side, and I didn't get any reports from the kbuild bot, are you using a specific config file ? Thanks, Maxime