From: chas w. - C. <ch...@cm...> - 2010-08-20 13:26:50
|
On Fri, 20 Aug 2010 11:12:44 +1000 Nathan Williams <na...@tr...> wrote: > Hi, > > Is there any mechanism for an ATM driver to tell the kernel that its > TX queue is full? I'd like to keep solos-pci's TX queue short so > traffic priorities can be managed in the kernel. > > I think network devices can use netif_stop_queue(), so I'm wondering > if there's something similar for ATM devices. i suspect this doesnt work the way you think it does. the .send routine does return a value to indicate if it was successful in scheduling the data to be transmitted. however, it is up the layer to actually do something if the send fails. using lec as an example, if the send fails, it calls a netif_stop_queue() to pause sending for a little while. this generally causes whatever protocol is running over the network interface to handle this packet loss/stoppage as congestion and backoff in someway. i suppose if we were considering rewriting the interface, the atm tx layer could use some sort of callback provided by the next layer to ask the layer to stop sending. then the driver writer would need to handle calling some sort of resume when the hardware is ready to send again. what layer are you using to talk to the solos-pci tx queue? some of the layers in the atm stack ignore the .send return code still. |