Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5489510rwb; Mon, 14 Nov 2022 05:32:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nUSvhRkqo6//CrJ0/cB84VgqCr0ui4kT//oY4Asb/6ywHYNE+DJm5abyiim5FuQzJIWT1 X-Received: by 2002:aa7:cdc8:0:b0:463:f8aa:d2bf with SMTP id h8-20020aa7cdc8000000b00463f8aad2bfmr11198350edw.358.1668432758556; Mon, 14 Nov 2022 05:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668432758; cv=none; d=google.com; s=arc-20160816; b=pxX5aUJSq7nyLcB15KKSIQxq7dKHamZd6tULKlrY+ziiwU9NId9RbdXqCa7YxnaUbZ bq8ZmY2+bVZAOEsAMdH2vTfpstQiAa7u34UYuwtmvmx6aRAt3NTMGU/AAxvzoJL4UF0b AGoCnZFJPjDJxxFLK3e69xLQY1WCRNxZ6SuHCkvrX9ZMcOcDy2USjdQlLmmDvQUmtyhc 4BMKBU71UqmdnHt6gQUE4eyyPg75AmKKbjFOhfpvvztx/vIHURdvda9nJNPvqMDpI88n JBDlKaow6vbL5NfSf25Ubt+jynlGNtAHBiMBPsPpkGpjMeo5MnJT1MzUSDIzLOiuodvo 3ZfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1+DRgmN0eqZmnocBxTuNg6H1IaiSGYensI9rua5pGB0=; b=Ffs5sse7uvukjsSt18HLFOOeyInt0M5VqERSl+g9Z/MRrLS82LGkHxRPRmuEAeQRYd PU5yBT29lZB4KO/3xkRUlXvGM4eruah4ByqpJ6My/QmCPWKnOYIZBhm0m+W3Wm5JhH97 VA7RrsQEkw3Y7NwSClO5J7EGH+vr/jOwc4Nc3SxpTN66suEMoES5Jc3Ylez8OlDzuX8L ap5fkKQGUjB14GfUywwEImJCsGrnwE7fqYUG/0FDjl+eA245Meqaue7hAgXyMePxyvWs x1NJTzsGzTIQ4JUZmL9/WhUUeic1diU+avi47RYUrdyP7OzH7Si+w8htEH5ZD+g9MAYn pW/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hsnePPpd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a170906144100b0078da3218b54si7189003ejc.171.2022.11.14.05.32.13; Mon, 14 Nov 2022 05:32:38 -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=@gmail.com header.s=20210112 header.b=hsnePPpd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237056AbiKNMRk (ORCPT + 88 others); Mon, 14 Nov 2022 07:17:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236962AbiKNMRi (ORCPT ); Mon, 14 Nov 2022 07:17:38 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 223731E3F1; Mon, 14 Nov 2022 04:17:37 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id v17so17001910edc.8; Mon, 14 Nov 2022 04:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1+DRgmN0eqZmnocBxTuNg6H1IaiSGYensI9rua5pGB0=; b=hsnePPpd6m7s3TvGrYDM5jZwj4FUd7jdqvnDDC3ztrWspx/Pn79ur0hsiW3FWUI2Lr LMJRf/m3QAWaMpWrT/gntlGSXY9U4Ecyh32TCKhsfcazRk9a/f+FVrgaxpeEGxP2ZGEw cq/nCQhxKyGh6mZoXnAntk/cqTpfooTC9Q74ZinPYjRVPYJPqDN0Gl1sNTIjg04JGz4g PaM2NuItdlg1jQd5KQyvlmzfdOioiNXbins5iER7DK9tKiDSAY7VQZ2XRNP0v4/cVhID bzzcURuCtGtAkdmWU1HcWLrwOhhLiNwBxAeJsOPMSsy8xENLK688eBzifx5j/Oq9SrC5 f/rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1+DRgmN0eqZmnocBxTuNg6H1IaiSGYensI9rua5pGB0=; b=TzFny4vPR1T2ZcdeMKbZKZXsBqShut2qS+CSI4yRaJ5MvFId0pVUEFmY6wKvfeK70K Jhxb9oCks/aDH7HA5Rv7VqFLlRe6KanV8amEM4cUt77C6Xk8XgMw+5QhZrMLSub7Aw7n ehGGPRQxagnAUA5/JXbzrI9dafLLq4pAHEcbFJvQI27BplqIOeKN5mbe3sgHJohRExHC h6nicMwTTpepN/uMjiAqdOzR4Nv+rWFr5MKGUmLweL5pft4RHIdVN6DVE8yjZSsTi6y/ APqtvytC6b5QNLVAMgWqflcdH5/BeslpKVr8oXwKqifd/S623nIAmrqquGwVnE6zCpAR gVIQ== X-Gm-Message-State: ANoB5pm6vqWhuC/hdnvKdCOaDKK8Wzrt6uutPKEwyaTOC6NbZRrptzzh OQ46OL9hRu5vXn+GorkUH0PiuAavlnACig== X-Received: by 2002:a05:6402:528b:b0:463:c2f9:8a07 with SMTP id en11-20020a056402528b00b00463c2f98a07mr10896989edb.319.1668428255615; Mon, 14 Nov 2022 04:17:35 -0800 (PST) Received: from skbuf ([188.27.184.37]) by smtp.gmail.com with ESMTPSA id d13-20020aa7c1cd000000b00463597d2c25sm4756403edp.74.2022.11.14.04.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 04:17:35 -0800 (PST) Date: Mon, 14 Nov 2022 14:17:32 +0200 From: Vladimir Oltean To: Felix Fietkau Cc: Jakub Kicinski , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Andrew Lunn , Vivien Didelot , Florian Fainelli , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 1/4] net: dsa: add support for DSA rx offloading via metadata dst Message-ID: <20221114121732.3sqlg5ey4fnmjj2o@skbuf> References: <20221110212212.96825-1-nbd@nbd.name> <20221110212212.96825-2-nbd@nbd.name> <20221111233714.pmbc5qvq3g3hemhr@skbuf> <20221111204059.17b8ce95@kernel.org> <20221114115559.wl7efrgxphijqz4o@skbuf> <8faa9c5d-960c-849b-e6af-a847bb1fd12f@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8faa9c5d-960c-849b-e6af-a847bb1fd12f@nbd.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Mon, Nov 14, 2022 at 01:06:42PM +0100, Felix Fietkau wrote: > In that case it likely makes sense to disable DSA tag offloading whenever > driver XDP is being used. > Generic XDP probably doesn't matter much. Last time I tried to use it and > ran into performance issues, I was told that it's only usable for testing > anyway and there was no interest in fixing the cases that I ran into. Don't know about generic XDP performance, sorry. But I think it's reasonable that XDP programs written for a DSA switch should also work if the DSA master has no driver support for XDP. At least until it gains driver level support. > > > 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? > > > > I don't think you can mix refcounting at consumer side with no-refcounting > > at producer side, no? > skb_dst_drop checks if refcounting was used for the skb dst pointer. > > > I suppose that we could leave refcounting out for now, and bug you if > > someone comes with a real need later and complains. Right now it's a bit > > hard for me to imagine all the possibilities. How does that sound? > Sounds good. I think I'll send v4 anyway to deal with the XDP case and to > switch to skb_dst_drop. Sounds good.