From: Fan Du <fan.du@windriver.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: 王聪 <xiyou.wangcong@gmail.com>,
steffen.klassert@secunet.com, davem@davemloft.net,
netdev@vger.kernel.org
Subject: Re: [PATCHv3 net-next] xfrm: Namespacify xfrm_policy_sk_bundles
Date: Thu, 19 Dec 2013 15:47:32 +0800 [thread overview]
Message-ID: <52B2A494.5080702@windriver.com> (raw)
In-Reply-To: <1387424650.19078.355.camel@edumazet-glaptop2.roam.corp.google.com>
On 2013年12月19日 11:44, Eric Dumazet wrote:
> On Thu, 2013-12-19 at 11:17 +0800, Fan Du wrote:
>>
>
>> diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
>> index 1006a26..22f4f90 100644
>> --- a/include/net/netns/xfrm.h
>> +++ b/include/net/netns/xfrm.h
>> @@ -58,9 +58,9 @@ struct netns_xfrm {
>> struct dst_ops xfrm6_dst_ops;
>> #endif
>> spinlock_t xfrm_state_lock;
>> - spinlock_t xfrm_policy_sk_bundle_lock;
>> rwlock_t xfrm_policy_lock;
>> struct mutex xfrm_cfg_mutex;
>> + struct llist_head xp_sk_bundles_list;
>> };
>>
>> #endif
>> diff --git a/include/net/xfrm.h b/include/net/xfrm.h
>> index 59f5d0a..05296ab 100644
>> --- a/include/net/xfrm.h
>> +++ b/include/net/xfrm.h
>> @@ -957,6 +957,7 @@ struct xfrm_dst {
>> u32 child_mtu_cached;
>> u32 route_cookie;
>> u32 path_cookie;
>> + struct llist_node xdst_llist;
>> };
>>
>
> Hmm... Thats not very nice.
>
> Please reuse the storage adding a llist_node in the union ?
>
> diff --git a/include/net/dst.h b/include/net/dst.h
> index 44995c13e941..3f604f47cc58 100644
> --- a/include/net/dst.h
> +++ b/include/net/dst.h
> @@ -14,6 +14,7 @@
> #include<linux/rcupdate.h>
> #include<linux/bug.h>
> #include<linux/jiffies.h>
> +#include<linux/llist.h>
> #include<net/neighbour.h>
> #include<asm/processor.h>
>
> @@ -103,6 +104,7 @@ struct dst_entry {
> struct rtable __rcu *rt_next;
> struct rt6_info *rt6_next;
> struct dn_route __rcu *dn_next;
Add dst_entry with llist into a global llist head, after this
does the dst internal usage of above member corrupt below llist
if we unionize them together here?
> + struct llist_node llist;
> };
> };
--
浮沉随浪只记今朝笑
--fan
next prev parent reply other threads:[~2013-12-19 7:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 3:34 [PATCHv2 ipsec-next] xfrm: Namespacify xfrm_policy_sk_bundles Fan Du
2013-12-18 4:50 ` Eric Dumazet
2013-12-18 5:33 ` Fan Du
2013-12-18 5:44 ` Eric Dumazet
2013-12-18 5:33 ` Cong Wang
2013-12-19 1:35 ` Fan Du
2013-12-19 2:15 ` Eric Dumazet
2013-12-19 3:17 ` [PATCHv3 net-next] " Fan Du
2013-12-19 3:44 ` Eric Dumazet
2013-12-19 7:47 ` Fan Du [this message]
2013-12-20 3:34 ` [PATCHv4 " Fan Du
2013-12-24 1:12 ` Fan Du
2013-12-24 5:31 ` David Miller
2013-12-24 5:39 ` Fan Du
2013-12-24 9:50 ` Steffen Klassert
2013-12-24 9:56 ` Fan Du
2013-12-24 17:54 ` David Miller
2013-12-24 10:35 ` Steffen Klassert
2013-12-25 6:40 ` Fan Du
2013-12-25 8:11 ` Timo Teras
2013-12-25 8:44 ` Fan Du
2014-01-06 10:35 ` Steffen Klassert
2014-01-07 2:43 ` Fan Du
2014-01-09 12:38 ` Steffen Klassert
2014-01-10 9:23 ` Fan Du
2013-12-19 3:48 ` [PATCHv3 " Eric Dumazet
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=52B2A494.5080702@windriver.com \
--to=fan.du@windriver.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.