Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5393237rwd; Mon, 12 Jun 2023 04:38:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Mxv/nOKBmAcOR45cyEJcoLhUauefzV1K42qHQFC7Qs/D8owBNPD3GRVmfYoFoTxLT6nHm X-Received: by 2002:a17:907:9414:b0:974:31:ed74 with SMTP id dk20-20020a170907941400b009740031ed74mr10039582ejc.65.1686569927414; Mon, 12 Jun 2023 04:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686569927; cv=none; d=google.com; s=arc-20160816; b=Vjk4pbdEvPIKUA5nSBMlNcE/09h/yhZdH+iJtOkTs0bSTOnVG1X3PK4ZwMN7VEOH7y xMpragxVfLk5md4Pw5mQlfmZn7AQNRIOtEDm+UAlmTR7VKbz9OEKfbuwv8wMRiJx4PRn WAN0mBJfv+H5FnMCuV6Mc79ki9L4/g0wLdxau7kd9EcoZE16esh9nCHo/KFLJOmWk8K4 LJCvkjAd3Ua+SZPOT5GhKh5lJsCXsay8BgTJ5iF9Kvai3ZBnSLyksQvAG58F9ESzdXp6 zF0SE0vuMf9VXg+HtdqZN+soYlAI8cPhRvkIJSXSfbcD9bqG0+zEMjkWYv6mr0zUh362 RmHQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XrJnAcQXaaKtEzxkhRkZVaQ+TNeCvbTHyVGe6/lX350=; b=IkkXgnHE4KT7dkTvK1wdC7BAJZ5iOLIt2uXOBc5zQEJ9yrKVfp2fYgkCuffiuHDQKn aDQlG5W01vwZNw55peKNtqRwNPXkADMFNRD7yjmO6JjwuL4AMH7gVzBEr7nhhMEKWkEU hwZP2KMSCp6F2ULj7OpfwgsZWcHvhziHzsMon84Vr8yb/cHii62W+1YpYCum1ORVQz3H yB5PRuUSH5TkyGna6CYyVKj2mwfH+04WDjHRt+kzh0/kHHuTV9ezvMETC2Iwl3A2XDMM 2HPGqI4vxmfoj6hO+THNPKUsj6Wik7YXWtEJLjbLpiqUUndpzcoPISg8nfec9t66B/Ja oMbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="ZX/zgdnj"; 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 r27-20020a170906281b00b009665a49fc65si5435830ejc.961.2023.06.12.04.38.23; Mon, 12 Jun 2023 04:38:47 -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=@gmail.com header.s=20221208 header.b="ZX/zgdnj"; 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 S237713AbjFLLDj (ORCPT + 99 others); Mon, 12 Jun 2023 07:03:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237639AbjFLLDW (ORCPT ); Mon, 12 Jun 2023 07:03:22 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF907DB0; Mon, 12 Jun 2023 03:50:59 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-977d0288fd2so706834866b.1; Mon, 12 Jun 2023 03:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686567058; x=1689159058; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=XrJnAcQXaaKtEzxkhRkZVaQ+TNeCvbTHyVGe6/lX350=; b=ZX/zgdnjqLp5frWFF0tmhlrQaah5uP+E2/nKpuVuLRyU3dvU+9+tJt9RnDMzo9ZNM8 KuHSt662s1ARIEposq65rWX/QbqddpAjkFg0q4mp+3pXqs4PZpOZxPPWf2//ZqLqHTOV k+xT1AWGSKR+MROAvQ+tFHJemt5OzLlkQwmR7E8M6m/CwlPxmoU+57zpDEHZt7N9KExM 1dv8LfZyWFPxPq08yHV1CzIft2zOYkSHLRnAYrxlXQAXVuwHsYKDZJYdufLTTDD8F57R VGrMYibyu3WyB5dTp7MBKVMnAhJhAMh6YMrLa90HywEg4nAmlfYBULzgdf02rvTESf2X x2vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686567058; x=1689159058; h=in-reply-to:content-transfer-encoding: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=XrJnAcQXaaKtEzxkhRkZVaQ+TNeCvbTHyVGe6/lX350=; b=PRBo7JUQf/ARVQGwzFP8p5C7tbhwD4jYJ/GHtGA1LrzhqU+0Yuaond2f21Z217PD/5 mB+dGl91GTjboF/MDjbnDoA4Xn5r2jrv7+dhKm+b0XXNzVS1Qd+eJ8Ex+THKf5DNDVDf NppqMVptkNF4meHwlSZCovPF0yRHJIIMpnfnDOhGApaHhTOFosgzDrM+aIs8lWmaePZS UkL2PemEyNWgkSgwfcc4uWMiYqFi1/rRyIROMj3d6jCqKARENq0HC6WqWF3oFGvvXT27 FN8yh6qyMg8HWNfyc8cAW1iEMdyPCzREftBWvCg23NK2w8hz+1EMAnzdjgqGXdkuApu0 pn6w== X-Gm-Message-State: AC+VfDxDPwBZ4YwmoU+Yu3FyKoCWgUNR6/yQ7eYYTFHS1D8oBCW0XSKu g+nOolmckMLBdUb23Hz8ruA= X-Received: by 2002:a17:906:fe4d:b0:973:93e3:bc9a with SMTP id wz13-20020a170906fe4d00b0097393e3bc9amr8904535ejb.6.1686567057749; Mon, 12 Jun 2023 03:50:57 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id t16-20020a1709066bd000b009596e7e0dbasm5025364ejs.162.2023.06.12.03.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 03:50:57 -0700 (PDT) Date: Mon, 12 Jun 2023 13:50:54 +0300 From: Vladimir Oltean To: "Russell King (Oracle)" Cc: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Frank Wunderlich , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net v2 1/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7531 Message-ID: <20230612105054.fqv46qpnpf2ktc3b@skbuf> References: <20230611081547.26747-1-arinc.unal@arinc9.com> <9d571682-7271-2a5e-8079-900d14a5d7cd@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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,T_SCC_BODY_TEXT_LINE 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, Jun 12, 2023 at 11:09:10AM +0100, Russell King (Oracle) wrote: > > Yes but it's not the affinity we set here. It's to enable the CPU port for > > trapping. > > In light of that, is the problem that we only enable one CPU port to > receive trapped frames from their affine user ports? The badly explained problem is that this driver is not coded up to handle device trees with multiple CPU ports in the way that is desirable for Arınç. Namely, when both CPU ports 5 and 6 are described in the device tree, DSA currently chooses port 5 as the active and unchangeable CPU port. That works, however it is not desirable for Arınç for performance reasons, as explained in commit "net: dsa: introduce preferred_default_local_cpu_port and use on MT7530" from this series. So that change makes DSA choose port 6 as the active and unchangeable CPU port. But as a preliminary change for that to work, one would need to remove the current built-in assumption of the mt7530 driver: that the active and unchangeable CPU port is also the first CPU port. This change builds on the observation that there is no problem when all CPU ports described in the device tree are set in the CPU port bitmap, regardless of whether they are active or not. This is because packet trapping on these switch sub-families follows the user to CPU port affinity, and inactive CPU ports have no user ports affine to them.