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.
|