From patchwork Wed May 23 01:39:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10420011 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 23ED6600CC for ; Wed, 23 May 2018 01:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13EAC28E68 for ; Wed, 23 May 2018 01:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 088D928ED3; Wed, 23 May 2018 01:40:54 +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 D447F28ECE for ; Wed, 23 May 2018 01:40:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rFb60FMdzDrbk for ; Wed, 23 May 2018 11:40:50 +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="qwgesXHP"; 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=104.47.2.50; helo=eur01-db5-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="qwgesXHP"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0050.outbound.protection.outlook.com [104.47.2.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rFb02VwNzDrTs for ; Wed, 23 May 2018 11:40:44 +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:X-MS-Exchange-SenderADCheck; bh=nwRIs/WRFjlfVKjwsVMMoB51aDK9gfmgNstKydJQxuU=; b=qwgesXHPBaAkqgYe9JHnzqfIReQz8Kdl8SLV90jVlzGdW9EWsttyhbEF2TCNuzQxbIn3w1joC52QZ7k14ar5phfdFId66159M6MMX2N9tAPA8b9CwREYqB94KGzEVEpe3so+qWFbNuZSq16LrZc7DVUxcFicGlOzFkJ/BXmpBvI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.176.83.59) by AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Wed, 23 May 2018 01:40:37 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events In-Reply-To: References: Message-Id: <00331f2581ffba71a0822d2688233b0d792a3b98.1527039181.git.petrm@mellanox.com> Date: Wed, 23 May 2018 03:39:48 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [89.176.83.59] X-ClientProxiedBy: LO2P265CA0205.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::25) To AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4183; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 3:zIgQQctZ2GuZS1CDjsFtfp7LzT86Yk0PJ0I82rCxwH7WKHk5JDUZpoKYnW6ZAYz93LWUEfot77S0OAxUejwsWJ1IpzQ4FOplGeLLytPMyPlPW67uH/WXmFw4gihtQ1izjkWO6AG089knLInoZGa1eLmCy49kLBzuqP7h+Na1Wk9lVYjBspyam0mrmxntUgFDcK7xa9mULz9OXWe8D3KU26Hy8pJ4KQwyezlLFtl9D5z8mw0mP0eQ9PR6UPHtsa9N; 25:rpEGJaVQHG2NqvCObfnMSMAEMoLq9OVEYoBnu7Z9p2EUcJ/Mwz1qL/9Ul3pt5Gg2CWppA40WlDHPP84yQou8beRBCMfPU58gYMlakCim1Uay/no46DmZbIM3BRXLtt3GEoi2a2EbGN+UE1ODGt1aIMSc2gqnZ0WPZylg2cJpwxcNKk6404JGjyOYxl3oyhVzNSL/CsJOgEHtX6jHaplYYuezvL9S+M6DeVCr2AcecYl0V5iQvkai7p4EG9MEPAoYAZgjQHspHB3QRAeiMKfoqrIsaXZldyzoFXow2HrGw/Q+2+Z9nOlpUuAXqe0GqXlJDyJLQhL4mxidUleP+sq/Mw==; 31:IDk36wkJ6E9E0uzE27G0jgHmvVySJm6+8/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-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4183; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4183; X-Forefront-PRVS: 06818431B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(39860400002)(376002)(346002)(396003)(199004)(189003)(52116002)(186003)(53936002)(76176011)(51416003)(6486002)(6862004)(2351001)(86362001)(26005)(58126008)(37006003)(316002)(386003)(16586007)(478600001)(6116002)(3846002)(5660300001)(97736004)(118296001)(81166006)(81156014)(8676002)(7736002)(305945005)(68736007)(8936002)(66066001)(6636002)(6666003)(6496006)(36756003)(47776003)(105586002)(106356001)(2906002)(476003)(48376002)(956004)(2616005)(486006)(11346002)(50466002)(25786009)(446003)(16526019); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4183; 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; AM6PR05MB4183; 23:fiNcRfyR9zRkK9CunpIgo5+cI81xFT4axGhwy1qvq?= =?us-ascii?Q?+pjbu6A7VQxgbS8GO6vOnovefyNoWalY5EVzEtMTx/LVZ337Lb7TMh3FZ9S0?= =?us-ascii?Q?FjfSM0XvjPt6XqW2LAWKPiqiYRU/zNWiS6PyrnG/JUdzI+BcfmSKhPpwHV1r?= =?us-ascii?Q?Fh15uG3kIAR3+WroxxDzML7taT1lJJJ63hazvADD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eGzJRgfR315L443f+GHyvV5FJgtMVRR9UM7+cN08=; 24:9/wGYjQr3J6kQnnqwS1sg5tshuVD5toIRa2EvVYHAvk/6+wbKxfYAO9mdIsNULL3rfWt/JKBG7/n7NIE+duuA8VYqw8Gs8M7v9F2gTVIsYk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 7:3t0LltBPbm/nSmFkbbV1XD1oEkLNglGXtgWeXjRiUFPtCqP96P1j2VtKMpZZpw3tt0gDQ/C9nEfD0MpDk2LkG33e6Al59LNGX4RBvxLk4gZ7SgYHVl6YVDoof7yX/iFKoY7cbRNn6eb4pKO0AbO2+4CcpwwfHL/wsjUbfnkT4inWoC0URj1oJmJYkMFmuAG2hXtjbd0tymyQguBiXbHm7w2E/95FbrSLHuWqVBGzSiVE4KGl/+ehqLq83IcKqXhq X-MS-Office365-Filtering-Correlation-Id: cbd12217-f1ce-47cc-9230-08d5c04e2f25 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2018 01:40:37.1579 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cbd12217-f1ce-47cc-9230-08d5c04e2f25 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4183 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 X-Virus-Scanned: ClamAV using ClamSMTP Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index 8c9cf8e..cbc8fab 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -1144,6 +1144,9 @@ static int mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_bridge_port *bridge_port; u16 vid; + if (netif_is_bridge_master(orig_dev)) + return -EOPNOTSUPP; + if (switchdev_trans_ph_prepare(trans)) return 0; @@ -1741,6 +1744,9 @@ static int mlxsw_sp_port_vlans_del(struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_bridge_port *bridge_port; u16 vid; + if (netif_is_bridge_master(orig_dev)) + return -EOPNOTSUPP; + bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev); if (WARN_ON(!bridge_port)) return -EINVAL;