XDP synproxy cause packet delay?

Vincent Li <[email protected]> Fri, 8 Nov 2024 11:55:45 -0800
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CAK86TEc1hc-KYcmFjyTfsmxDLH9QLL=+=wZSkvGTE-A0fFLiug@mail.gmail.com>
Hi,

I have ported kernel XDP synproxy selftest
https://elixir.bootlin.com/linux/v6.11.6/source/tools/testing/selftests/bpf/progs/xdp_synproxy_kern.c
to https://github.com/vincentmli/xdp-tools/tree/master/xdp-synproxy,
barely make any changes functionally. one user reported to me after
attaching the XDP synproxy to their server hosting website, they
observed slow website page loading.

I somehow could reproduce the issue by testing a simple one page
website https://check-host.net/check-http?host=https://www.bpfire.net,
some random country locations would report 5 - 6 seconds delay. I have
capture screenshot  here
https://github.com/vincentmli/xdp-tools/issues/7#issuecomment-2465554843,
it looks to me for some reason server split the SSL server hello with
small packet size according to client's advertised receive window, tcp
window scaling is not in effect for some reason, I suspect the small
packet size sent from server caused the delay, the  strange part is
this does not alway happen since majority of other country locations
seems fine.

with XDP detached, no such problem.

Any clue to troubleshooting this issue?

Thanks

Vincent