slirp4netns icon indicating copy to clipboard operation
slirp4netns copied to clipboard

libslirp doesn't support tcp window scaling

Open majek opened this issue 6 years ago • 2 comments

I'm looking at slirp4netns, and so far I'm very impressed with it (mostly libslirp).

Having said that, it would be nice if libslirp supported window scaling. The TCP handshake:

13:25:13.351571 IP 10.0.2.100.36762 > 1.1.1.1.80: Flags [S], seq 3200377829, win 65408, options [mss 61440,sackOK,TS val 595233473 ecr 0,nop,wscale 7], length 0
13:25:13.374705 IP 1.1.1.1.80 > 10.0.2.100.36762: Flags [S.], seq 7552001, ack 3200377830, win 65535, options [mss 61440], length 0

The SYN+ACK produced by libslirp lacks window scaling. This means we have max ~1 in flight packet (over links with MTU=64K), which is not happy.

I'm not entirely sure if having window scaling (ie: sliding window > 64K) would benefit performance, since in most cases the link between slirp and application has small RTT, but I guess it could reduce at least the amount of ACK's flying back.

majek avatar Dec 18 '19 12:12 majek

cc @elmarco

AkihiroSuda avatar Dec 18 '19 12:12 AkihiroSuda

@AkihiroSuda feel free to open / move the bug to libslirp.

fwiw, I am not exactly impressed by libslirp. The code is showing age, and has seen a number of vunlerabilities. Yet, we don't have anything better for now. I have done some PoC based on rust smoltcp, which is imho a far more "impressive" work ;)

elmarco avatar Dec 18 '19 12:12 elmarco