From: David Miller <davem@davemloft.net>
To: mkubecek@suse.cz
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, hannes@stressinduktion.org, kafai@fb.com
Subject: Re: [PATCH net-next 2/3] ipv6: per netns fib6 walkers
Date: Mon, 07 Mar 2016 14:48:46 -0500 (EST) [thread overview]
Message-ID: <20160307.144846.1271615479587219087.davem@davemloft.net> (raw)
In-Reply-To: <6df8e224d6337b658a097ac87e72e1467cddf13d.1457085016.git.mkubecek@suse.cz>
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 4 Mar 2016 11:59:25 +0100 (CET)
> @@ -1978,6 +1980,12 @@ static int ipv6_route_yield(struct fib6_walker *w)
>
> static void ipv6_route_seq_setup_walk(struct ipv6_route_iter *iter)
> {
> +#ifdef CONFIG_NET_NS
> + struct net *net = iter->p.net;
> +#else
> + struct net *net = &init_net;
> +#endif
Please use read_pnet(), it exists so that we don't need to do ugly CPP
stuff like this in *.c files.
Thanks.
next prev parent reply other threads:[~2016-03-07 19:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 10:59 [PATCH net-next 0/3] ipv6: per netns FIB6 walkers and garbage collector Michal Kubecek
2016-03-04 10:59 ` [PATCH net-next 1/3] ipv6: replace global gc_args with local variable Michal Kubecek
2016-03-04 10:59 ` [PATCH net-next 2/3] ipv6: per netns fib6 walkers Michal Kubecek
2016-03-07 19:48 ` David Miller [this message]
2016-03-08 0:26 ` Cong Wang
2016-03-08 0:28 ` Cong Wang
2016-03-08 7:05 ` Michal Kubecek
2016-03-08 10:03 ` Michal Kubecek
2016-03-04 10:59 ` [PATCH net-next 3/3] ipv6: per netns FIB garbage collection Michal Kubecek
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=20160307.144846.1271615479587219087.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kafai@fb.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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).