netdev
[Top] [All Lists]

Re: Concurrency within netfilter hooks

To: "Pekka Riikonen [Adm]" <priikone@xxxxxxxxxxxxxxxx>
Subject: Re: Concurrency within netfilter hooks
From: Paul Rusty Russell <Paul.Russell@xxxxxxxxxxxxxxxx>
Date: Mon, 13 Dec 1999 11:33:26 +1100
Cc: netfilter@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: Your message of "Thu, 09 Dec 1999 13:08:20 +0200." <Pine.LNX.4.10.9912091302180.22306-100000@poseidon.pspt.fi>
Sender: owner-netdev@xxxxxxxxxxx
In message <Pine.LNX.4.10.9912091302180.22306-100000@xxxxxxxxxxxxxxxx> you writ
e:
> Hi,
> 
> Is the network layer or netfilter layer in Linux 2.3 (or in upcoming 2.4)
> threaded so that there is a possibility of for example two netfilter hooks
> executing concurrently in SMP box. For example, if PRE_ROUTING and
> POST_ROUTING hooks would be executing at the same time and they touch
> shared data, locking would have to be used to protect concurrency. Or, is
> it quaranteed that there is never a situation like this thus locking is
> not needed within the hooks.

You should assume that there will be arbitrary levels of concurrency,
and lock appropriately.

For 2.4, it won't happen, except for packets from userspace being
interrupted by bottom halves and timers, but this is changing: you can
look into Alexey's crystal ball at

        ftp://ftp.inr.ac.ru/ip-routing/softnet-*

Hope that helps,
Rusty.
--
Hacking time.

<Prev in Thread] Current Thread [Next in Thread>