[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1387424650.19078.355.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 18 Dec 2013 19:44:10 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Fan Du <fan.du@...driver.com>
Cc: 王聪 <xiyou.wangcong@...il.com>,
steffen.klassert@...unet.com, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [PATCHv3 net-next] xfrm: Namespacify xfrm_policy_sk_bundles
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;
+ struct llist_node llist;
};
};
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists