Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: fix the max value of scaling_ratio
BPF tests fail sometimes (a probability of approximately 1%) with "bytes != total_bytes" errors: test_burst:PASS:open_and_load:burst 0 nsec test_bpf_sched:PASS:Scheduler name too long 0 nsec test_bpf_sched:PASS:burst 0 nsec create_netns:PASS:ip netns add mptcp_ns 0 nsec create_netns:PASS:ip -net mptcp_ns link set dev lo up 0 nsec sched_init:PASS:create_netns 0 nsec endpoint_init:PASS:ip -net mptcp_ns link add veth1 type veth peer name endpoint_init:PASS:ip -net mptcp_ns addr add 10.0.1.1/24 dev veth1 0 nsec endpoint_init:PASS:ip -net mptcp_ns link set dev veth1 up 0 nsec endpoint_init:PASS:ip -net mptcp_ns addr add 10.0.1.2/24 dev veth2 0 nsec endpoint_init:PASS:ip -net mptcp_ns link set dev veth2 up 0 nsec endpoint_init:PASS:ip -net mptcp_ns mptcp endpoint add 10.0.1.2 subflow sched_init:PASS:endpoint_init 0 nsec test_bpf_sched:PASS:burst 0 nsec send_data_and_verify:PASS:burst 0 nsec send_data_and_verify:PASS:burst 0 nsec (network_helpers.c:613: errno: Resource temporarily unavailable) \ send 5608500 expected 10485760 (network_helpers.c:661: errno: None) recv 2755984 expected 10485760 (network_helpers.c:669: errno: None) Failed in thread_ret -11 send_data_and_verify:FAIL:send_recv_data unexpected error: -4 (errno 0) multipath-tcp#162/9 mptcp/burst:FAIL multipath-tcp#162 mptcp:FAIL In this case, mptcp_recvmsg() gets EAGAIN errors. This issue introduces by commit b8dc6d6 ("mptcp: fix rcv buffer auto-tuning"). The max value of scaling_ratio should be TCP_DEFAULT_SCALING_RATIO (128), not U8_MAX (255). Otherwise, scaling_ratio is assigned to a too high value. Fixes: b8dc6d6 ("mptcp: fix rcv buffer auto-tuning") Closes: multipath-tcp#487 Signed-off-by: Geliang Tang <[email protected]>
- Loading branch information