linux kernel 工程师
全部博文(99)
发布时间:2014-02-14 10:27:37
static void net_tx_action(struct softirq_action *h){ struct softnet_data *sd = &__get_cpu_var(softnet_data); //1. 释放completion_queue中的skb if (sd->completion_queue) { struct sk_buff *clist; local_irq_disable(); clist = sd->completion_.........【阅读全文】
发布时间:2014-02-14 10:01:18
register_netdevice会初始化netdev的Tx调度discipline, 缺省使用noop_qdiscregister_netdevice --->dev_init_schedulervoid dev_init_scheduler(struct net_device *dev){ dev->qdisc = &noop_qdisc; netdev_for_each_tx_queue(dev, dev_init_scheduler_queue, &noop_qdisc); if (dev_.........【阅读全文】
发布时间:2014-02-14 09:34:18
net/sched/sched_fifo.c 实现了pfifo和bfifo这两种策略都是fifo策略,即入队时放在队列尾部,出队时从头部出队,即先进先出的方式不同点在于入队时的限制:bfifo 对队列的字节长度做限制pfofo 对队列的packets数目做限制static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch){ .........【阅读全文】
发布时间:2014-02-14 09:27:06
// pfifo_fast 这个discipiline里面有skb队列数组,优先级从大到小,队列下标分别是0,1,2// enqueue 根据skb的priority, 使用prio2band数组找出skb对应的队列// dequeue 优先选择下标为0的skb队列,0队列变空后选择1队列,1队列变空后选择2队列 // 同样优先级的skb,实现fifo策略, 入队时插入队列尾部,出队时从.........【阅读全文】
发布时间:2014-02-14 09:06:34
qdisc_restart--->sch_direct_xmit--->dev_hard_start_xmit(skb, dev, txq)---->rc = ops->ndo_start_xmit(skb, dev);/* * NOTE: Called under qdisc_lock(q) with locally disabled BH. * * __QDISC_STATE_RUNNING guarantees only one CPU can process * this qdisc at a time. qdisc_loc.........【阅读全文】