From patchwork Tue Jan 8 16:48:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 1022044 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="LlpoRoxo"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43YyrR5Sf7z9sMM for ; Wed, 9 Jan 2019 03:48:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbfAHQsi (ORCPT ); Tue, 8 Jan 2019 11:48:38 -0500 Received: from mail-eopbgr50086.outbound.protection.outlook.com ([40.107.5.86]:21248 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729043AbfAHQsf (ORCPT ); Tue, 8 Jan 2019 11:48:35 -0500 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=BDrU2KoKNEnCD62gBJnXsTgVbrvTgkLKhmGY+OaWz6U=; b=LlpoRoxombWERXC0Btw0BP4rqRxoetLeWcHUcD+qTNk/HRPYYta66TLR64kaDts7q9YdyePumeROQsIQTLgx/p8KVSkaE4IkDV4Kzpm1Vlau04dT9ZNIFXmoyPth6HtORHJw53wn7sZR+RoOiFhPAAGs9AT10GmofnOwv5ifxGM= Received: from AM6PR05MB6056.eurprd05.prod.outlook.com (20.179.2.148) by AM6PR05MB4405.eurprd05.prod.outlook.com (52.135.163.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Tue, 8 Jan 2019 16:48:13 +0000 Received: from AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::5490:e4ea:7798:e65f]) by AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::5490:e4ea:7798:e65f%3]) with mapi id 15.20.1516.010; Tue, 8 Jan 2019 16:48:13 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , Petr Machata , Nir Dotan , mlxsw , Ido Schimmel Subject: [PATCH net 10/11] mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion Thread-Topic: [PATCH net 10/11] mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion Thread-Index: AQHUp3HyFM/Z5bTTXkmn/PbqSJP8Ew== Date: Tue, 8 Jan 2019 16:48:13 +0000 Message-ID: <20190108164732.4024-11-idosch@mellanox.com> References: <20190108164732.4024-1-idosch@mellanox.com> In-Reply-To: <20190108164732.4024-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P192CA0024.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::37) To AM6PR05MB6056.eurprd05.prod.outlook.com (2603:10a6:20b:ab::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR05MB4405; 6:p03VetVsjlSAuQ08tIbvt6gX2xTy5N364m2s9Eypal26wSXFZughF++aeFf9q3EyCMSGJW1wC11KqOWnzYo2pifRttzKSLFw0ECke7+R2T6CnUA4n3NYxfhso0xQ+0Da5DZr4imVJBfATGooXDtsnhxUtrrfll1UDiV/LWWMN8077cuxNl1efO8Dm8ikW/u5Cmr7gFy2aMdX48d9xHdT1tIxfuiysAC/aGK6lzzyk3YkFX2yP5FQfi4XWvSky+MQD8Fh7Mp8MQJTgG9gSUbzCXn0ru+PqjyPRUJt+UxlB5HaZz0AX6UL+KAyq2FgAwozJNK/fzeQQs+T2gfDAysYOYjOHVCgOUfLSMIU6hhcIXRUoOClHeFwTVlX2WabHrpCSJdXSBvqH79+96s6p8Lovur+hZRVuUfo2H9sgtGlQcVu1Kwi9e1netwdvsneCIbd6STDTOC5F/D51HBH+K5fFg==; 5:zWzdGYM/bY67lKef6sUwgrbPrOZVw2NDsxrm+xx0Tm4VGh1DY1q46hYEMcXFH1Ql7XEjVTKEclZe2NfGIcypjhbG0gVD2nqyPTXdjlukFlpu06Ff3wI4DF/V7gxz9KYZj8qb7TTHQqEd9+EdZ2m57kTiRCdC0SzCmZrT2/QL5L7Fnq+vhiYY3GV8zrgV2B1bzfplRaOW0EFrRWWqlE+w5w==; 7:I+tEoeMa1dRTugpvydFZvycqkIxpcO3Acxr3XM6UMjDTUp5VbUBCiAzIun+hrvxma+hO+pWyqJ5Hr8JWzI0KUnaMCf3j5E/kZo2mIHkqzU4GPNQ9pIuVyKehXvqbd6CXRB+PSMuWYweWhNH+80PMrQ== x-ms-office365-filtering-correlation-id: a4d3ab73-cc73-48bc-c2d4-08d675891463 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4405; x-ms-traffictypediagnostic: AM6PR05MB4405: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM6PR05MB4405; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4405; x-forefront-prvs: 0911D5CE78 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(39860400002)(396003)(366004)(189003)(199004)(106356001)(105586002)(2906002)(6486002)(6116002)(3846002)(99286004)(6506007)(305945005)(486006)(7736002)(102836004)(386003)(76176011)(86362001)(52116002)(26005)(66066001)(5640700003)(6436002)(186003)(97736004)(2501003)(6512007)(2351001)(25786009)(1076003)(478600001)(81156014)(8936002)(36756003)(81166006)(68736007)(4326008)(50226002)(5660300001)(14444005)(575784001)(256004)(1730700003)(107886003)(8676002)(6916009)(53936002)(54906003)(316002)(11346002)(14454004)(2616005)(71200400001)(71190400001)(476003)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4405; H:AM6PR05MB6056.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qtIJijaAaUKrS03zwDEQkm34o8D7rCoccOQ1maBbcpT2oaHhP0DHxrnZ5wqoEwV7sBP4lJEErCq0aRNMnqywXPqOHLGLjWXPC0MN4xKR+cYFprs/8S1Ga2iQxxmDDTV8FfNhNkH2RjlY8y1111eADm22wMvq2O3jyQYUfZ3k4tXkAKprHKHL3SIb4dwHIswJkmth4rzezUKZcveui444hP8hKLIYzet654YYHkn2PcwsU1StIeZbjsvrJB2SMPKyRk+R1R7wnAALEA7V4jVRRZkV6qyCDIn8NhBjmcC/LMLpUyFEXSFCUWphIPMiDKnG spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4d3ab73-cc73-48bc-c2d4-08d675891463 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2019 16:48:12.7031 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4405 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When a VLAN is deleted from a bridge port we should not change the PVID unless the deleted VLAN is the PVID. Fixes: fe9ccc785de5 ("mlxsw: spectrum_switchdev: Don't batch VLAN operations") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- 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 e8ce2307352b..0abbaa0fbf14 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -1807,7 +1807,7 @@ static void mlxsw_sp_bridge_port_vlan_del(struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_bridge_port *bridge_port, u16 vid) { - u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : vid; + u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : mlxsw_sp_port->pvid; struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan; mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid);