Skip to content

Commit

Permalink
mptcp: fix the default value of scaling_ratio
Browse files Browse the repository at this point in the history
BPF tests fail sometimes with "bytes != total_bytes" errors:

 test_default:PASS:sched_init:default 0 nsec
 send_data:PASS:pthread_create 0 nsec
 send_data:FAIL:recv 936000 != 10485760 nr_recv:-1 errno:11
 default: 3041 ms
 server:FAIL:send 7579500 != 10485760 nr_sent:-1 errno:11
 send_data:FAIL:pthread_join thread_ret:-11 test_default:PASS: \
				has_bytes_sent addr_1 0 nsec
 test_default:PASS:has_bytes_sent addr_2 0 nsec
 close_netns:PASS:setns 0 nsec

In this case mptcp_recvmsg() gets EAGAIN errors. This issue introduces
by commit b8dc6d6 ("mptcp: fix rcv buffer auto-tuning"). The default
value of scaling_ratio should be TCP_DEFAULT_SCALING_RATIO, not U8_MAX.

Fixes: b8dc6d6 ("mptcp: fix rcv buffer auto-tuning")
Closes: multipath-tcp/mptcp_net-next#487
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang authored and intel-lab-lkp committed May 7, 2024
1 parent 2692422 commit 8ba7afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1981,9 +1981,9 @@ static int __mptcp_recvmsg_mskq(struct mptcp_sock *msk,
*/
static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
{
u8 scaling_ratio = TCP_DEFAULT_SCALING_RATIO;
struct mptcp_subflow_context *subflow;
struct sock *sk = (struct sock *)msk;
u8 scaling_ratio = U8_MAX;
u32 time, advmss = 1;
u64 rtt_us, mstamp;

Expand Down

0 comments on commit 8ba7afb

Please sign in to comment.