#171995 - PypeBros - Thu Jan 07, 2010 5:40 pm
I've never seen a TCP implementation behaving like dswifi, and chances are that it might explain the "data losses" and deadlocks I'm experiencing with my homebrew. The dswifi code I'm using is a bit old (dkp-r21, tagged "2005-2006"), so I've compared my version (2005-2006) against the latest version in devkitpro and did not noticed significant changes in the TCP protocol handling.
I've got a snapshot of a wireshark capture highlighting the problem, to help explaining my concern.
The first oddity is that the DS seems to ACKnowledge everything from the PC, including pure ACKs (that is, packets with 0 bytes of data). I added a filtering rule to get that noise out of the trace, so you won't see it on the screenshot.
Moreover, it doesn't look to take all ACKs into account when sending a packet, but only the oldest one ... E.g. if you look closely at lines 4060 & 4061 on the screenshot, the DS clearly received some ACK from the PC, since it increases the sequence number (and transmit new data). However, while the PC said "I got everything up to byte #101796", the DS keeps starts transmission from byte #100633 (that is, 256 bytes farther).
My code use non-blocking sockets and tries to send 256 bytes every 5/60th second, rolling back if transmission couldn't be done properly. (I'll tripple-check it, just in case) ...
Has anyone observed this before ? If not, I plan to study Sg Stair's code to figure out how I could improve it.
_________________
SEDS: Sprite Edition on DS :: modplayer
I've got a snapshot of a wireshark capture highlighting the problem, to help explaining my concern.
The first oddity is that the DS seems to ACKnowledge everything from the PC, including pure ACKs (that is, packets with 0 bytes of data). I added a filtering rule to get that noise out of the trace, so you won't see it on the screenshot.
Moreover, it doesn't look to take all ACKs into account when sending a packet, but only the oldest one ... E.g. if you look closely at lines 4060 & 4061 on the screenshot, the DS clearly received some ACK from the PC, since it increases the sequence number (and transmit new data). However, while the PC said "I got everything up to byte #101796", the DS keeps starts transmission from byte #100633 (that is, 256 bytes farther).
My code use non-blocking sockets and tries to send 256 bytes every 5/60th second, rolling back if transmission couldn't be done properly. (I'll tripple-check it, just in case) ...
Has anyone observed this before ? If not, I plan to study Sg Stair's code to figure out how I could improve it.
_________________
SEDS: Sprite Edition on DS :: modplayer