File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2706,12 +2706,15 @@ static void tcp_mtup_probe_success(struct sock *sk)
2706
2706
{
2707
2707
struct tcp_sock * tp = tcp_sk (sk );
2708
2708
struct inet_connection_sock * icsk = inet_csk (sk );
2709
+ u64 val ;
2709
2710
2710
- /* FIXME: breaks with very large cwnd */
2711
2711
tp -> prior_ssthresh = tcp_current_ssthresh (sk );
2712
- tcp_snd_cwnd_set (tp , tcp_snd_cwnd (tp ) *
2713
- tcp_mss_to_mtu (sk , tp -> mss_cache ) /
2714
- icsk -> icsk_mtup .probe_size );
2712
+
2713
+ val = (u64 )tcp_snd_cwnd (tp ) * tcp_mss_to_mtu (sk , tp -> mss_cache );
2714
+ do_div (val , icsk -> icsk_mtup .probe_size );
2715
+ WARN_ON_ONCE ((u32 )val != val );
2716
+ tcp_snd_cwnd_set (tp , max_t (u32 , 1U , val ));
2717
+
2715
2718
tp -> snd_cwnd_cnt = 0 ;
2716
2719
tp -> snd_cwnd_stamp = tcp_jiffies32 ;
2717
2720
tp -> snd_ssthresh = tcp_current_ssthresh (sk );
You can’t perform that action at this time.
0 commit comments