This driver is used for a relatively common server NIC, the Intel Ethernet Controller I350. This blog post will look at the igb network driver. We’ll need to closely examine and understand how a network driver works, so that parts of the network stack later are more clear. Understanding exactly how packets are received in the Linux kernel is very involved. This blog post will be examining the Linux kernel version 3.13.0 with links to code on GitHub and code snippets throughout this post. Much of the information presented will serve as a reference for other protocol layers, as well. The protocol layers examined below are the IP and UDP protocol layers. This entire flow will be examined in detail in the following sections. Data is added to receive buffers attached to sockets by protocol layers.Network data frames are handed to the protocol layers from the queues.Incoming network data frames are distributed among multiple CPUs if packet steering is enabled or if the NIC has multiple receive queues.Data that was DMA’d into memory is passed up the networking layer as an ‘skb’ for more processing.Memory regions in the ring buffer that have had network data written to them are unmapped.The ksoftirqd processes pull packets off the ring buffer by calling the NAPI poll function that the device driver registered during initialization. ksoftirqd processes run on each CPU on the system.Driver calls into NAPI to start a poll loop if one was not running already.Hardware interrupt is generated to let the system know a packet is in memory.Packet is copied (via DMA) to a ring buffer in kernel memory. ![]()
0 Comments
Leave a Reply. |