How to network, or because of the monkey's curiosity is very heavy, understand the file system [in this monkey brother is not modest], to IO generated a strong interest, then in the entire computer IO mainly from two modules: 1) Storage 2) network.
The storage part, mainly handles the correspondence between the page and the block in the Pagecache, so what about the network?
The model of the wireless card in the monkey's book is:
Iwlwifi
So, find the corresponding source code is: Drivers/net/wireless/iwlwifi
Many textbooks tell that when the data block is received, it is assigned the SKB_BUFFER structure in the driver, and it is found that the function is: IWL_MVM_RX_RX_MPDU use perf grab this function call stack, is how step by step came to Iwl_mvm_rx_rx_ Where's MPDU?
Iwl_pcie_irq_handler
---->IWL_MVM_RX
------->IWL_MVM_RX_RX_MPDU
Calling ALLOC_SKB is called in IWL_MVM_RX_RX_MPDU to allocate a sk_buff to complete the real data.
If from the IWL_MVM_RX_RX_MPDU layer to go up to parse, you can really see how this packet is resolved step by step, really cool, different from the file system, where the memory is the driver allocated, and is called from the slab kmem_cache_alloc_ node is assigned, that is, the allocation of memory in the Kmem_cache_alloc_node, who told me that I could not allocate memory in the interrupt?????
Look at the code in __ALLOC_SKB, there are important data structure initialization of the code, too important, it is recommended to first the big Red Book about Sk_buff structure look.
Well, at this point, we'll
Play Wireless network