Packet reception between driver and kernel

来源:互联网 发布:mac装win10无线 编辑:程序博客网 时间:2024/06/04 18:43

1. in function net_device->open, request_irq is used to allocate
   an interrupt line and register the interrupt handler
 

2. netif_rx or netif_rx_schedule is called in the interrupt handler
   which is used to inform the kernel for a coming frame.
   These two function behave differently. The first one will enqueue the
   packet into softnet_data->input_pkt_queue, while the second one will enqueue
   the device into softnet_data->pool_list.
 

3. netif_rx_shedule and netif_rx_complete are used to inqueue and dequeue
   one net_device on poll_list
 

4. net_rx_action is the bottom half of interrupt routine,
   it will check the poll_list for those device and call the
   net_device->poll to dequeue the ingress packets
 

5. net_device->poll use netif_receive_skb to determine which function
   handler to execute to process the packet at L3

原创粉丝点击