* Related to Network packet in kernel
@ 2013-04-04 11:59 Tarun Batra
2013-04-04 16:23 ` michi1 at michaelblizek.twilightparadox.com
0 siblings, 1 reply; 2+ messages in thread
From: Tarun Batra @ 2013-04-04 11:59 UTC (permalink / raw)
To: kernelnewbies
Hi All,
I was reading "Understanding linux networking Internal" book and the pdf
"Network packet capture in Linux kernelspace" on the link
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDQQFjAA&url=http%3A%2F%2Fberaldoleal.com%2Ftalks%2Fnetworkkernel.pdf&ei=-GldUdeUMNHhrAe8tYDoDg&usg=AFQjCNFe8_oYRoolrVi1o9d8sOT2EV5Dbg&sig2=7D4GBkYZDKWiVTZiNBgzag&bvm=bv.44770516,d.bmk&cad=rja
In the "Understanding linux networking Internal" under topic 9.2.2 it is
given that
The code that takes care of an input frame is split into two parts: first
the driver copies the frame into an input queue accessible by the kernel,
and then the kernel processes it (usually passing it to a handler dedicated
to the associated protocol such as IP). The first part is executed in
interrupt context and can preempt the execution of the second part.
Now the query is when the 2nd part is scheduled and
in "Network packet capture in Linux kernel space" the packet input flow is
described as:-
When working in interrupt driven model, the nic registers an
interrupt handler;
? This interrupt handler will be called when a frame is received;
? Typically in the handler, we allocate sk buff by calling
dev alloc skb();
? Copies data from nic?s buffer to this struct just created;
? nic call generic reception routine netif rx();
? netif rx() put frame in per cpu queue;
? if queue is full, drop!
? net rx action() decision based on skb->protocol;
? This function basically dequeues the frame and delivery a copy
for every protocol handler;
? ptype all and ptype base queues
I want to know when netif rx(); and net rx action() are called?
Who call them i mean who schedule them.
Please guide.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130404/f01634fe/attachment.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-04 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 11:59 Related to Network packet in kernel Tarun Batra
2013-04-04 16:23 ` michi1 at michaelblizek.twilightparadox.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).