Question regarding netif_tx_disable and netif_stop_queue
From: Keyur Chudgar <hidden>
Date: 2008-03-21 22:09:34
From: Keyur Chudgar <hidden>
Date: 2008-03-21 22:09:34
Hi, I am writing a device driver for new emac hardware. I have a question regarding netif_tx_disable and netif_stop_queue. If the Emac hardware's queue is full and I need to assist the kernel with stopping the packet scheduling from kernel, which function should I use, if I am invoking it from outside of hard_start_xmit method? Probably it will be from the interrupt context or polling routine. From the review, I understand that I should use netif_tx_disable(struct net_device *dev); and not use netif_stop_queue (this function is generally used from within hard_start_xmit). I think netif_tx_disable is more suitable for SMP environment also, as it takes care for hard_start_xmit method is not running on another CPU. But I just would like to make sure about it. Thanks, - Keyur