On Wed, Apr 24, 2002 at 02:13:16PM -0500, Amit Kucheria spoke out thus: Amit, > Thanks Varun. I figured this one out yesterday after a complete walk > through of net_bh(), qdisc_run_queues(), qdisc_restart() and > dev_queue_xmit() > > Now my only question is: > > What happens in case of a device to which none of the well-known qdiscs > (cbq, sfq, wrr etc.) is attached? In that case, the device is 'stuck' with > the noop_qdisc which it gets during its registration - > register_netdevice(), right? >From what I can see of the code in register_netdevice (and the wrapper regsiter_netdev), no default qdisc is assigned to a device, if it doesn't already contain one when these functions are called - not even noop_qdisc. The result should be that dev->qdisc == NULL when it get's checked in dev_queue_xmit, and thus queuing is altogether ignored for such a device, and the skb is sent to the dev->hard_start_xmit function instead. Maybe I'm missing something here. What kernel version are you using? > And the enqueue function for the noop_qdisc is noop_enqueue() which just > frees the skb! So where is the actual packet kicked out from? Two part answer to this: 1) If device does indeed have a noop_qdisc associated with it, the skb would get "lost" in the noop_enqueue function. 2) Most interfaces, even those configured with good 'ol ifconfig have a queueing discipline associated with them. I believe the default is pfifo_fast. You can check this by running "ip link show" on you m/c. So a "standard" interface configured with ifconfig would still let all packets go through! Regards, -Varun -- --------------------------------------- Mindframe Software & Services Pvt. Ltd. http://www.mindsw.com --------------------------------------- -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/