LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [*v2 PATCH 01/22] IPVS: netns, add basic init per netns.

To: Hans Schillstrom <hans.schillstrom@xxxxxxxxxxxx>
Subject: Re: [*v2 PATCH 01/22] IPVS: netns, add basic init per netns.
Cc: horms@xxxxxxxxxxxx, ja@xxxxxx, daniel.lezcano@xxxxxxx, wensong@xxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, hans@xxxxxxxxxxxxxxx
From: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date: Mon, 13 Dec 2010 15:08:54 +0100 (CET)
On Monday 2010-12-13 14:38, Hans Schillstrom wrote:
>@@ -28,6 +28,18 @@
> #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
> #include <net/netfilter/nf_conntrack.h>
> #endif
>+#include <net/net_namespace.h>                /* Netw namespace */
>+
>+/*
>+ * Generic access of ipvs struct
>+ */
>+static inline struct netns_ipvs * net_ipvs(struct net* net) {
>+#ifdef CONFIG_NET_NS
>+      return net->ipvs;
>+#else
>+      return init_net.ipvs;
>+#endif
>+}

This looks redundant, because even in the !CONFIG_NET_NS case,
'net' is valid and already points to &init_net.

>+static void __net_exit __ip_vs_cleanup(struct net *net)
>+{
>+      struct netns_ipvs *ipvs = net_ipvs(net);
>+
>+      IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->inc);
>+}
>+
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>