Giacomo
2005-12-11 20:39:16 UTC
Good morning, i would like to know exactly the context of execution
of code registered with netfilter hooks.
As far as I understood, the context is that of a softirq, inside a
bottom half. Correct me if i'm wrong..
But is it concerned with tasklets?
Is execution serialized? In other words, if packet A fr instance is
received from the net, and then packet
B immediately, is packet A processed entirely before packet B? Or code
can be executed in parallel
for packet A and B?
Moreover: interrupts are enabled in such context, aren't they? And that
means that also a
software timer can interrupt a routine being executed in bottom half.
But software timers run with sw interrupts disabled, so a timeout
handler for instance cannot
be interrupted by a routine managing reception of a packet arrived on
the wire.
It is not clear to me the concurrency to which structures are subject,
also in an uniprocessor system:
in_irq(), in_softirq(), in_interrupt() functions return different values
also if positioned at the same place in the code... is there a mean
(function) to know if sofware/hw interrupts are enabled in a portion of
code?
Thanks a lot for any suggestion or any indication to understand how
things are really.
Giacomo.
of code registered with netfilter hooks.
As far as I understood, the context is that of a softirq, inside a
bottom half. Correct me if i'm wrong..
But is it concerned with tasklets?
Is execution serialized? In other words, if packet A fr instance is
received from the net, and then packet
B immediately, is packet A processed entirely before packet B? Or code
can be executed in parallel
for packet A and B?
Moreover: interrupts are enabled in such context, aren't they? And that
means that also a
software timer can interrupt a routine being executed in bottom half.
But software timers run with sw interrupts disabled, so a timeout
handler for instance cannot
be interrupted by a routine managing reception of a packet arrived on
the wire.
It is not clear to me the concurrency to which structures are subject,
also in an uniprocessor system:
in_irq(), in_softirq(), in_interrupt() functions return different values
also if positioned at the same place in the code... is there a mean
(function) to know if sofware/hw interrupts are enabled in a portion of
code?
Thanks a lot for any suggestion or any indication to understand how
things are really.
Giacomo.