lkml.org 
[lkml]   [1999]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: dev->tbusy
From
Date
>>>>> "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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.043 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site