Skip to content

Commit

Permalink
Revert "use __tcp_space_from_win TODO"
Browse files Browse the repository at this point in the history
This reverts commit ac8675e0838373ee4955abace84ee03cb6a93e83.
  • Loading branch information
Geliang Tang committed May 7, 2024
1 parent 3297a3c commit e06aa35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)
* when we update icsk_ack.rcv_mss.
*/
if (unlikely(len != icsk->icsk_ack.rcv_mss)) {
u64 val = __tcp_space_from_win(skb->truesize, skb->len);
u64 val = (u64)skb->len << TCP_RMEM_TO_WIN_SCALE;

do_div(val, skb->truesize);
tcp_sk(sk)->scaling_ratio = val ? val : 1;
}
icsk->icsk_ack.rcv_mss = min_t(unsigned int, len,
Expand Down

0 comments on commit e06aa35

Please sign in to comment.