From patchwork Wed Apr 25 14:08:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10363287 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC7D2601D3 for ; Wed, 25 Apr 2018 14:08:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCF0A289E3 for ; Wed, 25 Apr 2018 14:08:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1496289F5; Wed, 25 Apr 2018 14:08:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00D59289E3 for ; Wed, 25 Apr 2018 14:08:22 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40WMVY0w15zF24j for ; Thu, 26 Apr 2018 00:08:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="f3Gfxx1X"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.0.80; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="f3Gfxx1X"; dkim-atps=neutral Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00080.outbound.protection.outlook.com [40.107.0.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40WMVQ5HW5zDrDT for ; Thu, 26 Apr 2018 00:08:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t6ghBfV8UCxjWBza6a6YNV2465ZcXIWTcfbjjuuBzK0=; b=f3Gfxx1XScvCnzjJDUAdDC64ZXzLJPAQ6V/vlg9ZJuHTWkUd3mw4ZtEeLvq6wNpLCTsZbRTTcArngWANGUzrVMWwV3Y58AMHea6iDLn9vG0NgrwFTlH+uhWDx8Xi2eQ7EvPw5B1WYqsUL480b9Rf+5tnisHJDBD6h+NLEeP67O8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.177.127.115) by VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Wed, 25 Apr 2018 14:08:08 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw v3 5/6] mlxsw: Respin SPAN on switchdev events In-Reply-To: References: Message-Id: Date: Wed, 25 Apr 2018 16:08:03 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [89.177.127.115] X-ClientProxiedBy: DB6PR1001CA0042.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::28) To VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4191; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 3:cMaWRnlPTEQt/V+otSU6tnC7vOWEdN96EUU6+K0WcMQNkIPP5Ctgnw4w4KrE3EXgkLxZW+9kTEhi9Xngvt/ntQZn5Wpo+Wxq81P5BtzLJFZlt0L61QuE4cEqWURmdCXZOmJt2AsVcu3k0UZQLw1iADFIrgeqn9Z9gMwyo2N3WZsl7s22KUNoB0/JH+sSxKHNSWOSUXrXRT53PTablpC3Hr74dEeFawV4jdJlN7EC1JQTIROwyo5LFGd8/Uwl1H1Q; 25:xu3qf6wnikC7d0fDfZa6JmkCa2HB/TODHSNsk79SfPSSjSVe46Y0zjgHrwtafFTNIG+NM1+S7cef9f/UPbyz+JOEzBSJg3kwY7I/EEm5Q4OwYt8Ru8VFLnd0SyPOlTc0eSETUanXi4/yxR0ymKlsTG0eaUUaLjARN330hPXAJhn6QaVKyGb8s94/ayAd0cc593qJ4nkkLdRHcquo66fBDBZbgaBFjRdxOlxVjEB+cg3A147WMukoEBGQiE+u+1gOEwqETEXDVGt+IBEKsbq7pMgMqhMLie+LeNvFqBPXR39mxZouURJ6OhimiBFYRJEismm/QAW/QW6+xDQs5rf3xQ==; 31:T2ZWha3pmVg57N/jZFMR1DuNLbk1AeM2dyTlVEAhd4RIkycf3fL1y0Omuc6dlqGXD8yfxrVuaajb9J2H5JCXArUjbgGMPY4kGdG40RTLUum9ZR08KernGD5fikbUHA/joAJezxxdDEEb5HL8HURft7mX88VkfvGUZ9S/jUDzsGteK5i+WtnM40ZyHFQ4jH+WNoc2d+rfaesJ47NKTPZuXgFJMsWrpUfPGKtTvJc0Vos= X-MS-TrafficTypeDiagnostic: VI1PR05MB4191: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 20:KqcB1vrKmHJJ4ImTbnoLEyDBgx08sp33qKOjpJsr1L1+pEWxcRo+Xsik0F5gQ/pZnKYK7aKbaaakPoz47qws+ajusLx2JEYvk0o0Dp01rsUaACY4SOpmMmqbwXBX/kTMyt9E4O/m9TbCeEtoyZwJTcBEHAik8xVPrVpBAJ16n9kkZEWGQ4ZxaVV+QQbFfYVgS1X/u9CtOEY2yss7rxBw2Rw8aRV7s1gaCpz9HtExubgTGAnTe4G4FiYxKSSP/Iz641HiZFrJMrQDYgRP7rQd4pyvlS5PAsv1gKCfup0fEhTtFwx8oID0tpnrCXkRN01aTNnxSLWEdjDrLlfnFGsx1FoNFzdJg40aVo47lu7mIN1s6kH2kPN7oSLQIlTUhfod6GbrOYTPKnDypRe21SXoXcpJ5+W8tem1/rrjRizDk1GWPgglLvty3yKLSVhaHQ/3Ixfls3DKlTM7Nep9AL7GWdhVPsIkhH0kPWpKP/9mfF7kVhU+B1otXIh6kGzxLKcZ; 4:xKAWqzWW98R6/e6cHFwd1judPbeRiJ5ETA5adU2u4qqnliE0+4+SyZ8hpgZNTReMgZCppWWEJaNrA24zo3ycCkFywzBBodbDvQOMw+4KjPFiuX6Y+wfLkKX9K7y8zUtdVgF2e227O0D1uBohI/tyTkkv6b7QpJ/VtBwyunYwTWDu/+gRtkOd7P0N2hKKBYdGJQGSpBuSkyTjJM2gTuH0WzHUOsbMxJH+m+LsU73g1M2yTof5hS2Q4uqI04cxNZsGU7feLdwSPxtpLjS56RSwXA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR05MB4191; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4191; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(81156014)(6116002)(7736002)(3846002)(956004)(6496006)(4326008)(25786009)(2906002)(478600001)(2351001)(16526019)(11346002)(386003)(446003)(16586007)(47776003)(59450400001)(81166006)(316002)(6486002)(76176011)(58126008)(52116002)(51416003)(36756003)(68736007)(8936002)(8676002)(118296001)(6916009)(97736004)(305945005)(105586002)(2616005)(106356001)(26005)(5660300001)(476003)(66066001)(53936002)(107886003)(486006)(86362001)(50466002)(48376002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4191; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB4191; 23:oZfeH6/cdGIHkMrdYWHjkugu9ClfV7lEIA5d08UBz?= =?us-ascii?Q?YgTKMO/EY4jlCs+yEZN2UpGOqc8CH9S0SU2AZXWR4mhb1O6YF+BvTlidzLor?= =?us-ascii?Q?yh1UURONKTtLuh/xrNJrH6Yh0pi9DoJAxe9cGE2neMxQkOXL5f/SedkfhQkH?= =?us-ascii?Q?LK5+3bDvrGgzE1cwuKKgNdJlViAS8s3mijUUtOeWVLxYuFwXM1QrWukyYSBM?= =?us-ascii?Q?Y5c6VNVnAel1iBybekxknyf0C+X/Ry550E9/CNbJiWsIcF4RjSJ3NpP6eV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OBbYym69/IraEFKH6NnF0jxEUePQnxmgPHysPBj6wVMhBQlmNm8c0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 7:mgxz1SWJvrMZAnNOjcBQGMHgw93ihgJo9Z7bzdtEcPpNr/ooe9bcEb0qIfhzp4OnPyq29ezl6rweuaf4veWUfLa9+2vqfgmSxtNa9oWDvFaFF2jvPkkJc14RRQwbQUuBbngYuu3FGaZhRgOgFS48I2koniBvIApQXIXX14gMAtM+lTsQlHE6zv1GuYN1kGeE5JMedVX+TEAJiblU9UQ7VBnt9nOL98d+nWyHXmihSdUCPhsJO+oJP70yLvP+VbBs X-MS-Office365-Filtering-Correlation-Id: 93d882eb-aa41-48d4-b8a5-08d5aab5f917 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 14:08:08.3614 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93d882eb-aa41-48d4-b8a5-08d5aab5f917 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4191 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-internal@mellanox.com Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org Sender: "Linux-mlxsw" X-Virus-Scanned: ClamAV using ClamSMTP Changes to switchdev artifact can make a SPAN entry offloadable or unoffloadable. To that end: - Listen to SWITCHDEV_FDB_*_TO_BRIDGE notifications in addition to the *_TO_DEVICE ones, to catch whatever activity is sent to the bridge (likely by mlxsw itself). On each FDB notification, respin SPAN to reconcile it with the FDB changes. - Also respin on switchdev port attribute changes (which currently covers changes to STP state of ports) and port object additions and removals. Signed-off-by: Petr Machata --- Notes: Changes from v2 to v3: - In mlxsw_sp_port_obj_add(), instead of calling respin right away, schedule it as work item so that the parms hooks see the updated bridge state. Changes from v1 to v2: - In mlxsw_sp_switchdev_event_work(), add SWITCHDEV_FDB_*_TO_BRIDGE with a do-nothing handler to make it clear that these events expected. - Don't respin unless the switchdev event in question is a commit (as opposed to prepare). - Respin in mlxsw_sp_port_obj_add() and mlxsw_sp_port_obj_del(). .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 63 ++++++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index db4aea0..1af99fe 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -49,6 +49,7 @@ #include #include +#include "spectrum_span.h" #include "spectrum_router.h" #include "spectrum_switchdev.h" #include "spectrum.h" @@ -923,6 +924,9 @@ static int mlxsw_sp_port_attr_set(struct net_device *dev, break; } + if (switchdev_trans_ph_commit(trans)) + mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp); + return err; } @@ -1647,18 +1651,57 @@ mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port, } } +struct mlxsw_sp_span_respin_work { + struct work_struct work; + struct mlxsw_sp *mlxsw_sp; +}; + +static void mlxsw_sp_span_respin_work(struct work_struct *work) +{ + struct mlxsw_sp_span_respin_work *respin_work = + container_of(work, struct mlxsw_sp_span_respin_work, work); + + rtnl_lock(); + mlxsw_sp_span_respin(respin_work->mlxsw_sp); + rtnl_unlock(); + kfree(respin_work); +} + +static void mlxsw_sp_span_respin_schedule(struct mlxsw_sp *mlxsw_sp) +{ + struct mlxsw_sp_span_respin_work *respin_work; + + respin_work = kzalloc(sizeof(*respin_work), GFP_ATOMIC); + if (!respin_work) + return; + + INIT_WORK(&respin_work->work, mlxsw_sp_span_respin_work); + respin_work->mlxsw_sp = mlxsw_sp; + + mlxsw_core_schedule_work(&respin_work->work); +} + static int mlxsw_sp_port_obj_add(struct net_device *dev, const struct switchdev_obj *obj, struct switchdev_trans *trans) { struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); + const struct switchdev_obj_port_vlan *vlan; int err = 0; switch (obj->id) { case SWITCHDEV_OBJ_ID_PORT_VLAN: - err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, - SWITCHDEV_OBJ_PORT_VLAN(obj), - trans); + vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); + err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans); + + if (switchdev_trans_ph_commit(trans)) { + /* The event is emitted before the changes are actually + * applied to the bridge. Therefore schedule the respin + * call for later, so that the respin logic sees the + * updated bridge state. + */ + mlxsw_sp_span_respin_schedule(mlxsw_sp_port->mlxsw_sp); + } break; case SWITCHDEV_OBJ_ID_PORT_MDB: err = mlxsw_sp_port_mdb_add(mlxsw_sp_port, @@ -1809,6 +1852,8 @@ static int mlxsw_sp_port_obj_del(struct net_device *dev, break; } + mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp); + return err; } @@ -2236,8 +2281,16 @@ static void mlxsw_sp_switchdev_event_work(struct work_struct *work) fdb_info = &switchdev_work->fdb_info; mlxsw_sp_port_fdb_set(mlxsw_sp_port, fdb_info, false); break; + case SWITCHDEV_FDB_ADD_TO_BRIDGE: /* fall through */ + case SWITCHDEV_FDB_DEL_TO_BRIDGE: + /* These events are only used to potentially update an existing + * SPAN mirror. + */ + break; } + mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp); + out: rtnl_unlock(); kfree(switchdev_work->fdb_info.addr); @@ -2266,7 +2319,9 @@ static int mlxsw_sp_switchdev_event(struct notifier_block *unused, switch (event) { case SWITCHDEV_FDB_ADD_TO_DEVICE: /* fall through */ - case SWITCHDEV_FDB_DEL_TO_DEVICE: + case SWITCHDEV_FDB_DEL_TO_DEVICE: /* fall through */ + case SWITCHDEV_FDB_ADD_TO_BRIDGE: /* fall through */ + case SWITCHDEV_FDB_DEL_TO_BRIDGE: memcpy(&switchdev_work->fdb_info, ptr, sizeof(switchdev_work->fdb_info)); switchdev_work->fdb_info.addr = kzalloc(ETH_ALEN, GFP_ATOMIC);