From: David Miller <davem@davemloft.net>
To: lrichard@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] vti: flush x-netns xfrm cache when vti interface is removed
Date: Mon, 08 Aug 2016 15:35:22 -0700 (PDT) [thread overview]
Message-ID: <20160808.153522.275623399426494584.davem@davemloft.net> (raw)
In-Reply-To: <1470694965-17978-1-git-send-email-lrichard@redhat.com>
From: Lance Richardson <lrichard@redhat.com>
Date: Mon, 8 Aug 2016 18:22:45 -0400
> @@ -392,6 +393,17 @@ static int vti_tunnel_init(struct net_device *dev)
> return ip_tunnel_init(dev);
> }
>
> +static void vti_tunnel_uninit(struct net_device *dev)
> +{
> + struct ip_tunnel *tunnel = netdev_priv(dev);
> + struct net *net = tunnel->net;
> +
> + ip_tunnel_uninit(dev);
> +
> + if (!net_eq(net, dev_net(dev)))
> + xfrm_garbage_collect(net);
> +}
Like the normal netns, this netns should be expunged from the
flow cache on interface down, not uninit.
So like the existing facilities do, you should add a NETDEV_DOWN
notifier that flushes tunnel->net if necessary.
prev parent reply other threads:[~2016-08-08 22:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 22:22 [PATCH net] vti: flush x-netns xfrm cache when vti interface is removed Lance Richardson
2016-08-08 22:35 ` 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=20160808.153522.275623399426494584.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=lrichard@redhat.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).