[v1,05/26] net: dsa: microchip: ksz8: ksz8_fdb_dump: do not extract ghost entry from empty table
Message ID | 20221128120034.4075562-6-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5613431wrr; Mon, 28 Nov 2022 04:08:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf60vNtNgO/GVB49gI21ZicUvIXheUpHJmeTLNwC/ahqomgMLyuwZwsA+q8dg4XnwQj5O691 X-Received: by 2002:a62:2702:0:b0:572:8766:598b with SMTP id n2-20020a622702000000b005728766598bmr31400404pfn.21.1669637319947; Mon, 28 Nov 2022 04:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669637319; cv=none; d=google.com; s=arc-20160816; b=xlOPDrpqxH8unZoFg8/MaWxK0Sp3VykQP5IfX1AiUoTb0To1ibkfqIxhd8mY3iUfCE 8ppEvWE8fbvy3c0rGzVz6eFxppc333gFF6autbwT0NQFZuJ93tXllZ9s+q0p3vzkBejp fSTNbUEPOaSqs2mjqHaVeAx5IhWrz6NnkN/3ti4GKW9qNe4Bkntx54QHpwOeCgRwJAQD C4qyiJDF2UZtcazBV1n1jD9e/nj4JWZLyNQ34Eb4+bgvdpvDJxCWV9ez3PBaWMU4nAdj eZdfO/4jm3aAAWGPaTM8pxEMcbETUPjgYCaZqeifKYtBVaQ7wzTmZt3pVKwPfQKr0AYW m0IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+KlP2eHyJmoGOpTygtwLYPIoXnCTIyPzdyNnxsG9omA=; b=j+7yh32Sqf8tLO9c58zPHG5Kr+GzlKtDnMNf36CyjZrZ77+2q7itGGcdsENLFW7kj4 uOFQBOPd8j8QiMc9lgbpoN2nAPKHhFEjtcNpBaBOrmsJ3CR4BII5IC6mtlnayuEwXJVf UXrWjg3XTJg1hvEZefpnlGUupGmDU6PMInA5ssmuJrNe6ynUvaWFt3Vh2r8R7TI0RxHy vdpEZp5K47GR7y/gT5pKZUNSxfzAFUE4nCRlVqnOWELfgD0Pvyje4y1mMSksPvqvi0qj BsrFrGnPgaPdylxDJIZl9GxNCvLfbgRuH05X/47RQsz5bIatbaqrSu/AXGKl4N/JrUkm ZBMA== ARC-Authentication-Results: i=1; mx.google.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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i36-20020a635864000000b004541962a9basi11971641pgm.701.2022.11.28.04.08.27; Mon, 28 Nov 2022 04:08:39 -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; 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 S231877AbiK1ME1 (ORCPT <rfc822;gah0developer@gmail.com> + 99 others); Mon, 28 Nov 2022 07:04:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbiK1MAt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 Nov 2022 07:00:49 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 927A418B21 for <linux-kernel@vger.kernel.org>; Mon, 28 Nov 2022 04:00:48 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1ozcoU-0005O2-Di; Mon, 28 Nov 2022 13:00:42 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1ozcoS-000oC9-Qn; Mon, 28 Nov 2022 13:00:41 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1ozcoN-00H6Mz-AI; Mon, 28 Nov 2022 13:00:35 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Woojung Huh <woojung.huh@microchip.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: [PATCH v1 05/26] net: dsa: microchip: ksz8: ksz8_fdb_dump: do not extract ghost entry from empty table Date: Mon, 28 Nov 2022 13:00:13 +0100 Message-Id: <20221128120034.4075562-6-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221128120034.4075562-1-o.rempel@pengutronix.de> References: <20221128120034.4075562-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750741622377227897?= X-GMAIL-MSGID: =?utf-8?q?1750741622377227897?= |
Series |
net: dsa: microchip: stats64, fdb, error
|
|
Commit Message
Oleksij Rempel
Nov. 28, 2022, noon UTC
If the dynamic MAC table is empty, we will still extract one outdated
entry. Fix it by using correct bit offset.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/dsa/microchip/ksz_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 7c28dc1edaa1..afb846c18b57 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -399,7 +399,7 @@ static const u32 ksz8863_masks[] = { [STATIC_MAC_TABLE_OVERRIDE] = BIT(20), [STATIC_MAC_TABLE_FWD_PORTS] = GENMASK(18, 16), [DYNAMIC_MAC_TABLE_ENTRIES_H] = GENMASK(1, 0), - [DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(7), + [DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(2), [DYNAMIC_MAC_TABLE_NOT_READY] = BIT(7), [DYNAMIC_MAC_TABLE_ENTRIES] = GENMASK(31, 24), [DYNAMIC_MAC_TABLE_FID] = GENMASK(19, 16),