netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>,
	davem@davemloft.net, kaber@trash.net, netdev@vger.kernel.org,
	linux-next@vger.kernel.org, adobriyan@gmail.com,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: Re: [RFC 2/4] net: netfilter conntrack - add per-net functionality for DCCP protocol
Date: Tue, 10 Mar 2009 14:35:18 +0300	[thread overview]
Message-ID: <49B65076.6090003@openvz.org> (raw)
In-Reply-To: <aa79d98a0903100359x5cba797fu9611823b91c64b42@mail.gmail.com>

Cyrill Gorcunov wrote:
> On Tue, Mar 10, 2009 at 1:33 PM, Daniel Lezcano <daniel.lezcano@free.fr> wrote:
>> Daniel Lezcano wrote:
>>> Cyrill Gorcunov wrote:
>>>> Module specific data moved into per-net site and being allocated/freed
>>>> during net namespace creation/deletion.
>>>>
>>>> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
>>>> ---
>>>>  net/netfilter/nf_conntrack_proto_dccp.c |  148
>>>> ++++++++++++++++++++++++--------
>>>>  1 file changed, 111 insertions(+), 37 deletions(-)
>>>>
>>>>
>>>>   static int __init nf_conntrack_proto_dccp_init(void)
>>>>  {
>>>>     int err;
>>>>  -    err = nf_conntrack_l4proto_register(&dccp_proto4);
>>>> +    err = register_pernet_gen_device(&dccp_net_id, &dccp_net_ops);
>>>>
>> [ cut ]
>>> Shouldn't it be register_pernet_gen_subsys ?
> 
> No, I believe. By using  register_pernet_gen_device I'm allowed to
> not modify 'struct net' and friends and keep all I need in my own
> pointer retrieved thru per-net gen-device id I've registered.

I believe Daniel means, that we need the register_xxx_get_subsys call
for subsystems, rather than devices, that will behave according to the
generic net pointers.

Daniel, am I right with this suggestion?

>> If you use register_pernet_gen_device, your subsystem will be deleted before
>> the network devices and potentially you can receive a packet even if your
>> subsystem is already freed.
>>
>> Eric did a fix for tcp and icmp a few weeks ago. I thing its explanation is
>> better than mine :)
>> it is the commit 6eb0777228f31932fc941eafe8b08848466630a1 for net-2.6
>>
>> Thanks.
>>  -- Daniel
>>
> 
> Thanks a lot Daniel, will check!
> 

  reply	other threads:[~2009-03-10 11:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 18:16 [RFC 0/4] netfilter conntrack sysctls pernet support Cyrill Gorcunov
2009-03-09 18:16 ` [RFC 1/4] net: sysctl_net - use net_eq to compare nets Cyrill Gorcunov
2009-03-09 18:16 ` [RFC 2/4] net: netfilter conntrack - add per-net functionality for DCCP protocol Cyrill Gorcunov
     [not found]   ` <49B63EA6.2060802@free.fr>
2009-03-10 10:33     ` Daniel Lezcano
2009-03-10 10:59       ` Cyrill Gorcunov
2009-03-10 11:35         ` Pavel Emelyanov [this message]
2009-03-10 11:51           ` Cyrill Gorcunov
2009-03-10 11:56             ` Pavel Emelyanov
2009-03-10 12:43             ` Daniel Lezcano
2009-03-10 11:25     ` David Miller
2009-03-10 13:02       ` Daniel Lezcano
2009-03-09 18:16 ` [RFC 3/4] net: netfilter conntrack - add per-net functionality for SCTP protocol Cyrill Gorcunov
2009-03-10 10:21   ` Daniel Lezcano
2009-03-09 18:16 ` [RFC 4/4] net: netfilter conntrack - add per-net functionality for UDPLITE protocol Cyrill Gorcunov
2009-03-09 18:47 ` [RFC 0/4] netfilter conntrack sysctls pernet support Patrick McHardy
2009-03-09 19:07   ` Cyrill Gorcunov
2009-03-09 21:08     ` Cyrill Gorcunov

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=49B65076.6090003@openvz.org \
    --to=xemul@openvz.org \
    --cc=adobriyan@gmail.com \
    --cc=daniel.lezcano@free.fr \
    --cc=davem@davemloft.net \
    --cc=gorcunov@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=kaber@trash.net \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.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).