Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3318789rwb; Sat, 12 Nov 2022 03:36:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf5U6DpF62mvgpETIoT+3kVz0yDpHIX/845PWpQIqc9WFoo+1Jvf68k9QWBkP1t1mvmfqf+0 X-Received: by 2002:a17:907:9613:b0:78d:bc56:8f22 with SMTP id gb19-20020a170907961300b0078dbc568f22mr4644802ejc.256.1668252961934; Sat, 12 Nov 2022 03:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668252961; cv=none; d=google.com; s=arc-20160816; b=NpIkiT/NsyTeU8Vs0m1IFZVt9H+Fow3shim7jyHONghU38/nuHlc/RNQMnybG+dVgc n+oH2Uji2u9j2tNFIgNABsMhxLAdrT+q1SVHXG+P2s4NM/ra4aQjgmnoMClIdTRUofeg Pfgx7MQIVGn5jvZBwyD44GJMR924v1muE930Tc8VJiJ09kM0Fu2rWYyCls2NRrdpcFdX HIkytxrbzdGZEGokulErag5I/4qyUiJ8NR+h07fcUNmcTNRq1eGse5YHXm6xX6BhlSRy jwW18ioOkVC4uF2SdtZ47lqowKUFQ83EB1Rme7ZoTUxRQs/Cc8O9webk8eVIjY7sPsG9 Pzkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6IVvTJ7xXdP76g3qTEs/lWl0/xdLucKLgA47BvOkZRM=; b=YwNPC0R9kTTyXDv2OWcoIalrI0WtSVVJlrlK7pwGJ1ZpXb9jzvq9n8Sf86GHMz8NUn AfDtURPPhUbnuQpn95wpRDr63q5ilHqwUZzf3jAmr6ow3GvnfCjJsb5s4hrvAr9dBAaF DlYAVi/w4RwtNeAXsxITtlTMdpEVMj+3xglIZ8C7Fs+t2khjmeI7xCVXpEpbLjJ6F7BA U/jU42glSmKMzqJZuoKKZaCiIS4uuORUJR7sluR/2ncgigi6LK9W/TOV9xK6aTmiUwfY VNKPRZ41Gqpg+w4Txi2Kygu06ELd8TS+s+T4RMq/RCg8KtH5hROyVCjAkqp+FYHIFocF qKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=QMrUO1+E; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht15-20020a170907608f00b0078d805901b1si4107011ejc.489.2022.11.12.03.35.39; Sat, 12 Nov 2022 03:36:01 -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=fail header.i=@nbd.name header.s=20160729 header.b=QMrUO1+E; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233437AbiKLLNo (ORCPT + 91 others); Sat, 12 Nov 2022 06:13:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbiKLLNd (ORCPT ); Sat, 12 Nov 2022 06:13:33 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 082FE100F; Sat, 12 Nov 2022 03:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6IVvTJ7xXdP76g3qTEs/lWl0/xdLucKLgA47BvOkZRM=; b=QMrUO1+EZdy+9uySixHhpjE/7t 3nETsz8RR6MfVTcuoDrt0fahThcJUTpAsm8OB5D24V7ZcCAJFOx4GPlWuWqXT/QGDIRRc0GrGXuWN OYJ7HvMzgtZLDE/o6QTcGlYh/1JLvMa1lh88clfqTPIi/AZNPXriYQB/pBYEkGLuhV3A=; Received: from p200300daa72ee10cb9d33d2e9c9a0fe5.dip0.t-ipconnect.de ([2003:da:a72e:e10c:b9d3:3d2e:9c9a:fe5] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1otoRo-001JKe-EX; Sat, 12 Nov 2022 12:13:16 +0100 Message-ID: Date: Sat, 12 Nov 2022 12:13:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH net-next v3 1/4] net: dsa: add support for DSA rx offloading via metadata dst Content-Language: en-US To: Jakub Kicinski , Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Andrew Lunn , Vivien Didelot , Florian Fainelli , linux-kernel@vger.kernel.org References: <20221110212212.96825-1-nbd@nbd.name> <20221110212212.96825-2-nbd@nbd.name> <20221111233714.pmbc5qvq3g3hemhr@skbuf> <20221111204059.17b8ce95@kernel.org> From: Felix Fietkau In-Reply-To: <20221111204059.17b8ce95@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE 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 12.11.22 05:40, Jakub Kicinski wrote: > On Sat, 12 Nov 2022 01:37:14 +0200 Vladimir Oltean wrote: >> Jakub, what do you think? Refcounting or no refcounting? > > I would not trust my word over Felix's.. but since you asked I'd vote > for refcounted. There's probably a handful of low level redirects > (generic XDP, TC, NFT) that can happen and steal the packet, and > keep it alive for a while. I don't think they will all necessarily > clear the dst. I don't really see a valid use case in running generic XDP, TC and NFT on a DSA master dealing with packets before the tag receive function has been run. And after the tag has been processed, the metadata DST is cleared from the skb. How about this: I send a v4 which uses skb_dst_drop instead of skb_dst_set, so that other drivers can use refcounting if it makes sense for them. For mtk_eth_soc, I prefer to leave out refcounting for performance reasons. Is that acceptable to you guys? - Felix