From patchwork Sun Dec 13 02:40:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 11970419 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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 C827AC4167B for ; Sun, 13 Dec 2020 02:42:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FB6723106 for ; Sun, 13 Dec 2020 02:42:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727898AbgLMClz (ORCPT ); Sat, 12 Dec 2020 21:41:55 -0500 Received: from mail-eopbgr140078.outbound.protection.outlook.com ([40.107.14.78]:44269 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727663AbgLMClu (ORCPT ); Sat, 12 Dec 2020 21:41:50 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j1pJGT9s8zIvJBmuJiV8gSmwCql0WIf07G/S6qMjnICOoTLbHyDEZJyfpZFLZ2rvrnYALLcHAY1yXt5loVfuvgC488xrq+zkyDkk7Ayfps5bRqxTBt+YbJpQwnlreLEHy4MrnAFVOawwLwx0Hbh4oL4xZOcqFGABjwAJb2rLWwd9bibeauhKKe9Hv2Lr/t1AzSX7XyDTaIpijpntkousYTEB5/RJpRigIEiSz4ge+MiWekDKsurv7f6PdZflJKBHCFd0JdQ5evKKjR68Q9QTYGHs/lU4Q2UtAjCXme2LEHfysqZ6gRfNBwq9R/LSzns8uHxmyq1Y6WztuH18f/7gYg== 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=l+5rd7hxSU1RvLcEtYHVa4mtvgaZoy4+z3dy9/uQ/gE=; b=oFWK8Ol/UPKURkHfSXtgffQRPkqMc48mA1hWTL/6/rhbMhzAG4Qm10fkInERyfopnFhYFz69JmleeKJjx06vH8izs4Pb8V6sbToIPS3S3MIMrqo/FcmMy4Evgl+xJ6LxUAPzMfeQvnnMmBfhBEvtxMgGD1+d0zE67Vi3EkVl3KI5gEdtFZEfMcovXxLsQucU6RwMJKRAT4QjkgYhzDir0X9B3/QRDg+hCO9O7LYdDn934nAMQ1WQZkTqKtt8us/mIgdIGmuIggHK1E5F/TeWyl80brRTPLllCiTm4gvqqZW0TTxpogl0A94Z4qEF62Zv77OsvrUJTafgkDFwBYt5lQ== 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=l+5rd7hxSU1RvLcEtYHVa4mtvgaZoy4+z3dy9/uQ/gE=; b=JVkmiz6J4ikj7q5sP7zhiUM14KjbmVwAHga4YCpfYUc/3TF7KWE05ERl5vvvrvb+kpve58YKM4eU+ubcBk3xGpBtxUhXDjTaEjejs5sAIXzK8pkuwj54rO6/encrN0+gIBXiePiVZhtNJjvRg5vFUUBl7PGUQD4jxj3+6TB0mk4= 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 VI1PR0402MB3407.eurprd04.prod.outlook.com (2603:10a6:803:5::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Sun, 13 Dec 2020 02:41:01 +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 02:41:01 +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 Subject: [PATCH v2 net-next 0/6] Offload software learnt bridge addresses to DSA Date: Sun, 13 Dec 2020 04:40:12 +0200 Message-Id: <20201213024018.772586-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 X-Originating-IP: [188.25.2.120] X-ClientProxiedBy: VI1PR08CA0141.eurprd08.prod.outlook.com (2603:10a6:800:d5::19) 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 VI1PR08CA0141.eurprd08.prod.outlook.com (2603:10a6:800:d5::19) 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 02:41:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b8eb9fff-9f1c-42e7-012b-08d89f10879e X-MS-TrafficTypeDiagnostic: VI1PR0402MB3407: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k6BUUb9Zl1fmBjMYw/ey+44BXUyNmPDVDLBSjnTTPK4WZ3HBRjCPuyd/N45N83PNS5Zv4eqq5pfrV5SU9fEI7vu4jNHO8A0dndWikKLLJcqcAvwtl3NRiJ09swSR9QgSQONnItMMUX+Wv4XWQFKACsL+IHlv0kSRucTWW0KNzciSp/3xLWvxVyEMAQRYJJ1Z39jiO0km/feLgtUMZWM1CrF/kt5FPvbdD2QRLrEwDO1zEv/VkG/XGDbGIRy+nD8dUcKyp51IcW1hayvM1Md/HC5NXT9+DrA/HplFZYa8opBkXMo84y5KCMP3/PFhgps1jBM9ZB76Sq6DopQOoEQx0tbVL3zz1Lmyim+6DFemi8qDFeNvdlfnKSu5wa6G1Uwvht+PqnZKzRsTTnELzihugYW/TRtPVVzVe8xmUwOiKzWiONhTGGSMQj1jD6a+MwXqO/4wmjJ8lw/x0iSPfsB9KuPRHWzyuiMImraP1yz+vgs= 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)(136003)(366004)(346002)(39850400004)(396003)(376002)(52116002)(6512007)(66556008)(8676002)(316002)(478600001)(16526019)(966005)(44832011)(5660300002)(6506007)(6486002)(1076003)(7416002)(110136005)(26005)(921005)(2616005)(86362001)(54906003)(66946007)(2906002)(36756003)(8936002)(186003)(66476007)(4326008)(83380400001)(956004)(69590400008)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSp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PR04MB5696.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2020 02:41:01.5897 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: b8eb9fff-9f1c-42e7-012b-08d89f10879e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JaTdJMUKvzjTMG9mbhTv928RYelR/phGYaP7EC3xTkvw5RyEEC6nuxTjrvG+L4UqVlFLNjmgcamLccDgxqca4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3407 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This small series tries to make DSA behave a bit more sanely when bridged with "foreign" (non-DSA) interfaces. When a station A connected to a DSA switch port needs to talk to another station B connected to a non-DSA port through the Linux bridge, DSA must explicitly add a route for station B towards its CPU port. It cannot rely on hardware address learning for that. Initial RFC was posted here: https://www.spinics.net/lists/netdev/msg698169.html Vladimir Oltean (6): net: bridge: notify switchdev of disappearance of old FDB entry upon migration net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work net: dsa: move switchdev event implementation under the same switch/case statement net: dsa: exit early in dsa_slave_switchdev_event if we can't program the FDB net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors net: dsa: ocelot: request DSA to fix up lack of address learning on CPU port drivers/net/dsa/ocelot/felix.c | 1 + include/net/dsa.h | 5 + net/bridge/br_fdb.c | 1 + net/dsa/dsa_priv.h | 12 +++ net/dsa/slave.c | 167 +++++++++++++++++++++------------ 5 files changed, 124 insertions(+), 62 deletions(-)