netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@free.fr>
To: Hans Schillstrom <hans.schillstrom@ericsson.com>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
	wensong@linux-vs.org
Subject: Re: [RFC PATCH 4/9] ipvs network name space aware
Date: Tue, 12 Oct 2010 18:02:37 +0200	[thread overview]
Message-ID: <4CB4869D.9050605@free.fr> (raw)
In-Reply-To: <201010081317.01120.hans.schillstrom@ericsson.com>

On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
> This patch just contains ip_vs_core.c
>
> Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
>
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index 0c043b6..4fdc5cb 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -52,7 +52,6 @@
>
>   #include<net/ip_vs.h>
>
> -
>   EXPORT_SYMBOL(register_ip_vs_scheduler);
>   EXPORT_SYMBOL(unregister_ip_vs_scheduler);
>   EXPORT_SYMBOL(ip_vs_proto_name);
> @@ -67,6 +66,8 @@ EXPORT_SYMBOL(ip_vs_conn_put);
>   EXPORT_SYMBOL(ip_vs_get_debug_level);
>   #endif
>
> +/* netns cnt used for uniqueness */
> +static atomic_t ipvs_netns_cnt = ATOMIC_INIT(0);
>    

Why is this counter needed ?

[ cut ]

> + *	Initialize IP Virtual Server netns mem.
> + */
> +static int __net_init __ip_vs_init(struct net *net)
> +{
> +	struct netns_ipvs *ipvs = 0;
>
> +	ipvs = kzalloc(sizeof(struct netns_ipvs), GFP_ATOMIC);
> +	if( ipvs == NULL ) {
> +		pr_err("%s(): no memory.\n", __func__);
> +		return -ENOMEM;
> +	}
> +	ipvs->inc = atomic_read(&ipvs_netns_cnt);
>    

AFAICS, this counter is never used. Is it really needed ?

> +	atomic_inc(&ipvs_netns_cnt);
> +	IP_VS_DBG(10, "Creating new netns *net=%p *ipvs=%p size=%lu\n",
> +		     net, ipvs, sizeof(struct netns_ipvs));
> +	net->ipvs = ipvs;
> +
> +	return 0;
> +}
>    


  reply	other threads:[~2010-10-12 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 11:16 [RFC PATCH 4/9] ipvs network name space aware Hans Schillstrom
2010-10-12 16:02 ` Daniel Lezcano [this message]
2010-10-13  5:07   ` Hans Schillstrom

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=4CB4869D.9050605@free.fr \
    --to=daniel.lezcano@free.fr \
    --cc=hans.schillstrom@ericsson.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=wensong@linux-vs.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).