Related to Network packet in kernel

michi1 at michaelblizek.twilightparadox.com michi1 at michaelblizek.twilightparadox.com
Thu Apr 4 12:23:48 EDT 2013


Hi!

On 17:29 Thu 04 Apr     , Tarun Batra wrote:
> 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

netif_rx()
enqueue_to_backlog()
____napi_schedule()
__raise_softirq_irqoff(NET_RX_SOFTIRQ)


When s cheduler runs, net_rx_action gets called. The function is registered in
net_dev_init: "open_softirq(NET_RX_SOFTIRQ, net_rx_action);".

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com



More information about the Kernelnewbies mailing list