Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: idosch@mellanox.com
Cc: netdev@vger.kernel.org, jiri@mellanox.com, petrm@mellanox.com,
	alexpe@mellanox.com, mlxsw@mellanox.com
Subject: Re: [PATCH net] mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge
Date: Sat, 25 Aug 2018 16:29:23 -0700 (PDT)	[thread overview]
Message-ID: <20180825.162923.188681079226490582.davem@davemloft.net> (raw)
In-Reply-To: <20180824124135.5203-1-idosch@mellanox.com>

From: Ido Schimmel <idosch@mellanox.com>
Date: Fri, 24 Aug 2018 15:41:35 +0300

> When a bridge device is removed, the VLANs are flushed from each
> configured port. This causes the ports to decrement the reference count
> on the associated FIDs (filtering identifier). If the reference count of
> a FID is 1 and it has a RIF (router interface), then this RIF is
> destroyed.
> 
> However, if no port is member in the VLAN for which a RIF exists, then
> the RIF will continue to exist after the removal of the bridge. To
> reproduce:
> 
> # ip link add name br0 type bridge vlan_filtering 1
> # ip link set dev swp1 master br0
> # ip link add link br0 name br0.10 type vlan id 10
> # ip address add 192.0.2.0/24 dev br0.10
> # ip link del dev br0
> 
> The RIF associated with br0.10 continues to exist.
> 
> Fix this by iterating over all the bridge device uppers when it is
> destroyed and take care of destroying their RIFs.
> 
> Fixes: 99f44bb3527b ("mlxsw: spectrum: Enable L3 interfaces on top of bridge devices")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reviewed-by: Petr Machata <petrm@mellanox.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2018-08-26  3:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 12:41 [PATCH net] mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge Ido Schimmel
2018-08-25 23:29 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180825.162923.188681079226490582.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexpe@mellanox.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox