From patchwork Sun Dec 13 14:07:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 11970805 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4514C1B0E3 for ; Sun, 13 Dec 2020 14:12:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FDF622D2C for ; Sun, 13 Dec 2020 14:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395505AbgLMOJa (ORCPT ); Sun, 13 Dec 2020 09:09:30 -0500 Received: from mail-am6eur05on2065.outbound.protection.outlook.com ([40.107.22.65]:33084 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2395337AbgLMOJA (ORCPT ); Sun, 13 Dec 2020 09:09:00 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BlTVdD1d4kJ8eAhtTZR8fCTiQPH90VuAxFH4i4qP4APCjxaLkrxsKqhHoapsBeKF3sVHr/jI5Obfho04rgx0up5uw76aukZfklRHI/YsRjraromOfYlYo595ylqc8X55WWi3zyKCUmbMsjeJ4HeHHaBdM9sg2MeSfkas5XX+A3wMpw8480qmZyw83l67CjQUsVYA7+ovBiFkgv9Pb9kgx5+Vv9YQanuTW9XT/RlRs9RsPRDfqBEINinVfBFEaTvYtzlilNgK5ghRkBy/solBiD/VSMYcafRVx2vbIOgCyIlaF6InvVfkRdIx+PTB2dYXgOvYTlAyRFvgywDO83O/hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fp5VKzBanPZiLMF4KMu2uBH38U+PHeRxncpXAVmPHw4=; b=FhMqQAtyyjiOHrGe5JuAj1KiYTaGqVCPzBqxtJ7cCnUJuZk/CA7gQUo9Xb0Om9JD6G2q7NG+oNFfSlsBKA18RBkd92diWY+I1jAMADJTyxQ60g9iHPM97U96MBD/veW+WUAHUaZ0E18xKt+A2RTwG+l0xTQTLInPXS2hMH6WFMKqaFOtcgBoYGKOl2eisXxmQLzqydNRZoCyRFYqX+kKHEO7abKvjHzwYyZ6MZYwXnCwV74MSfT8VdtRz050WjQ6t9K+Pof9yqpjv393F86kuqjPeMmH9EFc50iNI8spUWSxSVGE+RFrllGaLqIGln3iz1fWRU0XuU5oDg3ODk7bIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fp5VKzBanPZiLMF4KMu2uBH38U+PHeRxncpXAVmPHw4=; b=dpFZ7L17oVirKNnds8so1Fhkhjzu2yHQceR7WOUWYpZyF8CbXSSWK5v8g/vDpDFvnz09MU1qrpBwj4T+TisCzwsszzCdgiiT/GXyZQE/4WY+SusvlJGWxIpMohhjx3VdjEwSpRwqrQiuWyckLX93ft9uWzD9onAgIbRn6V1d0M4= Authentication-Results: lunn.ch; dkim=none (message not signed) header.d=none;lunn.ch; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5696.eurprd04.prod.outlook.com (2603:10a6:803:e7::13) by VE1PR04MB7341.eurprd04.prod.outlook.com (2603:10a6:800:1a6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.18; Sun, 13 Dec 2020 14:07:37 +0000 Received: from VI1PR04MB5696.eurprd04.prod.outlook.com ([fe80::2dd6:8dc:2da7:ad84]) by VI1PR04MB5696.eurprd04.prod.outlook.com ([fe80::2dd6:8dc:2da7:ad84%5]) with mapi id 15.20.3654.020; Sun, 13 Dec 2020 14:07:37 +0000 From: Vladimir Oltean To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" Cc: DENG Qingfang , Tobias Waldekranz , Marek Behun , Russell King - ARM Linux admin , Alexandra Winter , Jiri Pirko , Ido Schimmel , Claudiu Manoil , UNGLinuxDriver@microchip.com Subject: [PATCH v3 net-next 2/7] net: dsa: be louder when a non-legacy FDB operation fails Date: Sun, 13 Dec 2020 16:07:05 +0200 Message-Id: <20201213140710.1198050-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201213140710.1198050-1-vladimir.oltean@nxp.com> References: <20201213140710.1198050-1-vladimir.oltean@nxp.com> X-Originating-IP: [188.25.2.120] X-ClientProxiedBy: VI1PR08CA0235.eurprd08.prod.outlook.com (2603:10a6:802:15::44) To VI1PR04MB5696.eurprd04.prod.outlook.com (2603:10a6:803:e7::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (188.25.2.120) by VI1PR08CA0235.eurprd08.prod.outlook.com (2603:10a6:802:15::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Sun, 13 Dec 2020 14:07:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e4de9cc3-5feb-47ef-4186-08d89f707285 X-MS-TrafficTypeDiagnostic: VE1PR04MB7341: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MMvV0nDcvEJGt9ePdfWtF/zItHY4PrJQLzlIB9K2O2oughnUHvtC8lgPrxb3Dq0XE3y+KDCk8XvCCWp/JGK88eqJ5R22YyJlNJOegwlvR81G0j79Nnr2DOdTein8Nix1Ovysmmt8TZhWmoiYHyXa92SLvGUtNUU7wOvLdfP2afahmVuOgSxRfEWp699/Yzq4bWnDtGVOsJtvXy8QdlUT8tQx2Vp+L7J5Inns3YQb9d0rVG2QLMwP/e8ApZXLXZcI0zWWXtzNmWQ4w9/hMhv/LsJ2NbASlRU21i1jUEQggvGK1TIZ+VF6yGOlgtLCZJ0NInrPCten+EWCYUnNHI+lCA5sJr6ZoaeTH6ZgIXnb6J3+VuU9EyghLDYVPEjqgCh+vXfAKWIW+IiSY3n6RysghA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5696.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(396003)(136003)(376002)(39850400004)(478600001)(52116002)(7416002)(5660300002)(1076003)(6666004)(316002)(16526019)(186003)(86362001)(83380400001)(8676002)(26005)(6506007)(44832011)(2616005)(956004)(69590400008)(2906002)(4326008)(8936002)(921005)(66556008)(66946007)(66476007)(54906003)(6486002)(110136005)(36756003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tJRiuSRAtTXopL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5696.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2020 14:07:37.8554 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: e4de9cc3-5feb-47ef-4186-08d89f707285 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TNc9YrK6C/Wg0XcdMghzgLNKPiw/h1y1Kqv3Wy37tzXJ0hT6gkNukdv9wVm5DuouLFaAUi5Fpd6K5wP551BrEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7341 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The dev_close() call was added in commit c9eb3e0f8701 ("net: dsa: Add support for learning FDB through notification") "to indicate inconsistent situation" when we could not delete an FDB entry from the port. bridge fdb del d8:58:d7:00:ca:6d dev swp0 self master It is a bit drastic and at the same time not helpful if the above fails to only print with netdev_dbg log level, but on the other hand to bring the interface down. So increase the verbosity of the error message, and drop dev_close(). Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn --- Changes in v3: Patch is new. net/dsa/slave.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 4a0498bf6c65..d5d389300124 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -2072,7 +2072,9 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work) err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid); if (err) { - netdev_dbg(dev, "fdb add failed err=%d\n", err); + netdev_err(dev, + "failed to add %pM vid %d to fdb: %d\n", + fdb_info->addr, fdb_info->vid, err); break; } fdb_info->offloaded = true; @@ -2087,9 +2089,11 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work) err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid); if (err) { - netdev_dbg(dev, "fdb del failed err=%d\n", err); - dev_close(dev); + netdev_err(dev, + "failed to delete %pM vid %d from fdb: %d\n", + fdb_info->addr, fdb_info->vid, err); } + break; } rtnl_unlock();