Network programming 内核中与包遍历相关的查询

Network programming 内核中与包遍历相关的查询,network-programming,linux-kernel,linux-device-driver,kernel,Network Programming,Linux Kernel,Linux Device Driver,Kernel,阅读本书后,了解Linux网络的内部结构。 我开始了解一些我们如何从网络获取数据包的概念:- > When working in interrupt driven model, the nic registers an > interrupt handler; > • This interrupt handler will be called when a frame is received; > • Typically in the handl

阅读本书后,了解Linux网络的内部结构。 我开始了解一些我们如何从网络获取数据包的概念:-

>  When working in interrupt driven model, the nic registers an
>     interrupt handler;
>     • This interrupt handler will be called when a frame is received;
>     • Typically in the handler, we allocate sk buff by calling
>     dev alloc skb();
>     • Copies data from nic’s buffer to this struct just created;
>     • nic call generic reception routine netif rx();
>     • netif rx() put frame in per cpu queue;
>     • if queue is full, drop!
>     • net rx action() decision based on skb->protocol;
>     • This function basically dequeues the frame and delivery a copy
>     for every protocol handler;
>     • ptype all and ptype base queues
>     ip v4 rcv() will receive the ip datagram (if is a ipv4 packet);   
•ip checksum, check ip headers, ....   
• ip rcv finish() makes route decision (ip forward() or ip local delivery())
现在我有一些与之相关的问题:- 关于链路上的netif_rx代码,哪个代码表示它将帧传送到上层

关于net_rx_动作,哪个代码说它根据skb->协议做出决定

数据包传输过程是什么,我的意思是什么时候分配sk_buff以及所有

请引导