Re: Skipping past TCP lost packet in userspace
From: Josh Lehan <hidden>
Date: 2011-06-01 08:10:13
On 05/31/2011 10:23 AM, Yuchung Cheng wrote:
This paper may have a solution to your problem "Minion—an All-Terrain Packet Packhorse to Jump-Start Stalled Internet Transports" http://csweb1.fandm.edu/jiyengar/lair/papers/minion-pfldnet2010.pdf
Nice, thanks for pointing me to this. I appreciate the helpful answer, instead of just saying "use UDP" or "use SCTP". That's not the point. For better or for worse, TCP is realistically the only viable protocol for streaming to the largest possible audience these days, hence my question about adding this feature to the Linux TCP implementation. As for the Linux receiver, I was thinking of 2 features: 1) Assuming the application has already read all data that would be possible without blocking, perform something like an ioctl() to peek at the data, and peek to see if there is any out-of-order data behind a gap. 2) If the out-of-order data is enough to be useful to the application, another ioctl() could be done, to ask the kernel to jump over the gap and deliver the data to the application. At this point the missing data would be considered lost. The data behind the gap would then be delivered to the application as part of its normal reading stream. The TCP sequence numbers would advance, as usual, just as if the missing data had been there all along. This will need some more thought in order to work in real life, such as needing to be blocked on (select(), poll(), etc.) without having to busywait the "peek" ioctl. Also, it would be nice to have an ioctl() to reclaim the missing data that was skipped over, should that data happen to successfully arrive late, so that the application could still save it (or whatever) instead of it having to be discarded. Josh Lehan