netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Fan Du <fan.du@windriver.com>
Cc: David Miller <davem@davemloft.net>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, jmorris@namei.org,
	netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next] net: split rt_genid for ipv4 and ipv6
Date: Mon, 22 Jul 2013 22:40:35 +0200	[thread overview]
Message-ID: <51ED98C3.8050108@6wind.com> (raw)
In-Reply-To: <51ECC682.1030409@windriver.com>

Le 22/07/2013 07:43, Fan Du a écrit :
> Adding IPsec and other IPv4/IPv6 maintainers in the list.
>
> On 2013年07月19日 17:33, David Miller wrote:
>> From: Fan Du<fan.du@windriver.com>
>> Date: Fri, 19 Jul 2013 15:50:20 +0800
>>
>>> The original commit is targeted for XFRM policy inserting/removing,
>>> but it uses net genid shared by both IPv4 and IPv6, the side effect is
>>> add/delete IPv4 address will invalidate IPv6 dst in all.
>>>
>>> We *do* need to bump genid when add/delete IPv6 address in scenario I
>>> described here: http://www.spinics.net/lists/netdev/msg243398.html,
>>> but definitely not from add/delete IPv4 address. Moreover test shows
>>> that DCCP still push thousands of packets on wire after delete its
>>> IPv6
>>> address in the same scenario I describe before.
>>>
>>> The impulse to bump genid for IPv6 is much more stronger after this
>>> commit even do it unintentionally.
>>
>> If you really think it will help, and it will still handle the IPSEC
>> case, you can make a seperate genid for ipv4 and ipv6 but that might not
>> work out so cleanly.
>>
>
> At least let me give it a try. Any comments would be truly welcome.
>
>
>  From c79215d64038d62340d77c6ac070d8bb479b2f89 Mon Sep 17 00:00:00 2001
> From: Fan Du <fan.du@windriver.com>
> Date: Mon, 22 Jul 2013 11:31:56 +0800
> Subject: [RFC PATCH net-next] net: split rt_genid for ipv4 and ipv6
>
> Current net name space has only one genid for both IPv4 and IPv6, it has below
> drawbacks:
>
> - Add/delete an IPv4 address will invalidate all IPv6 routing table entries.
> - Insert/remove XFRM policy will also invalidate both IPv4/IPv6 routing table
> entries
>    even when the policy is only applied for one address family.
>
> Thus, this patch attempt to split one genid for two to cater for IPv4 and IPv6
> separately
> in a fine granularity.
>
> Signed-off-by: Fan Du <fan.du@windriver.com>
> ---
>   include/net/net_namespace.h |   33 ++++++++++++++++++++++++++++-----
>   net/ipv4/route.c            |   16 ++++++++--------
>   net/ipv6/af_inet6.c         |    1 +
>   net/ipv6/route.c            |    4 ++--
>   net/xfrm/xfrm_policy.c      |    8 +++++++-
>   5 files changed, 46 insertions(+), 16 deletions(-)
>
> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 84e37b1..a08e312 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -119,8 +119,11 @@ struct net {
>       struct netns_ipvs    *ipvs;
>   #endif
>       struct sock        *diag_nlsk;
> -    atomic_t        rt_genid;
>       atomic_t        fnhe_genid;
> +    atomic_t                rt_genid_ipv4;
> +#if IS_ENABLED(CONFIG_IPV6)
> +    atomic_t                rt_genid_ipv6;
> +#endif
>   };
Why not putting these new fields in 'struct netns_ipv4' and 'struct netns_ipv6'?

      parent reply	other threads:[~2013-07-22 20:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18  3:22 [DISCUSSION] rt6i_genid Fan Du
2013-07-18  9:13 ` Nicolas Dichtel
2013-07-18  9:28   ` Fan Du
2013-07-18 15:12     ` Nicolas Dichtel
2013-07-19  0:01       ` Fan Du
2013-07-19  3:18         ` David Miller
2013-07-19  3:28           ` Fan Du
2013-07-19  3:31             ` David Miller
2013-07-19  7:50               ` Fan Du
2013-07-19  9:33                 ` David Miller
2013-07-22  5:43                   ` [RFC PATCH net-next] net: split rt_genid for ipv4 and ipv6 Fan Du
2013-07-22 10:53                     ` Steffen Klassert
2013-07-22 20:40                     ` Nicolas Dichtel [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=51ED98C3.8050108@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=davem@davemloft.net \
    --cc=fan.du@windriver.com \
    --cc=jmorris@namei.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=yoshfuji@linux-ipv6.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).