Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp163316rwd; Wed, 14 Jun 2023 13:58:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5orle+HnSaGDT3cvlZtIeBjVf4AA9JFnltG1w7PNyZZBX9UPq0PRTa0Dt+w/1/5ETvc4xG X-Received: by 2002:a05:6a21:9986:b0:10b:855b:a39f with SMTP id ve6-20020a056a21998600b0010b855ba39fmr3315465pzb.44.1686776336593; Wed, 14 Jun 2023 13:58:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686776336; cv=pass; d=google.com; s=arc-20160816; b=AMDMDTgcWDvj2JzBRaWSeUOj0CRDAZyQsnjUkDbdBNHUSDkWtW47hvbiXY9lqHTMlh ZveJ+UURYrGtzLkoWQkRWJb3dSiu65c5cC0u4W+7FRyt2rKCsAzVqvJ8qtLSg7Uky7P7 /Ku4EbFXeXuTiYgmFItUxZFeeQkXO1LsE1BoXWKtecVf0szEIvqsTsNViYvXQoIbIZJu ipV0dcJmVEZwFbvHkOQIqJTrJb6Hsvbe2rREOug/QOCcoQgBnrxhISHB0DXRpNUy/kaY f6y5AS0fmJR5xPDMegl0AwGdzca9KjHFIeZGb4pLIIuASS5Uy8moM4ROh2dx1whN02MJ t9Ig== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=41A9vyE5LhQe+wPF1+Q5kPhov+yOmbsk22ksW42fW7g=; b=i0oDjGSOFB7YmE8ZJLH/sMQn+Q8E98D6rZAWvDej5SeB0VB0gIDXv0pSh9wbOl5D0Q q9gWPq3+/tM/IbXNUUH2tE7fsTf10uIGpLwEteGSEmfP+qB3XyjFcM2U0cutbrBF9/be YHOtBTbPrfkGhCzVRyBdexlaDzwLlOuTr97ffjgWVDn0JAx9THG89+falxvekl2mXbYu OcxSIbPAM2NwM+v1VpM2JYSKSjvBYA8ZGCMy6okrxrxl6XlG6by6PduYFk5BHMqHFQio +eeQCRfqBuXILaydtGd3iT226XKjn0a+ZshqSJ/SUllHK5YLAjcXJFxnMumzKMmaHtQh 1saA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=WBPRZeJ6; 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 w17-20020aa79a11000000b0065296ab4747si11340787pfj.193.2023.06.14.13.58.44; Wed, 14 Jun 2023 13:58:56 -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=WBPRZeJ6; 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 S235356AbjFNUtq (ORCPT + 99 others); Wed, 14 Jun 2023 16:49:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjFNUtp (ORCPT ); Wed, 14 Jun 2023 16:49:45 -0400 Received: from sender3-op-o19.zoho.com (sender3-op-o19.zoho.com [136.143.184.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 789EA2128; Wed, 14 Jun 2023 13:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686775730; cv=none; d=zohomail.com; s=zohoarc; b=kE1/7F46IfoXlMqgIsO/Z+JN+JGKtwmqFJux1FEPvbaOfIy0pQJ5OJ3eZqZgHS2I9DbhngLSckNeBYJeFJlPmTbwO/iWCX7srNA+c0i2d33TSATwgGZyPpg1ZqgVK5/ge3Cqa1i7VRFQU89D2TT72lwMv/GbGhl364kMQNRY2ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686775730; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=41A9vyE5LhQe+wPF1+Q5kPhov+yOmbsk22ksW42fW7g=; b=gtIlfLbW1gB9FYo5JLIxipuGNmOYhMPavFLBsJpf8LL00agnGwkAoMoatMK1/x1w4JVd0l3XQSvXU3aFN8qVYFZVRJFW3KXVRz76HxP0H7/zW9wxDWoDQVh0aFO5AkIg2NDmX5JGt7OyWCug7KSq7gEF+JMK9Rdf6V3XWP2IHFg= 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=1686775730; 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=41A9vyE5LhQe+wPF1+Q5kPhov+yOmbsk22ksW42fW7g=; b=WBPRZeJ6ZNjdlcjcGpMfJxTH7vJpapJTdMeDZ/FIOuQQuVaS5XIamAwm5U+X5pUk DgCJ2gg7Ru6xCOjrUFyb2hbJbLfM0aY5AAQUTOARz2g1jVBUdS3NntQjRCH6KiEWp/8 5UL2oXYLZ1coCbEWc8yC3bpu/EU5dQxN3W3AWAyI= Received: from [192.168.99.141] (178-147-169-233.haap.dm.cosmote.net [178.147.169.233]) by mx.zohomail.com with SMTPS id 1686775729538978.2563745005754; Wed, 14 Jun 2023 13:48:49 -0700 (PDT) Message-ID: Date: Wed, 14 Jun 2023 23:48:42 +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 5/7] net: dsa: mt7530: fix handling of LLDP frames 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-6-arinc.unal@arinc9.com> Content-Language: en-US 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 14.06.2023 19:35, Russell King (Oracle) wrote: > On Mon, Jun 12, 2023 at 10:59:43AM +0300, arinc9.unal@gmail.com wrote: >> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c >> index e4c169843f2e..8388b058fbe4 100644 >> --- a/drivers/net/dsa/mt7530.c >> +++ b/drivers/net/dsa/mt7530.c >> @@ -2261,7 +2261,11 @@ mt7530_setup(struct dsa_switch *ds) >> >> /* Trap BPDUs to the CPU port */ >> mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, >> - MT753X_BPDU_CPU_ONLY); >> + MT753X_PORT_FW_CPU_ONLY); >> + >> + /* Trap LLDP frames with :0E MAC DA to the CPU port */ >> + mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK, >> + MT753X_R0E_PORT_FW(MT753X_PORT_FW_CPU_ONLY)); >> >> /* Enable and reset MIB counters */ >> mt7530_mib_reset(ds); >> @@ -2364,7 +2368,11 @@ mt7531_setup_common(struct dsa_switch *ds) >> >> /* Trap BPDUs to the CPU port(s) */ >> mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, >> - MT753X_BPDU_CPU_ONLY); >> + MT753X_PORT_FW_CPU_ONLY); >> + >> + /* Trap LLDP frames with :0E MAC DA to the CPU port(s) */ >> + mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK, >> + MT753X_R0E_PORT_FW(MT753X_PORT_FW_CPU_ONLY)); > > Looking at the above two hunks, they look 100% identical. Given that > they are both setting up trapping to the CPU port, maybe they should > be moved into their own common function called from both setup() > functions? Good idea, I shall make a function called something like mt753x_trap_frames() on my net-next series. For this series which is for net, I'd like my patches to fix the issue with as less structural changes as possible. Arınç