public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Gao feng <gaofeng@cn•fujitsu.com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org, eric.dumazet@gmail•com,
	Gao feng <gaofeng@cn•fujitsu.com>
Subject: Re: [PATCH V2] ipv6: Fix problem with expired dst cache
Date: Wed, 29 Feb 2012 17:26:07 +0800	[thread overview]
Message-ID: <4F4DEF2F.7010109@cn.fujitsu.com> (raw)
In-Reply-To: <1330324605-26617-1-git-send-email-gaofeng@cn.fujitsu.com>

Hi David.

于 2012年02月27日 14:36, Gao feng 写道:
> If the ipv6 dst cache which copy from the dst generated by ICMPV6 RA packet.
> this dst cache will not check expire because it has no RTF_EXPIRES flag.
> So this dst cache will always be used until the dst gc run.
> 
> Change the struct dst_entry,add a union contains new pointer from and expires.
> When rt6_info.rt6i_flags has no RTF_EXPIRES flag,the dst.expires has no use.
> we can use this field to point to where the dst cache copy from.
> The dst.from is only used in IPV6.
> 
> In func rt6_check_expired check if rt6_info.dst.from is expired.
> 
> In func ip6_rt_copy only set dst.from when the ort has flag RTF_ADDRCONF
> and RTF_DEFAULT.
> 

I will send the v3 PATCH.
This version has some changes.
1,hold the ort in ip6_rt_copy and release it in ip6_dst_destroy just as Eric said.
2,add some functions to operate the RTF_EXPIRES flag and expires(from).
3,change the code to use the functions added in 2.

  reply	other threads:[~2012-02-29  9:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24  6:20 [PATCH] ipv6: Fix problem with expired dst cache Gao feng
2012-02-24  6:47 ` David Miller
2012-02-24  7:10   ` Gao feng
2012-02-24  9:27   ` Gao feng
2012-02-24  6:51 ` Eric Dumazet
2012-02-24  7:21   ` Gao feng
2012-02-27  6:36 ` [PATCH V2] " Gao feng
2012-02-29  9:26   ` Gao feng [this message]
2012-02-29  9:45     ` [PATCH] " Gao feng
2012-02-29  9:52       ` Gao feng
2012-02-29 10:07     ` [PATCH v3] " Gao feng
2012-02-29 12:14       ` Eric Dumazet
2012-03-01  0:43         ` Gao feng
2012-03-05  3:53 ` [PATCH v4] " Gao feng
2012-03-05  5:05   ` David Miller
2012-03-05  7:10     ` Gao feng
2012-03-05  7:16 ` [PATCH v5] " Gao feng
2012-03-06  7:01   ` RongQing Li
2012-03-06  7:10     ` RongQing Li
2012-03-17  5:33   ` David Miller
2012-03-19  0:49     ` Gao feng
2012-03-22  2:47       ` David Miller
2012-04-06 10:13 ` [PATCH v6] ipv6: fix " Gao feng
2012-04-13 16:58   ` David Miller
2012-04-16 13:34     ` [PATCH] ipv6: fix rt6_update_expires Jiri Bohac
2012-04-18  2:24       ` Gao feng
2012-04-18  2:32         ` David Miller
2012-04-16 13:35     ` [PATCH] ipv6: clean up rt6_clean_expires Jiri Bohac
2012-04-18  2:32       ` David Miller

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=4F4DEF2F.7010109@cn.fujitsu.com \
    --to=gaofeng@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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