//参考 深入理解linux网络技术内幕
//设备接收数据的调度
//在由驱动程序提供的数据接收中断中:
// 1.非napi设备使用netif_rx向上传递skb
// 2.napi设备使用netif_rx_schedule
//设备发送数据的调度
// 调度只针对具有队列规则的设备,在qdisc_run中如果无法获得xmit_lock锁,则通过规则队列重新入队skb,在net_tx_action中,获取queue_lock失败,调度设备
// 对于不使用队列规则的设备,直接通过dev_queue_xmit调用驱动的hard_start_xmit完成传输
//调度发生的路径
// dev_queue_xmit->qdisc_run->netif_schedule
// net_tx_action->netif_schedule
//调度设备发送数据,将设备链接到per-cpu的softnet_data->output_queue中,触发软中断
1.1 static inline void netif_schedule(struct net_device *dev)
{
//如果设备没有关闭传输
if (!test_bit(__LINK_STATE_XOFF, &dev->state))
//执行实际的调度设备操作
__netif_schedule(dev);
}
//netif_schedule->__netif_schedule
1.2 static inline void __netif_schedule(struct net_device *dev)
{
//设备没有被调度
if (!test_and_set_bit(__LINK_STATE_SCHED, &d