From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ido Schimmel Subject: [PATCH net-next 09/18] mlxsw: spectrum_fid: Clear NVE configuration when destroying 802.1D FIDs Date: Sat, 13 Oct 2018 17:18:35 +0000 Message-ID: <20181013171725.3261-10-idosch@mellanox.com> References: <20181013171725.3261-1-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "davem@davemloft.net" , Jiri Pirko , Petr Machata , "ivecera@redhat.com" , "roopa@cumulusnetworks.com" , "nikolay@cumulusnetworks.com" , "andrew@lunn.ch" , "vivien.didelot@savoirfairelinux.com" , "f.fainelli@gmail.com" , "stephen@networkplumber.org" , "bridge@lists.linux-foundation.org" , mlxsw , Ido Schimmel To: "netdev@vger.kernel.org" Return-path: Received: from mail-he1eur01on0083.outbound.protection.outlook.com ([104.47.0.83]:32183 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727031AbeJNA4u (ORCPT ); Sat, 13 Oct 2018 20:56:50 -0400 In-Reply-To: <20181013171725.3261-1-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 802.1D FIDs are used to represent VLAN-unaware bridges and currently this is the only type of FID that supports NVE configuration. Since the NVE tunnel device does not take a reference on the FID, it is possible for the FID to be destroyed when it still has NVE configuration. Therefore, when destroying the FID make sure to disable its NVE configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c b/drivers/n= et/ethernet/mellanox/mlxsw/spectrum_fid.c index 0ba3d90d4632..a3db033d7399 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c @@ -538,6 +538,8 @@ static int mlxsw_sp_fid_8021d_configure(struct mlxsw_sp= _fid *fid) =20 static void mlxsw_sp_fid_8021d_deconfigure(struct mlxsw_sp_fid *fid) { + if (fid->vni_valid) + mlxsw_sp_nve_fid_disable(fid->fid_family->mlxsw_sp, fid); mlxsw_sp_fid_op(fid->fid_family->mlxsw_sp, fid->fid_index, 0, false); } =20 --=20 2.17.2