Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1640791rdb; Thu, 25 Jan 2024 01:33:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZFO8ncKwjS0WE+kpu7mPl6DRLqNKs5HLJ06q91kPPVX3N3w/JUjrhJy0UVfOFu0Gj0Ll4 X-Received: by 2002:a17:907:a0d6:b0:a31:7cf7:4140 with SMTP id hw22-20020a170907a0d600b00a317cf74140mr309365ejc.77.1706175204490; Thu, 25 Jan 2024 01:33:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706175204; cv=pass; d=google.com; s=arc-20160816; b=FrUma1yX4GcNBvRJqwdAeaxbdAK4QtDUVrqEYwXOD4f3F5AdkJBEUPG8F3Ojy0dyZ+ Wh092JG2BiGAQFEqzke111mbfAc7igm1DyqCbauuoMob6cGtY/esoG1PWDb23AO7oWsA GkTCOsjltui0rgdnePuDOaesW6ZmoY226Te2q/hZkgsaUKdFEgvEzlmcYDOJ8SehpmRP smsE/1anr2qUheUKtgI9dUC2mXhkCDHaQZ4FJ5EwztDt6qQuUrFE228TQ17dSiiKH2pR PGI1z83bHnlfcyhM06xhbhnTlOtCRSBJQ5H2XcGi0U76cQbMwZRXyKptOv5IQb1hRXPx H4Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yF1vj6bD4OantSklaxQBfzwibMkOXYYkC5p2/Evicfs=; fh=txdmBsMKjiNkj9FGT8RrQtPwrTjC3vq+tB2NS+c6eyw=; b=TCIwRgEoBfXmc5yzGOFABBUZkR2hjD6cCOfbYIvTlsSCJkPrJcsuH2Z1hehvXYVstP Gtgs4GzsouUT6LEshdxaKrgxkuzOiNm2JBQgR1TQTre1PGwT1nIp91KSCPFKmh3dytqf Yy0Fuk/s1gSLqtCZSX4qjGwA6zEz4zL8vi7hJkEFcE4lEZPv1v0q2ytGj6WwKBQIbBtr sQav8Ju12GPnuNMAPfrSrMecizDBw7OE3bAPMe6kNLQgwvoVlhJy3/ipYzMNlaL1MuON XOgblOLKVkIW4hq9dZhR0cFgo1mfVZLxD/vTYrihueSFgv3SjKhnYn27+/XCBOsDYowl t9GQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WC6nwv1D; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-38270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z9-20020a170906240900b00a3251785400si34936eja.459.2024.01.25.01.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:33:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WC6nwv1D; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-38270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3D3B61F2E0D3 for ; Thu, 25 Jan 2024 09:33:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C81831BF3C; Thu, 25 Jan 2024 09:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WC6nwv1D" Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68DB81BDC2; Thu, 25 Jan 2024 09:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175070; cv=none; b=HWWdlR9Ela3GmY78BPGkTnDSNfMOGd4yIIQbgtdJPegMGvando+tn9mxk5L917ccodxNWBfNitW6JqswHC2hdf7Ir5DhMdeEJ0hxxvBCRGkVv7ykzqG5nHfMQdlosdHB90sapVAx2dF94z6xiOxeQ5z0Bgtn7FE7OGyKJScsSw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175070; c=relaxed/simple; bh=OeShpqzxJE7yLOFxxvK9qlbC3YgMT04WmY+0Pht28xQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Au+ocbJG9zAQQ/1BP/abWhjjKXBTCPse79oSeqvf0isYpDgT5pj2ci4q62gCno5fYBFxs9ubv/+FR5d3nHHZkMuLCEFojPiMOnXe0IMkyNqovWLq/7nq2pJ4dI7vrIupwtqZwh7Xz6FyrZrFBcuvll1lT7l4r8ZJahl3+SkbgyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WC6nwv1D; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-55a50649ff6so7183035a12.3; Thu, 25 Jan 2024 01:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706175066; x=1706779866; darn=vger.kernel.org; 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=yF1vj6bD4OantSklaxQBfzwibMkOXYYkC5p2/Evicfs=; b=WC6nwv1DAO+WUe+jGRSDhXj418Jv6mU5tgpHLkd0H3J7o3Gm1xSZO5zqe1Ip5T6tLC NtzykAejh7caOGjFOlx4OPOiLOY4ItlU8pu+d4SdggA+fzIEuJ9noVh1dzpZv16EL/mu N0DG83jgISRlexCdtMTQaOlhAs7MxcTGOXc7MjSW/7Exe1SxNKOnd04Bd9H3442nAB/I 7OPswA8ah8BU9//oY80Xg826daKgOSkrU2R6q19YKpjgFkQRaM52pP93acMQEj1CPeqb yzxvbDcSj8squdYcp4C3pkC2J7FhjpSjQXmfJf8Ip0fIhLbkqRIW2oVl+mwcYLVtTDEU 4ZFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706175066; x=1706779866; 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=yF1vj6bD4OantSklaxQBfzwibMkOXYYkC5p2/Evicfs=; b=fMJBiT/cta7JZJXeE2jduWz3Hnx8plJQDVrCrmfOmPnFoANczfpoZL3O2qKjlHc24g UgFyMimlaL1U8HpDdYhcCBmCa2Eppuang0/krClFw/Sn98IRqry1RpfUnmmvovfytqZP R6MZ53kFvh6Lr7wgmVEZyLwCf4s5t4I/218rSQuAls1ONsvuR2+L3AHjbUigNuQTxGwT H7Aybz7E4u6rAjXlrlnPdQ9teMhgkqVn7GIZiC7svIXhNBrOjv64WMVpQ2vb3iIm50RD ARupKc6YvtbfnyrDAF/yjATMKwwVd0MgsJ3N1j211QdsLo/vY7XGG2vPfsy4GAuGOb29 emwg== X-Gm-Message-State: AOJu0YyInI1Ny839wb3zVP1+FYQeuTCzOq07q37ZGDPavK87kXAlbwd1 9Btpe5Z5v2ywLEHPT26XBdyY7ZZSOD0nTotPMDZxBQjGfXhZu9R1 X-Received: by 2002:a17:907:8693:b0:a2d:d05e:5704 with SMTP id qa19-20020a170907869300b00a2dd05e5704mr456600ejc.30.1706175066341; Thu, 25 Jan 2024 01:31:06 -0800 (PST) Received: from skbuf ([188.25.255.36]) by smtp.gmail.com with ESMTPSA id k14-20020a1709065fce00b00a28aa4871c7sm809849ejv.205.2024.01.25.01.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:31:06 -0800 (PST) Date: Thu, 25 Jan 2024 11:31:03 +0200 From: Vladimir Oltean To: arinc.unal@arinc9.com Cc: 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 , Russell King , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next v3 1/7] net: dsa: mt7530: always trap frames to active CPU port on MT7530 Message-ID: <20240125093103.xlf46pezqj6d5ij7@skbuf> References: <20240122-for-netnext-mt7530-improvements-1-v3-0-042401f2b279@arinc9.com> <20240122-for-netnext-mt7530-improvements-1-v3-0-042401f2b279@arinc9.com> <20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279@arinc9.com> <20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279@arinc9.com> <20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279@arinc9.com> On Mon, Jan 22, 2024 at 08:35:52AM +0300, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > On the MT7530 switch, the CPU_PORT field indicates which CPU port to trap > frames to, regardless of the affinity of the inbound user port. > > When multiple CPU ports are in use, if the DSA conduit interface is down, > trapped frames won't be passed to the conduit interface. > > To make trapping frames work including this case, implement > ds->ops->conduit_state_change() on this subdriver and set the CPU_PORT > field to the numerically smallest CPU port whose conduit interface is up. > Introduce the active_cpu_ports field to store the information of the active > CPU ports. Correct the macros, CPU_PORT is bits 4 through 6 of the > register. > > Add a comment to explain frame trapping for this switch. > > Currently, the driver doesn't support the use of multiple CPU ports so this > is not necessarily a bug fix. > > Suggested-by: Vladimir Oltean > Suggested-by: Russell King (Oracle) > Signed-off-by: Arınç ÜNAL > --- Reviewed-by: Vladimir Oltean