From: Cong Wang <amwang@redhat.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: "Bjørn Mork" <bjorn@mork.no>,
"David Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [Patch net-next] ipv6: separate out procfs code from mcast.c
Date: Wed, 24 Apr 2013 11:33:39 +0800 [thread overview]
Message-ID: <1366774419.3849.8.camel@cr0> (raw)
In-Reply-To: <1366733588.4016.29.camel@bwh-desktop.uk.solarflarecom.com>
On Tue, 2013-04-23 at 17:13 +0100, Ben Hutchings wrote:
>
> A more type-safe approach would be to define something like:
>
> /* net/ipv6.h */
> struct ipv6_mcast_ops {
> ...
> };
> extern const struct ipv6_mcast_ops *ipv6_mcast_ops;
>
> /* net/ipv6/addrconf_core.c */
> const struct ipv6_mcast_ops *ipv6_mcast_ops;
> EXPORT_SYMBOL_GPL(ipv6_mcast_ops);
>
> /* net/ipv6/af_inet6.c */
> static const struct ipv6_mcast_ops ipv6_mcast_ops_impl = {
> ...
> };
> static int __init inet6_init(void)
> {
> ...
> ipv6_mcast_ops = &ipv6_mcast_ops_impl;
> return 0;
> ...
> }
> static void __exit inet6_exit(void)
> {
> ...
> ipv6_mcast_ops = NULL;
> ...
> }
Yeah! That's a nice stub! I think this is the only doable and acceptable
solution so far.
Thanks a lot!
next prev parent reply other threads:[~2013-04-24 3:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 7:07 [Patch net-next] ipv6: separate out procfs code from mcast.c Cong Wang
2013-04-23 7:11 ` David Miller
2013-04-23 7:15 ` Cong Wang
2013-04-23 7:18 ` David Miller
2013-04-23 7:30 ` Cong Wang
2013-04-23 7:36 ` David Miller
2013-04-23 7:41 ` Cong Wang
2013-04-23 12:33 ` Bjørn Mork
2013-04-23 16:13 ` Ben Hutchings
2013-04-24 3:33 ` Cong Wang [this message]
2013-04-23 17:26 ` David Stevens
2013-04-24 5:26 ` Cong Wang
2013-04-24 3:29 ` Cong Wang
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=1366774419.3849.8.camel@cr0 \
--to=amwang@redhat.com \
--cc=bhutchings@solarflare.com \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--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 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.