From: Harald Welte <laforge@netfilter.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] fix iptables on systems with discontiguous processor ids
Date: Mon, 10 Oct 2005 23:46:19 +0200 [thread overview]
Message-ID: <20051010214619.GJ5627@rama> (raw)
In-Reply-To: <20051010.141518.60492651.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]
On Mon, Oct 10, 2005 at 02:15:18PM -0700, David S. Miller wrote:
> From: Harald Welte <laforge@netfilter.org>
> Date: Mon, 10 Oct 2005 18:41:41 +0200
>
> > This is my proposed patch for the problem you've described. Please test
> > and submit. If it works, I'll also prepare a patch for {arp,ip6}_tables.
>
> Ebtables needs it too. "git grep num_possible_cpus" shows all
> of the users in the whole tree, %80 of which are the netfilter
> cases we're fixing here :-)
>
> Why don't any of the existing interfaces on cpumasks and numbers
> provide what you need here?
I don't know why they are incomplete ;) My guess is that they're mostly
targeted to per_cpu users. Basically to solve the 'iptables' problem,
there are two ways:
1) allocate one copy of the ruleset per cpu that actually exists,
independent of their smp_processor_id(). This means that for every
packet traversing the ruleset, we need to resolve the logical "cpu
number" from the physical smp_processor_id(). Since there is no
apparent mapping between them, we'd need to iterate over the
cpu_possible bitmask and find "how many bits are set between 0 and
smp_processor_id()". I'm not sure how expensive such calculations
are, but I'd rather not additional code to the per-packet path.
Advantage of this solution is that there is only one copy of the
ruleset per physical cpu.
2) allocate one copy of the ruleset for every "possible
smp_processor_id()", which is what the patch that I sent in my last
email implements.
> Perhaps this routine you are adding (highest_processor_id()) belongs
> in linux/cpumask.h? Perhaps named something like
> "highest_possible_processor_id()" to be consistent with the
> "num_possible_cpus()" naming?
I thought it was too specific for the generic code, but since we'll need
it from all the foobar_tables, it's probably best in cpumask.h
> Otherwise the patch looks fine, thanks for following up on this
> Harald. I'll push the rest of the netfilter fixes once you cook
> up the final patch for this, thanks.
ok.
--
- Harald Welte <laforge@netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-10-10 21:46 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-10 16:41 [PATCH] fix iptables on systems with discontiguous processor ids Harald Welte
2005-10-10 21:15 ` David S. Miller
2005-10-10 21:41 ` Patrick McHardy
2005-10-10 21:52 ` Patrick McHardy
2005-10-10 22:06 ` David S. Miller
2005-10-11 14:23 ` Harald Welte
2005-10-11 19:39 ` David S. Miller
2005-10-12 6:36 ` Harald Welte
2005-10-10 22:04 ` David S. Miller
2005-10-10 21:46 ` Harald Welte [this message]
2005-10-11 13:54 ` Henrik Nordstrom
2005-10-11 14:13 ` Eric Dumazet
2005-10-11 17:45 ` Harald Welte
2005-10-11 22:57 ` David S. Miller
2005-10-12 7:00 ` Harald Welte
2005-10-13 22:01 ` Eric Dumazet
2005-10-17 4:18 ` David S. Miller
2005-10-11 10:44 ` Harald Welte
2005-10-11 17:15 ` Bart De Schuymer
2005-10-11 17:55 ` Harald Welte
2005-10-11 17:54 ` Harald Welte
2005-10-11 21:54 ` Sébastien Bernard
2005-10-11 22:32 ` David S. Miller
2005-10-12 6:22 ` seb
2005-10-12 6:31 ` David S. Miller
2005-10-12 7:04 ` Sébastien Bernard
2005-10-12 7:34 ` David S. Miller
2005-10-12 6:43 ` Harald Welte
2005-10-12 22:54 ` David S. Miller
2005-10-13 7:18 ` seb
2005-10-13 19:11 ` David S. Miller
2005-10-13 8:46 ` Herbert Xu
2005-10-13 21:14 ` David S. Miller
2005-10-13 22:37 ` seb
2005-10-14 18:33 ` Harald Welte
2005-10-10 21:48 ` Sébastien Bernard
2005-10-11 14:23 ` Harald Welte
2005-10-11 20:59 ` Sébastien Bernard
2005-10-11 21:33 ` David S. Miller
2005-10-12 6:40 ` Harald Welte
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=20051010214619.GJ5627@rama \
--to=laforge@netfilter.org \
--cc=davem@davemloft.net \
--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.