On 10/30/2011 6:03 PM, Ryan Stone wrote:
On Sun, Oct 30, 2011 at 4:57 AM, Hooman Fazaeli<hoomanfaza...@gmail.com>  wrote:
IMHO, this is not a driver issue and the real fix would be to change
IFQ_HANDOFF to call if_start when the queue is full.
I'm not sure that's the right approach.  99% of the time, calling
if_start when the queue is full will be a waste of time. It seems to
me that the link interrupt handler needs to kick off the tx task to
drain the tx queue instead.
If the queue were not full, system would consume the CPU for sending
packets. Now, that it is full, a much little time is used to recover
from a (temporary) problem. Not a big deal!

Furthermore, the most common case for queue being full is stack
sending packets too fast. In this case OACTIVE is set and if_start
is not called at all.

Changing HANDOFF has the benefit that it is simple, can be implemented fast and
fixes the problem once for all drivers and for all such dangerous bugs not yet
discovered. It also makes drivers' code simpler.


_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to