Normally, when packets are queued to the ndis network interface, ndis_start() is called to move packets from the interface send queue to the underlying NDIS driver. If the network link is down or the underlying driver is busy transmitting data, ndis_start() just returns. When the link goes up, ndis_starttask() is supposed to be called after ndis_ticktask() in order to transmit already queued packets. After a watchdog timeout, ndis_starttask() is likewise supposed to be called after ndis_resettask(). Unfortunately, work items used for triggering calls to ndis_ticktask(), ndis_starttask() and ndis_resettask() are placed on separarate task lists which are handled by separate kernel processes, thus losing ordering information about when the tasks should be performed in relation to each other. If the interface send queue is full after a watchdog timeout or link up event and the tasks were handled in the wrong order then further attempts to send packets via the interface results in ENOBUFS ("No buffer space available"). Fix: A proper fix is to ensure that related tasks are handled in the correct order. The following kludge justs add extra attempts at scheduling calls to ndis_starttask() as part of the processing of ndis_ticktask() and ndis_resettask(). It depends on defensive coding in IoQueueWorkItem(), i.e. that nothing is done if the work item is already queued. How-To-Repeat: Use the ndis driver for a wireless network card in an area with many APs on nearby channels and on a machine with many active tcp connections, causing link to temporarily go down every few hours, and the interface send queue to be filled while the link is temporarily down.
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s).
Responsible Changed From-To: freebsd-net->cokane PR refers to a recent commit of changes that I made, I will look into solving this problem in my development branch.
Responsible Changed From-To: cokane->freebsd-net returned to the pool by request (some time ago.)
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>