> - dev->tbusy is set on exit from dev->hard_start_xmit, when device
> is not ready to accept new packets. If dev->hard_start_xmit fails
> on current packet and returns dev->tbusy MUST be set.
> But driver SHOULD be clever and set dev->tbusy, when it sees
> that this packet is still accepted, but the next one will not.
My driver is weird a little because hard_start_xmit doesn't send out
the packet. It just queues it up for later send and when circumstances
make it enable then driver sends the queued packets out.
In this case hard_start_xmit should set tbusy when it is unable to
queue up the packet only. Am I right? But how to inform upper layers
if packets are sent out successfully or not?
My problem is that the driver can successfully accept more than one
packet from upper layer but later it can fail to send them out. How
can I manage this situation? Refuse additional packets until the
actual one is really sent out? It would be safe but could slow down my
driver and make it inefficient..
> - when device finishes transmission or a room in its output queue
> appears, it should clear dev->tbusy and call mark_bh(NET_BH) to
> wakeup upper layers.
OK, it's clear.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/