All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Mohammad Mohsenzadeh <mmohsenz@gmail.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: 2.6.20 support for other 'features'
Date: Wed, 11 Apr 2007 20:22:00 +0200	[thread overview]
Message-ID: <461D2748.4050000@trash.net> (raw)
In-Reply-To: <e6af3bc80704111114lea2aafdg281b8599b2d34996@mail.gmail.com>

Mohammad Mohsenzadeh wrote:
> On 4/11/07, Patrick McHardy <kaber@trash.net> wrote:
> 
>>
>> But the feature stuff needs to be reworked in the not too distant
>> future, its impossible to properly determine what features might
>> be used in the future at allocation time, which is why we always
>> allocate for the worst case anyway and still can't properly deal
>> with the NAT module being loaded late.
> 
> 
> We would still have this problem (even worse), because we would never
> know what or how many features will be registered by other modules. At
> least right now, we know the worse case is 4 when both nf_nat and
> nf_helper are registered. But we could perhaps have a module parameter
> to specify the worse case. Something like
>      insmod nf_conntrack nf_conntrack_max_features=8


I'm not talking about the worst case for the number of features but
about the worst case used features for a specific conntrack entry.
We don't know if NAT will assign a helper later on, so we need
to allocate it in advance. We also don't know if they user will
load the NAT module later on, but we ignore this case and don't
handle it 100% correct.

>> Actually on second thought, I don't think this can even work.
>> The features and the resulting memory layout of struct nf_conn
>> need to be coordinated for all different combinations, so
>> you can at most extend it by one, which would always come at
>> the end.
>>
> 
> That should be find. The layout will be like the following
> feature #        layout
> 4                   nf_conn .. extra
> 5                   nf_conn .. helper .. extra
> 6                   nf_conn .. nat .. extra
> 7                   nf_conn .. nat .. helper .. extra
> 
> and so on. Therefore you can have as many features as you want. It
> just extends the 'extra' part above.

And how would it do that for two external modules, that don't know
how large the last part is?


> I also try to post the patch here shortly.


OK.

  reply	other threads:[~2007-04-11 18:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 17:39 2.6.20 support for other 'features' Mohammad Mohsenzadeh
2007-04-11 17:41 ` Jan Engelhardt
2007-04-11 17:46   ` Mohammad Mohsenzadeh
2007-04-11 17:49 ` Patrick McHardy
2007-04-11 17:51 ` Patrick McHardy
2007-04-11 18:14   ` Mohammad Mohsenzadeh
2007-04-11 18:22     ` Patrick McHardy [this message]
2007-04-12 22:49       ` Mohammad Mohsenzadeh
2007-04-13  4:22         ` Patrick McHardy
     [not found]           ` <200704161302.l3GD27Ft021389@toshiba.co.jp>
2007-04-16 13:10             ` Patrick McHardy
2007-04-16 13:02       ` Yasuyuki KOZAKAI

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=461D2748.4050000@trash.net \
    --to=kaber@trash.net \
    --cc=mmohsenz@gmail.com \
    --cc=netfilter-devel@lists.netfilter.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.