Which "Process" in the Linux will be handled when Thousands of packets are at the Interface...
Will it check all incoming packet Headers ? if (Yes) what happens to others process which are already running in the system.
This Question i was faced in one interview......Pls any body give me the answer.
Thanks in Advance.
1. Whenever a packet with matching MAC address or link layer bradcast (ARP, etc) is received, an interrupt is raised by the NIC card.
2. This interrupt is catched by the NIC card's driver (eg: For realtek, 8139too.ko or 8139too.o dirver handles it).
3. Then the driver puts the packet data into RAM by fetching it via DMA or Programmed I/O and allocates memory for skb.
4. After memory allocation, it calls protocol independent device support routine - on linux, it is netif_rx
5. Now the rcvd packet in skb is queued for processor handling and a soft IRQ is raised.
6. After this softirq, the interrupt handler exits and all interrupts are reenabled.
7. After softIRQ handling, ithe packet is sent to other protocol dependent routines for other processing. Then comes the process that u asked abt.
And to add to cyberinstru's post, the process or thread is called ksoftirq, carries often PID number 2 and runs with least priority to not stress the system if there is much traffic on the network.
If you run "top", you can see what ksoftirq is doing. :cool: