public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: lab liscs <liscs.lab@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Is it a process?
Date: Mon, 08 Aug 2005 09:25:15 -0400	[thread overview]
Message-ID: <1123507515.18332.160.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.61.0508080838260.18088@yvahk01.tjqt.qr>

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



      reply	other threads:[~2005-08-08 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05 13:02 Is it a process? lab liscs
2005-08-05 15:17 ` Steven Rostedt
2005-08-08  6:39   ` Jan Engelhardt
2005-08-08 13:25     ` Steven Rostedt [this message]

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=1123507515.18332.160.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liscs.lab@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox