Skip to content

Commit

Permalink
use __tcp_space_from_win TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
  • Loading branch information
Geliang Tang committed May 7, 2024
1 parent 081eead commit f332a36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ 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 = (u64)skb->len << TCP_RMEM_TO_WIN_SCALE;
u64 val = __tcp_space_from_win(skb->truesize, skb->len);

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 f332a36

Please sign in to comment.