lkml.org 
[lkml]   [2005]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Is it a process?
From
Date
On Mon, 2005-08-08 at 08:39 +0200, Jan Engelhardt wrote:
> >> when linux kernel receives a packet from the netcard and the forwards it .
> >> the process can be viewed as a kernel process ?
> >> and if this process can be interrupted ?
> >
> >When a packet is received from the kernel, this is first done by an
> >interrupt handler to just get the packet. Then the rest (forwarding) is
>
> Do you mean forwarding from NIC to kernel space, or already the iptables
> FORWARD chain? What about packets destined for the local machine that just hit
> INPUT?

When the interrupt goes off upon receiving a packet. The driver
"forwards" it from the NIC to the kernel space. Note, this most likely
already happened via DMA but the driver manages the memory that was
used. Then the driver (still in the interrupt) calls netif_rx which
queues the packet on the input queue and wakes up the NET_RX_SOFTIRQ
tasklet. This tasklet will handle the processing of the packet, until it
can find a task that this packet belongs to and then it "forwards" the
packet off to that task.

>
> >done by a tasklet. This tasklet can be run either by the softirqd (a
> >kernel thread) or at certain locations in the kernel. So this is not a
>
> What is the name of this tasklet? ksoftirqd shows up in "ps", but no childs
> for it.

The tasklet is named NET_RX_SOFTIRQ. No it is not a task, which I said
that it wasn't in my last email. I said that the softirqd (ksoftirqd)
may execute the code for that tasklet, or it may be handled on return
from an interrupt. This is _not_ a task that would show up in ps
(unless you are running Ingo Molnar's RT patch, which does things
differently to this regard).

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-08 15:27    [W:0.062 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site