From patchwork Tue Apr 24 15:40:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10360313 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 533A660225 for ; Tue, 24 Apr 2018 15:41:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4125B28F67 for ; Tue, 24 Apr 2018 15:41:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FDAD28EC4; Tue, 24 Apr 2018 15:41:31 +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 41EB728F4A for ; Tue, 24 Apr 2018 15:40:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40Vnbm3n1NzF1Rl for ; Wed, 25 Apr 2018 01:40:52 +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="nzWcH0Sx"; 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=idosch@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="nzWcH0Sx"; 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 40Vnbh4yYZzF1RV for ; Wed, 25 Apr 2018 01:40:47 +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=xVKEYNR36yqAZprfqu6s0D6mcJZDDd+YGjRLLcZRTJ4=; b=nzWcH0SxezSwGKqDWaoaI8EdhM+NqxnID1kz8FmGP/XOkx0ySoksOVyui0c6Emh7ROcqo+zsGSNzvKDLZEx6Be6uTQ+GealkH/ThkQwjvk5JcnFRMkgtP4R4U+ADhktzbiiYglOZcDKeG+JsiG83vikN2YYxFjqlbl8BbzQ9eVQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by AM4PR0501MB2322.eurprd05.prod.outlook.com (2603:10a6:200:53::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.13; Tue, 24 Apr 2018 15:40:40 +0000 From: Ido Schimmel To: linux-mlxsw@lists.ozlabs.org, linux-internal@mellanox.com Subject: [PATCH net internal] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list Date: Tue, 24 Apr 2018 18:40:17 +0300 Message-Id: <20180424154017.16856-1-idosch@mellanox.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: PR0P264CA0047.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1::35) To AM4PR0501MB2322.eurprd05.prod.outlook.com (2603:10a6:200:53::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0501MB2322; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2322; 3:HY3AqH9yHHsUD9UtWW7TsKUhq/6u6RFle+MkyoB2OXhNd8UX3Skl3yegA5kcdOPsFm1DjSIIyrvR+C3jp1Znm/D0iCoTJCq2+xQfzUS5YAicD1lKwFUHqaTuHbBm7t70zeRO7/MEf7lyrhJw0dCRL7I/R8/uqF215uwd3lzN98r167hBNTb8vozR7+jPN8+HnUHnsHhhuS5Za1+vpN6ZHg44E42E4T157AcxdT+9QbyXrQEaWKP4kdhGof5FmSm3; 25:/zpzQ8zdd6YMis1iKgrmxRSbBIKeJWTNXURW8WkXf/Q51AbVhan4/W7PhjCflPmAkW1FL3CfDbem/caVEjYoYc+83/jWpx1JO5wgh03hh1+icdcAy4RCSAxoKLalRr8dHgPUyAyytHkkinBPfSeypBNZIqf3QE0rbTY4C/dWPyYt/qCxcpLhTFVRW5XBfqRCN6Rpp2lJ9xDDSWbszdE4sD8QD2NnIVK0FfLxkkb2mIcnFSVUr2sECEPfbOZcSXvxsYPpcAZJXzFohla6lXDZZvQlfNmMAoExB9yzStO5UoCFwp1RpA3n6xyYjyIgRX9TLlYzQxaR9V1Zr/V2sh3Krw==; 31:mzDekoqv/v4L7GgDWTICzoA3f9gj/8+doV5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/Wmh9bnRdoP+yYH3k99cyKlCUBTIF3i5K51avXo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(198206253151910); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR0501MB2322; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2322; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(376002)(346002)(366004)(39860400002)(396003)(199004)(189003)(53416004)(5660300001)(478600001)(2906002)(16586007)(50226002)(105586002)(3846002)(68736007)(6116002)(59450400001)(6506007)(386003)(25786009)(52116002)(51416003)(4326008)(48376002)(1076002)(36756003)(186003)(7736002)(47776003)(305945005)(16526019)(26005)(6486002)(476003)(956004)(2616005)(8676002)(6512007)(6666003)(6636002)(106356001)(316002)(81156014)(107886003)(81166006)(97736004)(53936002)(66066001)(8936002)(86362001)(486006)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2322; H:splinter.mtl.com; 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; AM4PR0501MB2322; 23:q5jf4Ra8kmiln4t942YIHlNIyu24h/8HYMTHpum?= =?us-ascii?Q?j4px3sXKcylgKXPOXOSIWxUHyqD9oT6LtFYLjYE1d5JVOtLSFVEHXo/FjPN1?= =?us-ascii?Q?PkkBQZG1NFx+y5ZZRXqpPZYIUzKstEFJkeCOOShscUqLGLSyDlvqbc9+YZ2g?= =?us-ascii?Q?+wyf4olT6FhHvhQURhgPF8bi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KFCCWwb+l2Oa6u+w=; 24:Jzba5m0uhKbBK3bmAPFzdNd0A/bUF8ET807yjOogpXNNJwj0X/RCLJIm2MtjBRhP/9PRhXcruXbXY2cb6JPPpIIGRqFqcVXa5QSzbymUXxk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2322; 7:thHKT5XOSJyqqspX5KKRAX2vFV98POn4SsFjIy0c19d2TlzY38ZuJcOW4ikzuHbzeZn2cDoKZVzKTSggsKdvts1AzvWY7W2deRVn+iE7CUwhPKuQuYX7Zx/r0+vEvk2iKhHWFeTFV25gh0Lai4iKDZpdbXRBWmttica5erlCvoUHoKOZEADsn2ZBXfLNyo56FTp9IqcBDvxXDv9l/HqcNpPBK9Kh3iNrH1rxft6gEy41Ab0ru1NfNMRGNsnZq5TG X-MS-Office365-Filtering-Correlation-Id: 99fdcfac-4904-4a14-0b93-08d5a9f9bbca X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 15:40:40.0620 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99fdcfac-4904-4a14-0b93-08d5a9f9bbca X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2322 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: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org Sender: "Linux-mlxsw" X-Virus-Scanned: ClamAV using ClamSMTP When IGMP snooping is enabled on a bridge, traffic forwarded by an MDB entry should be sent to both ports member in the MDB's ports list and mrouter ports. In case a port needs to be removed from an MDB's ports list, but this port is also configured as an mrouter port, then do not update the device so that it will continue to forward traffic through that port. Fix a copy-paste error that checked that IGMP snooping is enabled twice instead of checking the port's mrouter state. Fixes: ded711c87a04 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes") Signed-off-by: Ido Schimmel Reported-by: Colin King Reviewed-by: Nogah Frankel --- Nogah, please review. --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index c11c9a635866..4ed01182a82c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -1718,13 +1718,11 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port, struct net_device *dev = mlxsw_sp_port->dev; int err; - if (bridge_port->bridge_device->multicast_enabled) { - if (bridge_port->bridge_device->multicast_enabled) { - err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, - false); - if (err) - netdev_err(dev, "Unable to remove port from SMID\n"); - } + if (bridge_port->bridge_device->multicast_enabled && + !bridge_port->mrouter) { + err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false); + if (err) + netdev_err(dev, "Unable to remove port from SMID\n"); } err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);