This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for tftp client code


On Fri, Oct 10, 2003 at 08:51:50AM +0200, Eric Doenges wrote:
> Andrew Lunn wrote:
> 
> [ ... ]
> 
> >Did you test just the normal case or the error case as well? Its a bit
> >unusual. UDP is allowed to deliver out of sequence packets, but it
> >does not often happen. What sort of network setup do you have to make
> >this happen? Im wondering if your ethernet driver is broken. If so it
> >will affect you TCP performance.
> 
> Actually, the pakets I receive are not really "out of sequence"; instead 
> it seems that some pakets are sent twice. I would guess this happens
> when the tftp client is slower than usual sending an acknowledge for a
> DATA paket, causing the server to think the paket got lost and resending
> it. Since my target is connected to our network via a hub and the
> ethernet performance isn't that hot to begin with (nc_test reported a 
> maximum throughput of around 1.8 MByte/s, if I remember correctly), this
> doesn't seem so unlikely to me. Using tftp under Linux on the same
> hardware is only marginally faster, so I don't think this is an
> indication of driver problems.

Hummm....

Thinking about this some more, i don't see how the scenario you have
fixed could actually happen. tftp sends a data packet and expects an
ACK. It should not send the next data packet in sequence until it
receives the ACK for the previous packet. For it to close the
connection too soon, it must of received the last packeted before the
next to last packet. But this is not possible with this simple
protocol. Something else is going on here.

I would check the sequence number of the packet that is received and
it not a full size DATA packet. Is it really the last packet? Or is it
some other packet which has been truncated?

     Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]