From patchwork Wed May 23 01:42:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10420021 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 599C6600CC for ; Wed, 23 May 2018 01:43:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45D7428DA6 for ; Wed, 23 May 2018 01:43:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3999628DA9; Wed, 23 May 2018 01:43:00 +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 69F4428DA6 for ; Wed, 23 May 2018 01:42:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rFdY5Jb3zDrTs for ; Wed, 23 May 2018 11:42:57 +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="hBWKMVyO"; 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.44; 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="hBWKMVyO"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0044.outbound.protection.outlook.com [104.47.2.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rFdR6wVqzDrTs for ; Wed, 23 May 2018 11:42:51 +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=nwQ1XEQw3gLlUv0E38RxbK9rOh7N92U+6917QaJQClI=; b=hBWKMVyOdD7vF9x9H6GqbNss6oV/BT+4H4j9WgH1e5/MrZThRnu/HMrkO4D2YjBiBJaUJGI53BdvWXGbSnUMa/ULFe2TFZhUi6oF8rnT250/Ev9oU7b0nEnpV4m6OWIILE8H5CG1kEVDWmqhaWIPC0Zx6Z0+oYnvBNZQeJMamz8= 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:42:47 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare In-Reply-To: References: Message-Id: Date: Wed, 23 May 2018 03:42:21 +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: LO2P265CA0123.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::15) 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:hqkZtsVQFLp6khfOZ44FCk30MkbhMinOigIblfHxPHWkoSkJc/C4apI5NlmoXhVzAtOBzugwddQ29z91KihFV1kY06HQdwTf/rKvp8AEFMFZe1gU/vZ+Oby04XTlhc7veS0DygfLyMR0R1UyD6YdYnVnJiDJBbg5BXOuLWPF7uW/kgD+BfyB+e4TlxZ2n2fXzMokIVcp5BbKK0obxvr49hiosNHX4Mrd7spqBMSwSEqOBOiLkA6juXxGXb+GKi1a; 25:NTFyJhgrer8KMDG022K5W8GQaOSXNYWOFPcb4MwOiamMkZNj5d8ZMVjFEgWdZySv4G6XdyTnznYgyx4ecqgegR3+tPik1zot1qRn/kFtNwx0kl7UcsBRXM1HqHqgqzp/tv90w8whUcaK/Utd5HepIsXOe95JZV1npGbIK6I7eHsuC8zOopVgPoeOlO+Kd/jb3fiBW9lhmWNvlPSZ00oaYu2mWd6hmONUbTNG0Z3gxT8/yRyVZD/WmIrdbCkA04ixAPR/xGaYIWBN4P0aEQAoPUz0L9n2axnfU+U5+NzHB/pfVhoZUDW4SRWaQ0oJwVeIwPV7UbZLLtog8bxf0CobMw==; 31:VNSNxmSnfK6n9hF5CnsctLQbxZxn3mtNeZFjnpH1IW4yZZ1Ho2iv3GBrf0RnCuOI+lIQfNH7t9FF82ARbrsZArn+ON3xsaW2VWSNA/vcINGY4kBMxo71ApbCuDRhi7d8a891AsrA6Ss+heqLGO+2C340+edI86B+0Hs3prbDl+7EwEMA+G7hpjyouIQ44ds+Mv2t3psbyy1xDTj4IrfDM9jWLIsiqDd6nTeXdA+bikI= X-MS-TrafficTypeDiagnostic: AM6PR05MB4183: X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 20:V57cS4RvJiZeNu0qn+kcZ+lTZAuIkZfhm/MfkZZwHik9xqBbfOeJNq3eKV3t6QBpXdgP2e45ASweDUxW9AXcv/dAPEf2ac9e2vCVIBaH26gdldfeyZpz1YgKTk0TnOCwxhqSuEAzJGMTrl48Mj6/35xz6/+86YyWimZtqfXfWetJw7yMS8z8y5cP1CFnXWC5lvIVpc4rTKOK49tPsRa6CdWmYHyUG029ggTAX6eIolAUhejkzS2FlRmBnCvEfLRpvp/u9czEQZ+KKU6MvYpixTdi1xH+QEfXKVwRqWKtByIJuTkf5luXs+UNgUmO5Dvms3VQdLtnyRKo/OnnNdMBBBClCaNWzIWhT3B+4cAwxQ+b/rQcDSfOFnvFa7c0SKWNRjjaakigIN6ZUfq32oZ8t4pVWugkwmlKhLzTEXxNvFXB6ynqUUcjivit1WZyUFYkfCI92/V/7EyTIHhvRwshhFpP3kke3GsxHYC9enEffiEPIXV7n0NYA/GYZ7gkjCYV; 4:ugu+Yrf8FUiKhFIRBIyp3Mw5VyOZaMJG9G5k3Y77CAf0L68N9H/eRuFBn5rSAaTobjuSmuGO3XkRcn3J8y5KMMYIrQpBUQP113GB0Dca2KuzQk5M1T06bynlBnv1mSByNWzTUBWssSU3o9kKu4ztI7ZdLxsZVwJq2h0WQkYUqJObHYn6NU09W7krjbn7Tq8ivrU8dQTGETLI6mMvD+XCtkib+9Bnk3hUgtMb9iWiL0YfEku7lqfMXFPcVsXMEC3I/KQIPSVUk6VLSVycG2IWcw== X-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)(59450400001)(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:kW0+DXHQSIXtrdVzKC9j0SLkEgif+ZY1vXOVzsHQD?= =?us-ascii?Q?HsybS6EbLSlwmhDp8eLcMeDyPALb6tAGnfSCAeKSvsLZJDh96YWit/8QQJuf?= =?us-ascii?Q?TudN4VjYbiRzVCO5wU08ZBrbq9BqEhtVBvTtMalAIyBqWC6laNWqBo4u673I?= =?us-ascii?Q?GlcKxssXCqMyUd26cTc/tnhgrTJTzSj+fZbhKG36fEJ359SnleDilTIx+oPh?= =?us-ascii?Q?eem+8u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t4=; 24:qA4wpylc5sM/ildtTRjK5FQqU1HFK+Isfl2fQncOWfrvKVk+s5ZuGVBS1toTzvdaxpP44tDHnLsHPiahC8k1nnNcGbKJ2XcSDpMUkHuPdCs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 7:JROAa3Sw1vtXabjIdbDMZrgm8uOR5FO7Z6AumRIINFOpTdBRgnhtLS2eerRwR/pc7hx/DxHJUHa9I0jk1YIxGjnz7vovVv4vTwakc2bA8itJpIsDW3dMN9kd89zJhwYxqQsI1T/IFPBH2d0bkA00N03MWpz5K5TvSgYTPJhKjIAgMSwD5dA/lB1etboKIVaIwtvpXwGAsVwyDnbY0qL3uttVtVAjGGvOJLaY+7QZPwzTuWf03JkQK77Njcg1lrYm X-MS-Office365-Filtering-Correlation-Id: 972c62d8-b7ed-4466-00df-08d5c04e7c9b X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2018 01:42:47.0808 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 972c62d8-b7ed-4466-00df-08d5c04e7c9b 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 Since there's no special support for the bridge events, the driver returns -EOPNOTSUPP, and thus the commit never happens. Therefore schedule respin during the prepare stage: there's no real difference one way or another. This fixes the problem that mirror-to-gretap offload wouldn't adapt to changes in bridge vlan configuration right away and another notification would have to arrive for mlxsw to catch up. Signed-off-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index cbc8fab..8a15ac4 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -1697,7 +1697,7 @@ static int mlxsw_sp_port_obj_add(struct net_device *dev, vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans); - if (switchdev_trans_ph_commit(trans)) { + if (switchdev_trans_ph_prepare(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