<div dir="ltr">Hi All,<div><br></div><div><br></div><div style>I was reading "Understanding linux networking Internal" book and the pdf "Network packet capture in Linux kernelspace" on the link <a href="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">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</a></div>
<div style><br></div><div style>In the "Understanding linux networking Internal" under topic 9.2.2 it is given that </div><div style>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.<br></div><div style><br></div><div style>Now the query is when the 2nd part is scheduled and </div><div style><br></div><div style>in "Network packet capture in Linux kernel space" the packet input flow is described as:-</div>
<div style><div>When working in interrupt driven model, the nic registers an</div><div>interrupt handler;</div><div>• This interrupt handler will be called when a frame is received;</div><div>• Typically in the handler, we allocate sk buff by calling</div>
<div>dev alloc skb();</div><div>• Copies data from nic’s buffer to this struct just created;</div><div>• nic call generic reception routine netif rx();</div><div>• netif rx() put frame in per cpu queue;</div><div>• if queue is full, drop!</div>
<div>• net rx action() decision based on skb->protocol;</div><div>• This function basically dequeues the frame and delivery a copy</div><div>for every protocol handler;</div><div>• ptype all and ptype base queues</div>
<div><br></div><div><br></div><div style>I want to know when netif rx(); and net rx action() are called?</div><div style>Who call them i mean who schedule them.</div><div style><br></div><div style><br></div><div style>Please guide.</div>
<div style><br></div><div style><br></div><div style>Thanks</div></div></div>