Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1538493rwd; Tue, 13 Jun 2023 10:23:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7V54K8zwR6PNxIUXNr93YB8TwDGabVJu7uXOMCW1GJuFLMZRj9mHLb20wPyA04XrCgq66q X-Received: by 2002:a05:6402:1819:b0:514:9d3f:7a60 with SMTP id g25-20020a056402181900b005149d3f7a60mr7663180edy.14.1686677005881; Tue, 13 Jun 2023 10:23:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686677005; cv=pass; d=google.com; s=arc-20160816; b=lTtZtP94r84HuOLCmoM0Jq5Qwh74hkpNPqo57D2thUtakNGDrgBJpTLzebq5TaMx/x Nl4Nyny7vAovyirxNF5k+aLNn42f0DpN7RgeItL07RZ10GimpTCxbvg4TcUTTp31OmlU U7uhTFMzgCd5ADJ8Km/VaWrPxjoFkXAGlLPnYkECwIL3fXLqD40u6Ugdy24f7eop7OUK cfsGxHq7bwbdzhLeT2M3v96udjptb5gHmEkLiOuAGBRnTimBgyfsUI8iuGiuicWBsV5G g3C8Ym+5JWH++xjnX4VgMJHUMQoSJ8Dyz1u/K7dx87NF2qvqNxVjsNZzPFun91Dln83s gp8Q== ARC-Message-Signature: i=2; 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=UKSb0ThZcnVNrqrSeSS4LEbZcnEV/yq3xqSOWPk24oE=; b=hrGnoV6h0l94WHndQ1JcjTnk+X6I9T5AliPpfEKHqqxXOEOkmdYD6POpQ5RU8EDxjz CU2d4z+t3nk86M3EV8+dWda97k0HQ7oOINsNLM8xQSkbbWxGyYCR4LKgrS/sxBRUF2b8 mRSankinrZk0crc9K3mJ7IgpM1ITZnekHjQNV6hcf70Qt722XEogpxTnOJ1UvJg8qJpK X8/Xq6UcbYIFkWxpNjPHGZzFXfpUu8eQXP7gm1Da3hci5gjKF0TjfypzOhCSL+41gd6O zqZIEOyJqyoO6TCTMYPLHp3VRFGMTnFCLscCu2DXnl+XNdRWl4ukJgKVwVYU/ab6CzMg KFlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=IZfOyOQo; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12-20020a056402074c00b0051498cea5e7si7472252edy.521.2023.06.13.10.23.01; Tue, 13 Jun 2023 10:23:25 -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=@arinc9.com header.s=zmail header.b=IZfOyOQo; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237642AbjFMRSB (ORCPT + 99 others); Tue, 13 Jun 2023 13:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238365AbjFMRRx (ORCPT ); Tue, 13 Jun 2023 13:17:53 -0400 Received: from sender3-op-o18.zoho.com (sender3-op-o18.zoho.com [136.143.184.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F211721; Tue, 13 Jun 2023 10:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686676631; cv=none; d=zohomail.com; s=zohoarc; b=gJxyZRLWD4NEl61gqVvN2lIfwlk/b7+kmWYt9mavIXZNAacZgCz58hAqyazjZ7GGeo17941q76PNu1MAq8WfhO1cI1rFrv+XjVCdngJKnhPgSaEjIvX9YvywQGJGlMLnEqeWrcCb2ss4WmB0vJQNdM1NsG5c2tEBKOi0YI3TYNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686676631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=UKSb0ThZcnVNrqrSeSS4LEbZcnEV/yq3xqSOWPk24oE=; b=edPcE07xNz5ZvQ6emtagoSRyB9OQsSfTjvUuaVBJtxTWKt4aZQWTYP7lhA4E5DY49JhzPIzpnnwF5Vlbjo///gFeWe7vSDL+T3y+JiikESP4LTF5QiOhcDaOA9BYqX6pq6iWFqRNPxIcYcKCe2Z1kUmL6sNQCIkFoznhUmkOtXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1686676631; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=UKSb0ThZcnVNrqrSeSS4LEbZcnEV/yq3xqSOWPk24oE=; b=IZfOyOQol/sZZsLldaT9J02YcIrVE5+kTwhPF0q23W8i3v/OoJUmPTV8uy79ipiM lMSkPAJHeoYYU/JeUR9ydr7Qo4DfFvDTOgc06mMBg9DxYuE96+rPccgBBBWcQS2ZxlM U4brMNIUNegE6x7Y8/kcFM1IwhgLTc18LeC72IWc= Received: from [192.168.1.248] (178-147-169-233.haap.dm.cosmote.net [178.147.169.233]) by mx.zohomail.com with SMTPS id 168667662928564.21626010639807; Tue, 13 Jun 2023 10:17:09 -0700 (PDT) Message-ID: Date: Tue, 13 Jun 2023 20:16:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH net v4 2/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530 Content-Language: en-US To: "Russell King (Oracle)" Cc: Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "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 References: <20230612075945.16330-1-arinc.unal@arinc9.com> <20230612075945.16330-3-arinc.unal@arinc9.com> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 13.06.2023 00:09, Russell King (Oracle) wrote: > On Mon, Jun 12, 2023 at 10:59:40AM +0300, arinc9.unal@gmail.com wrote: >> From: Arınç ÜNAL >> >> The CPU_PORT bits represent the CPU port to trap frames to for the MT7530 >> switch. This switch traps frames received from a user port to the CPU port >> set on the CPU_PORT bits, regardless of the affinity of the user port from >> which the frames are received. > > I think: > > "On the MT7530, the CPU_PORT() field indicates which CPU port to trap > frames to, regardless of the affinity of the inbound user port." > > covers everything necessary in the first paragraph? Sorry to be a pain > about this, but commit logs should be understandable. Sounds good to me. > >> When multiple CPU ports are being used, the trapped frames won't be >> received when the DSA conduit interface, which the frames are supposed to >> be trapped to, is down because it's not affine to any user port. This >> requires the DSA conduit interface to be manually set up for the trapped >> frames to be received. > > "When multiple CPU ports are in use, if the DSA conduit interface is > down, trapped frames won't be passed to the conduit interface." Ok. > >> To fix this, implement ds->ops->master_state_change() on this subdriver and >> set the CPU_PORT bits to the CPU port which the DSA conduit interface its > > ... "to the first CPU port" - isn't that what the code is doing with > __ffs(priv->active_cpu_ports)? You're giving priority to the lowest > numbered port, and I think that should be stated in the commit message. Will do. Arınç