Messages in this thread | | | Subject | Re: dev->tbusy | From | Jes Sorensen <> | Date | 09 Feb 1999 17:20:35 +0100 |
| |
>>>>> "Daniel" == Daniel Drotos <drdani@mazsola.iit.uni-miskolc.hu> writes:
Daniel> My driver is weird a little because hard_start_xmit doesn't Daniel> send out the packet. It just queues it up for later send and Daniel> when circumstances make it enable then driver sends the queued Daniel> packets out.
In a way many cards behave like that, ie. you hand a packet to the card and the card sends it out when it feels like it.
Daniel> In this case hard_start_xmit should set tbusy when it is Daniel> unable to queue up the packet only. Am I right? But how to Daniel> inform upper layers if packets are sent out successfully or Daniel> not?
You don't, it is up to the upper layer protocols to deal with retransmission if necessary.
Daniel> My problem is that the driver can successfully accept more Daniel> than one packet from upper layer but later it can fail to send Daniel> them out. How can I manage this situation? Refuse additional Daniel> packets until the actual one is really sent out? It would be Daniel> safe but could slow down my driver and make it inefficient..
If it fails to send them out you simply discard the packets. It is perfectly 'legal' for packets to get lost on the way to their destination, if you want to make sure data is transmitted correctly you should use a reliable protocol such as TCP.
Jes
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |