linux kernel 工程师
全部博文(99)
发布时间:2014-02-11 17:48:28
__netif_receive_skb用来实现驱动与协议栈的结合static int __netif_receive_skb(struct sk_buff *skb){ struct packet_type *ptype, *pt_prev; rx_handler_func_t *rx_handler; struct net_device *orig_dev; struct net_device *null_or_dev; bool deliver_exact = false; in.........【阅读全文】
发布时间:2014-02-11 14:23:32
softnet_data是个percpu变量/* * Incoming packets are placed on per-cpu queues */struct softnet_data { struct Qdisc *output_queue; struct Qdisc **output_queue_tailp; // napi->poll_list结构挂入这个list,包括NAPI接口的driver以及非NAPI接口的drive.........【阅读全文】
发布时间:2014-02-11 11:57:03
1. 网络接收注册软中断static int __init net_dev_init(void){....open_softirq(NET_RX_SOFTIRQ, net_rx_action);}2. net_rx_action流程static void net_rx_action(struct softirq_action *h){ struct softnet_data *sd = &__get_cpu_var(softnet_data); unsigned long time_limit = jiffi.........【阅读全文】