-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDP synproxy acceleration with iptables SYNPROXY cause small packet transmission intermittently #7
Comments
the XDP synproxy program from kernel selftest seems aiming to test the correctness of BPF infrastructure. not necessarily aiming for production code efficiency, and production performance. Make a few code optimizations to reduce real production latency. see #7 Signed-off-by: Vincent Li <[email protected]>
the small packet transmission happens intermittently with https://check-host.net/check-http?host=https://www.bpfire.net for some locations up to 4 - 6 seconds delay when XDP generated SYNACK with tcp option mss, wscale, SACK, timestamp enabled. only enable mss option for the XDP generated SYNACK, the small packet transmission issue does not occur, use 72cd8df as workaround for now |
the tcp header length is wrong and potentially result in small packet transmission and result in slow website page loading when XDP synproxy program is attached. also made a few code optimizations. see [0] [0]: vincentmli/xdp-tools#7 Signed-off-by: Vincent Li <[email protected]>
the XDP synproxy program from kernel selftest seems aiming to test the correctness of BPF infrastructure. not necessarily aiming for production code efficiency, and production performance. Make a few code optimizations to reduce real production traffic latency. see #7 Co-developed-by: "DNSPROXY.ORG LLC <[email protected]>" Signed-off-by: Vincent Li <[email protected]>
bpf_loop is hard coded with 6, this may result in tcp options not parsing correctly ? and result in small packet transmission to slow down website page loading when XDP synproxy program is attached. also the for loops introduce extra execution time. potentially affect real production traffic. see [0] [0]: vincentmli/xdp-tools#7 Signed-off-by: Vincent Li <[email protected]>
the XDP synproxy program from kernel selftest seems aiming to test the correctness of BPF infrastructure. not necessarily aiming for production code efficiency, and production performance. bpf_loop is hard coded with loop count 6, this may result in tcp options not parsing correctly in real production traffic and potentially cause traffic latency with small packet being sent over the wire. see #7 Reported-by: "DNSPROXY.ORG LLC <[email protected]>" Signed-off-by: Vincent Li <[email protected]>
bpf_loop is hard coded with 6, this may result in tcp options not parsing correctly for real world production traffic and result in small packet transmission to slow down website page loading. also the for loops introduce extra execution time. potentially affect real production traffic. see [0] [0]: vincentmli/xdp-tools#7 Reported-by: DNSPROXY.ORG LLC <[email protected]> Signed-off-by: Vincent Li <[email protected]>
this is to workaround XDP synproxy intermittent small packet transmission issue when window scale, time stamp is enabled see #7 ./xdp_synproxy --iface lo --mss4 1460 --mss6 1440 --wscale 0 --ttl 64 --ports 443 result XDP generated SYNACK TCP Options: (4 bytes), Maximum segment size ./xdp_synproxy --iface lo --mss4 1460 --mss6 1440 --wscale 7 --ttl 64 --ports 443 result XDP generated SYNACK TCP Options: (16 bytes), Maximum segment size, SACK permitted, Timestamps, NOP, Wscale Signed-off-by: Vincent Li <[email protected]>
XDP generated SYNACK tcp options with window scaling and timestamp could intermittently cause small packet transmission on DDoS protected server. allow user to disable window scaling when such problem occurs. see [0] [0]: vincentmli/xdp-tools#7 Reported-by: DNSPROXY.ORG LLC <[email protected]> Signed-off-by: Vincent Li <[email protected]>
further testing also shows that if do not attach the XDP program, but only setup the iptables rules below, the small packet size transmission problem also occurs. remove the
but if attach the XDP program with iptables rules without |
|
when test loading simple website https://www.bpfire.net from https://check-host.net/check-http?host=https://www.bpfire.net, there are 5-6 seconds delay for some country locations when XDP syncookie program is attached to the bpfire.net server interface.
from the capture on client machine, it looks bpfire.net server send small size packet
Len=501
according to client window size501
, not using client's caculated window size64128
according to window size scaling factorThe text was updated successfully, but these errors were encountered: