From f11c1a69cc6b202f454d5e585b6917ce2873bcc9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 9 Jun 2024 13:26:26 +0200 Subject: [PATCH] drop more patches Signed-off-by: Greg Kroah-Hartman --- queue-4.19/series | 1 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- queue-5.10/series | 1 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- queue-5.15/series | 1 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- queue-5.4/series | 1 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- queue-6.1/series | 1 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- queue-6.6/series | 6 - ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- ...em_free-for-kvmalloc-users-to-kvfree.patch | 472 ------------------ ...very-buffer-allocation-for-the-legac.patch | 76 --- ...ode-in-xfs_buffered_write_iomap_begi.patch | 70 --- ...sb_feat_incompat_log_xattrs-for-attr.patch | 48 -- ...extent-counters-in-xfs_reflink_end_c.patch | 60 --- queue-6.9/series | 2 - ...ccepted-window-in-new_syn_recv-state.patch | 111 ---- ...yte-limit-for-initial-tp-rcv_wnd-val.patch | 76 --- 20 files changed, 1382 deletions(-) delete mode 100644 queue-4.19/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-5.10/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-5.15/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-5.4/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-6.1/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-6.6/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch delete mode 100644 queue-6.6/xfs-convert-kmem_free-for-kvmalloc-users-to-kvfree.patch delete mode 100644 queue-6.6/xfs-fix-log-recovery-buffer-allocation-for-the-legac.patch delete mode 100644 queue-6.6/xfs-match-lock-mode-in-xfs_buffered_write_iomap_begi.patch delete mode 100644 queue-6.6/xfs-require-xfs_sb_feat_incompat_log_xattrs-for-attr.patch delete mode 100644 queue-6.6/xfs-upgrade-the-extent-counters-in-xfs_reflink_end_c.patch delete mode 100644 queue-6.9/tcp-reduce-accepted-window-in-new_syn_recv-state.patch delete mode 100644 queue-6.9/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch diff --git a/queue-4.19/series b/queue-4.19/series index bc7b6d0d276..d47f40a0f87 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -126,7 +126,6 @@ openvswitch-set-the-skbuff-pkt_type-for-proper-pmtud.patch arm64-asm-bug-add-.align-2-to-the-end-of-__bug_entry.patch virtio-delete-vq-in-vp_find_vqs_msix-when-request_ir.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch nfc-nci-fix-kcov-check-in-nci_rx_work.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch netfilter-nfnetlink_queue-acquire-rcu_read_lock-in-i.patch diff --git a/queue-4.19/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-4.19/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index 871d92ecc27..00000000000 --- a/queue-4.19/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 6f88dd423e7d6ca686dc446c3cc0eab6d9768e27 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index fbeb40a481fcb..105301b8d0fcb 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -216,7 +216,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-5.10/series b/queue-5.10/series index 48313bdea68..03af91b4db4 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -240,7 +240,6 @@ riscv-stacktrace-make-walk_stackframe-cross-pt_regs-.patch riscv-stacktrace-fixed-walk_stackframe.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch tls-fix-missing-memory-barrier-in-tls_init.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch nfc-nci-fix-kcov-check-in-nci_rx_work.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch netfilter-nfnetlink_queue-acquire-rcu_read_lock-in-i.patch diff --git a/queue-5.10/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-5.10/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index 2ba4fad2eef..00000000000 --- a/queue-5.10/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From d95db3294f123d366133d54b7f3c12a5ee0ac717 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 68f1633c477ae..efc57fa04f860 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -229,7 +229,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-5.15/series b/queue-5.15/series index 6fe23178ab8..0f9c3e9557a 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -298,7 +298,6 @@ riscv-stacktrace-make-walk_stackframe-cross-pt_regs-.patch riscv-stacktrace-fixed-walk_stackframe.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch tls-fix-missing-memory-barrier-in-tls_init.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch nfc-nci-fix-kcov-check-in-nci_rx_work.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch ice-interpret-.set_channels-input-differently.patch diff --git a/queue-5.15/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-5.15/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index f5b3611d202..00000000000 --- a/queue-5.15/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 12c59477dac82528294ef140ba1ce9bfd3e39a36 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 0fb84e57a2d49..dc35dbbbb5b33 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -229,7 +229,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-5.4/series b/queue-5.4/series index 463d14ea33c..8f3fb9cc73d 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -143,7 +143,6 @@ openvswitch-set-the-skbuff-pkt_type-for-proper-pmtud.patch arm64-asm-bug-add-.align-2-to-the-end-of-__bug_entry.patch virtio-delete-vq-in-vp_find_vqs_msix-when-request_ir.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch nfc-nci-fix-kcov-check-in-nci_rx_work.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch netfilter-nfnetlink_queue-acquire-rcu_read_lock-in-i.patch diff --git a/queue-5.4/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-5.4/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index c9056ef56d8..00000000000 --- a/queue-5.4/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 762d05acb3aca8988bd532e1b002382d28d6d6c0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 4f203cbbc99b5..7884b0619762f 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -231,7 +231,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-6.1/series b/queue-6.1/series index dc42424072c..220af82b337 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -419,7 +419,6 @@ riscv-stacktrace-fixed-walk_stackframe.patch revert-ixgbe-manual-an-37-for-troublesome-link-partn.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch tls-fix-missing-memory-barrier-in-tls_init.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch inet-factor-out-locked-section-of-inet_accept-in-a-n.patch net-relax-socket-state-check-at-accept-time.patch nfc-nci-fix-kcov-check-in-nci_rx_work.patch diff --git a/queue-6.1/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-6.1/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index 459621c805d..00000000000 --- a/queue-6.1/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 266711437c88ef015fb98e1e55c4a9f495eb868a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 15f814c1e1693..05bd4b73287d7 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -229,7 +229,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows)) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-6.6/series b/queue-6.6/series index 96bbce37e27..a2ae4554647 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -455,12 +455,10 @@ vfio-pci-fix-potential-memory-leak-in-vfio_intx_enab.patch fpga-region-add-owner-module-and-take-its-refcount.patch udf-remove-gfp_nofs-allocation-in-udf_expand_file_ad.patch udf-convert-udf_expand_file_adinicb-to-use-a-folio.patch -xfs-require-xfs_sb_feat_incompat_log_xattrs-for-attr.patch microblaze-remove-gcc-flag-for-non-existing-early_pr.patch microblaze-remove-early-printk-call-from-cpuinfo-sta.patch pci-wait-for-link-training-0-before-starting-link-re.patch perf-intel-pt-fix-unassigned-instruction-op-discover.patch -xfs-match-lock-mode-in-xfs_buffered_write_iomap_begi.patch risc-v-enable-cbo.zero-in-usermode.patch riscv-flush-the-instruction-cache-during-smp-bringup.patch pwm-rename-pwm_apply_state-to-pwm_apply_might_sleep.patch @@ -468,9 +466,6 @@ leds-pwm-disable-pwm-when-going-to-suspend.patch ovl-remove-upper-umask-handling-from-ovl_create_uppe.patch pci-of_property-return-error-for-int_map-allocation-.patch vmci-fix-an-error-handling-path-in-vmci_guest_probe_.patch -xfs-convert-kmem_free-for-kvmalloc-users-to-kvfree.patch -xfs-fix-log-recovery-buffer-allocation-for-the-legac.patch -xfs-upgrade-the-extent-counters-in-xfs_reflink_end_c.patch dt-bindings-pinctrl-mediatek-mt7622-fix-array-proper.patch pinctrl-qcom-pinctrl-sm7150-fix-sdc1-and-ufs-special.patch watchdog-cpu5wdt.c-fix-use-after-free-bug-caused-by-.patch @@ -655,7 +650,6 @@ riscv-stacktrace-fixed-walk_stackframe.patch revert-ixgbe-manual-an-37-for-troublesome-link-partn.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch tls-fix-missing-memory-barrier-in-tls_init.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch net-relax-socket-state-check-at-accept-time.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch drivers-xen-improve-the-late-xenstore-init-protocol.patch diff --git a/queue-6.6/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-6.6/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index 00d21407f0a..00000000000 --- a/queue-6.6/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 4db9c1f3979145b9d99ad87f0d1a0bc801c88925 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 5631041ae12cb..a0ed8ae6762d8 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -229,7 +229,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows)) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - diff --git a/queue-6.6/xfs-convert-kmem_free-for-kvmalloc-users-to-kvfree.patch b/queue-6.6/xfs-convert-kmem_free-for-kvmalloc-users-to-kvfree.patch deleted file mode 100644 index f1b18d14317..00000000000 --- a/queue-6.6/xfs-convert-kmem_free-for-kvmalloc-users-to-kvfree.patch +++ /dev/null @@ -1,472 +0,0 @@ -From e21ad7e6349c01a9b3145afd8c80f9e437666a08 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 16 Jan 2024 09:59:42 +1100 -Subject: xfs: convert kmem_free() for kvmalloc users to kvfree() - -From: Dave Chinner - -[ Upstream commit 49292576136fd2a6b58a51677c53151cf4877fa6 ] - -Start getting rid of kmem_free() by converting all the cases where -memory can come from vmalloc interfaces to calling kvfree() -directly. - -Signed-off-by: Dave Chinner -Reviewed-by: "Darrick J. Wong" -Signed-off-by: Chandan Babu R -Stable-dep-of: 45cf976008dd ("xfs: fix log recovery buffer allocation for the legacy h_size fixup") -Signed-off-by: Sasha Levin ---- - fs/xfs/xfs_acl.c | 4 ++-- - fs/xfs/xfs_attr_item.c | 4 ++-- - fs/xfs/xfs_bmap_item.c | 4 ++-- - fs/xfs/xfs_buf_item.c | 2 +- - fs/xfs/xfs_dquot.c | 2 +- - fs/xfs/xfs_extfree_item.c | 4 ++-- - fs/xfs/xfs_icreate_item.c | 2 +- - fs/xfs/xfs_inode_item.c | 2 +- - fs/xfs/xfs_ioctl.c | 2 +- - fs/xfs/xfs_log.c | 4 ++-- - fs/xfs/xfs_log_cil.c | 2 +- - fs/xfs/xfs_log_recover.c | 42 +++++++++++++++++++------------------- - fs/xfs/xfs_refcount_item.c | 4 ++-- - fs/xfs/xfs_rmap_item.c | 4 ++-- - fs/xfs/xfs_rtalloc.c | 6 +++--- - 15 files changed, 44 insertions(+), 44 deletions(-) - -diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c -index 6b840301817a9..4bf69c9c088e2 100644 ---- a/fs/xfs/xfs_acl.c -+++ b/fs/xfs/xfs_acl.c -@@ -167,7 +167,7 @@ xfs_get_acl(struct inode *inode, int type, bool rcu) - acl = ERR_PTR(error); - } - -- kmem_free(args.value); -+ kvfree(args.value); - return acl; - } - -@@ -204,7 +204,7 @@ __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) - } - - error = xfs_attr_change(&args); -- kmem_free(args.value); -+ kvfree(args.value); - - /* - * If the attribute didn't exist to start with that's fine. -diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c -index ebf656aaf3012..fc164e8f7e483 100644 ---- a/fs/xfs/xfs_attr_item.c -+++ b/fs/xfs/xfs_attr_item.c -@@ -110,7 +110,7 @@ STATIC void - xfs_attri_item_free( - struct xfs_attri_log_item *attrip) - { -- kmem_free(attrip->attri_item.li_lv_shadow); -+ kvfree(attrip->attri_item.li_lv_shadow); - xfs_attri_log_nameval_put(attrip->attri_nameval); - kmem_cache_free(xfs_attri_cache, attrip); - } -@@ -253,7 +253,7 @@ static inline struct xfs_attrd_log_item *ATTRD_ITEM(struct xfs_log_item *lip) - STATIC void - xfs_attrd_item_free(struct xfs_attrd_log_item *attrdp) - { -- kmem_free(attrdp->attrd_item.li_lv_shadow); -+ kvfree(attrdp->attrd_item.li_lv_shadow); - kmem_cache_free(xfs_attrd_cache, attrdp); - } - -diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c -index b6d63b8bdad5a..dc4c199fa7af2 100644 ---- a/fs/xfs/xfs_bmap_item.c -+++ b/fs/xfs/xfs_bmap_item.c -@@ -40,7 +40,7 @@ STATIC void - xfs_bui_item_free( - struct xfs_bui_log_item *buip) - { -- kmem_free(buip->bui_item.li_lv_shadow); -+ kvfree(buip->bui_item.li_lv_shadow); - kmem_cache_free(xfs_bui_cache, buip); - } - -@@ -201,7 +201,7 @@ xfs_bud_item_release( - struct xfs_bud_log_item *budp = BUD_ITEM(lip); - - xfs_bui_release(budp->bud_buip); -- kmem_free(budp->bud_item.li_lv_shadow); -+ kvfree(budp->bud_item.li_lv_shadow); - kmem_cache_free(xfs_bud_cache, budp); - } - -diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c -index 023d4e0385dd0..7d447fbcdd983 100644 ---- a/fs/xfs/xfs_buf_item.c -+++ b/fs/xfs/xfs_buf_item.c -@@ -1044,7 +1044,7 @@ xfs_buf_item_free( - struct xfs_buf_log_item *bip) - { - xfs_buf_item_free_format(bip); -- kmem_free(bip->bli_item.li_lv_shadow); -+ kvfree(bip->bli_item.li_lv_shadow); - kmem_cache_free(xfs_buf_item_cache, bip); - } - -diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c -index a013b87ab8d5e..5c9fd69d75959 100644 ---- a/fs/xfs/xfs_dquot.c -+++ b/fs/xfs/xfs_dquot.c -@@ -53,7 +53,7 @@ xfs_qm_dqdestroy( - { - ASSERT(list_empty(&dqp->q_lru)); - -- kmem_free(dqp->q_logitem.qli_item.li_lv_shadow); -+ kvfree(dqp->q_logitem.qli_item.li_lv_shadow); - mutex_destroy(&dqp->q_qlock); - - XFS_STATS_DEC(dqp->q_mount, xs_qm_dquot); -diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c -index c9908fb337657..8904242f4eb45 100644 ---- a/fs/xfs/xfs_extfree_item.c -+++ b/fs/xfs/xfs_extfree_item.c -@@ -40,7 +40,7 @@ STATIC void - xfs_efi_item_free( - struct xfs_efi_log_item *efip) - { -- kmem_free(efip->efi_item.li_lv_shadow); -+ kvfree(efip->efi_item.li_lv_shadow); - if (efip->efi_format.efi_nextents > XFS_EFI_MAX_FAST_EXTENTS) - kmem_free(efip); - else -@@ -229,7 +229,7 @@ static inline struct xfs_efd_log_item *EFD_ITEM(struct xfs_log_item *lip) - STATIC void - xfs_efd_item_free(struct xfs_efd_log_item *efdp) - { -- kmem_free(efdp->efd_item.li_lv_shadow); -+ kvfree(efdp->efd_item.li_lv_shadow); - if (efdp->efd_format.efd_nextents > XFS_EFD_MAX_FAST_EXTENTS) - kmem_free(efdp); - else -diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c -index b05314d48176f..4345db501714e 100644 ---- a/fs/xfs/xfs_icreate_item.c -+++ b/fs/xfs/xfs_icreate_item.c -@@ -63,7 +63,7 @@ STATIC void - xfs_icreate_item_release( - struct xfs_log_item *lip) - { -- kmem_free(ICR_ITEM(lip)->ic_item.li_lv_shadow); -+ kvfree(ICR_ITEM(lip)->ic_item.li_lv_shadow); - kmem_cache_free(xfs_icreate_cache, ICR_ITEM(lip)); - } - -diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c -index 155a8b3128755..7c3f4a3da518b 100644 ---- a/fs/xfs/xfs_inode_item.c -+++ b/fs/xfs/xfs_inode_item.c -@@ -857,7 +857,7 @@ xfs_inode_item_destroy( - ASSERT(iip->ili_item.li_buf == NULL); - - ip->i_itemp = NULL; -- kmem_free(iip->ili_item.li_lv_shadow); -+ kvfree(iip->ili_item.li_lv_shadow); - kmem_cache_free(xfs_ili_cache, iip); - } - -diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c -index 535f6d38cdb54..8d844c7d1c798 100644 ---- a/fs/xfs/xfs_ioctl.c -+++ b/fs/xfs/xfs_ioctl.c -@@ -492,7 +492,7 @@ xfs_attrmulti_attr_get( - error = -EFAULT; - - out_kfree: -- kmem_free(args.value); -+ kvfree(args.value); - return error; - } - -diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c -index a1650fc81382f..04327aaa5bf09 100644 ---- a/fs/xfs/xfs_log.c -+++ b/fs/xfs/xfs_log.c -@@ -1661,7 +1661,7 @@ xlog_alloc_log( - out_free_iclog: - for (iclog = log->l_iclog; iclog; iclog = prev_iclog) { - prev_iclog = iclog->ic_next; -- kmem_free(iclog->ic_data); -+ kvfree(iclog->ic_data); - kmem_free(iclog); - if (prev_iclog == log->l_iclog) - break; -@@ -2118,7 +2118,7 @@ xlog_dealloc_log( - iclog = log->l_iclog; - for (i = 0; i < log->l_iclog_bufs; i++) { - next_iclog = iclog->ic_next; -- kmem_free(iclog->ic_data); -+ kvfree(iclog->ic_data); - kmem_free(iclog); - iclog = next_iclog; - } -diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c -index 67a99d94701e5..d2ed2c38e2989 100644 ---- a/fs/xfs/xfs_log_cil.c -+++ b/fs/xfs/xfs_log_cil.c -@@ -339,7 +339,7 @@ xlog_cil_alloc_shadow_bufs( - * the buffer, only the log vector header and the iovec - * storage. - */ -- kmem_free(lip->li_lv_shadow); -+ kvfree(lip->li_lv_shadow); - lv = xlog_kvmalloc(buf_size); - - memset(lv, 0, xlog_cil_iovec_space(niovecs)); -diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c -index cc14cd1c2282f..f3fcd58349c16 100644 ---- a/fs/xfs/xfs_log_recover.c -+++ b/fs/xfs/xfs_log_recover.c -@@ -361,7 +361,7 @@ xlog_find_verify_cycle( - *new_blk = -1; - - out: -- kmem_free(buffer); -+ kvfree(buffer); - return error; - } - -@@ -477,7 +477,7 @@ xlog_find_verify_log_record( - *last_blk = i; - - out: -- kmem_free(buffer); -+ kvfree(buffer); - return error; - } - -@@ -731,7 +731,7 @@ xlog_find_head( - goto out_free_buffer; - } - -- kmem_free(buffer); -+ kvfree(buffer); - if (head_blk == log_bbnum) - *return_head_blk = 0; - else -@@ -745,7 +745,7 @@ xlog_find_head( - return 0; - - out_free_buffer: -- kmem_free(buffer); -+ kvfree(buffer); - if (error) - xfs_warn(log->l_mp, "failed to find log head"); - return error; -@@ -999,7 +999,7 @@ xlog_verify_tail( - "Tail block (0x%llx) overwrite detected. Updated to 0x%llx", - orig_tail, *tail_blk); - out: -- kmem_free(buffer); -+ kvfree(buffer); - return error; - } - -@@ -1046,7 +1046,7 @@ xlog_verify_head( - error = xlog_rseek_logrec_hdr(log, *head_blk, *tail_blk, - XLOG_MAX_ICLOGS, tmp_buffer, - &tmp_rhead_blk, &tmp_rhead, &tmp_wrapped); -- kmem_free(tmp_buffer); -+ kvfree(tmp_buffer); - if (error < 0) - return error; - -@@ -1365,7 +1365,7 @@ xlog_find_tail( - error = xlog_clear_stale_blocks(log, tail_lsn); - - done: -- kmem_free(buffer); -+ kvfree(buffer); - - if (error) - xfs_warn(log->l_mp, "failed to locate log tail"); -@@ -1399,6 +1399,7 @@ xlog_find_zeroed( - xfs_daddr_t new_blk, last_blk, start_blk; - xfs_daddr_t num_scan_bblks; - int error, log_bbnum = log->l_logBBsize; -+ int ret = 1; - - *blk_no = 0; - -@@ -1413,8 +1414,7 @@ xlog_find_zeroed( - first_cycle = xlog_get_cycle(offset); - if (first_cycle == 0) { /* completely zeroed log */ - *blk_no = 0; -- kmem_free(buffer); -- return 1; -+ goto out_free_buffer; - } - - /* check partially zeroed log */ -@@ -1424,8 +1424,8 @@ xlog_find_zeroed( - - last_cycle = xlog_get_cycle(offset); - if (last_cycle != 0) { /* log completely written to */ -- kmem_free(buffer); -- return 0; -+ ret = 0; -+ goto out_free_buffer; - } - - /* we have a partially zeroed log */ -@@ -1471,10 +1471,10 @@ xlog_find_zeroed( - - *blk_no = last_blk; - out_free_buffer: -- kmem_free(buffer); -+ kvfree(buffer); - if (error) - return error; -- return 1; -+ return ret; - } - - /* -@@ -1583,7 +1583,7 @@ xlog_write_log_records( - } - - out_free_buffer: -- kmem_free(buffer); -+ kvfree(buffer); - return error; - } - -@@ -2182,7 +2182,7 @@ xlog_recover_add_to_trans( - "bad number of regions (%d) in inode log format", - in_f->ilf_size); - ASSERT(0); -- kmem_free(ptr); -+ kvfree(ptr); - return -EFSCORRUPTED; - } - -@@ -2197,7 +2197,7 @@ xlog_recover_add_to_trans( - "log item region count (%d) overflowed size (%d)", - item->ri_cnt, item->ri_total); - ASSERT(0); -- kmem_free(ptr); -+ kvfree(ptr); - return -EFSCORRUPTED; - } - -@@ -2227,7 +2227,7 @@ xlog_recover_free_trans( - /* Free the regions in the item. */ - list_del(&item->ri_list); - for (i = 0; i < item->ri_cnt; i++) -- kmem_free(item->ri_buf[i].i_addr); -+ kvfree(item->ri_buf[i].i_addr); - /* Free the item itself */ - kmem_free(item->ri_buf); - kmem_free(item); -@@ -3023,7 +3023,7 @@ xlog_do_recovery_pass( - - hblks = xlog_logrec_hblks(log, rhead); - if (hblks != 1) { -- kmem_free(hbp); -+ kvfree(hbp); - hbp = xlog_alloc_buffer(log, hblks); - } - } else { -@@ -3037,7 +3037,7 @@ xlog_do_recovery_pass( - return -ENOMEM; - dbp = xlog_alloc_buffer(log, BTOBB(h_size)); - if (!dbp) { -- kmem_free(hbp); -+ kvfree(hbp); - return -ENOMEM; - } - -@@ -3198,9 +3198,9 @@ xlog_do_recovery_pass( - } - - bread_err2: -- kmem_free(dbp); -+ kvfree(dbp); - bread_err1: -- kmem_free(hbp); -+ kvfree(hbp); - - /* - * Submit buffers that have been added from the last record processed, -diff --git a/fs/xfs/xfs_refcount_item.c b/fs/xfs/xfs_refcount_item.c -index f1b2592238022..ea4daf3dc8f07 100644 ---- a/fs/xfs/xfs_refcount_item.c -+++ b/fs/xfs/xfs_refcount_item.c -@@ -36,7 +36,7 @@ STATIC void - xfs_cui_item_free( - struct xfs_cui_log_item *cuip) - { -- kmem_free(cuip->cui_item.li_lv_shadow); -+ kvfree(cuip->cui_item.li_lv_shadow); - if (cuip->cui_format.cui_nextents > XFS_CUI_MAX_FAST_EXTENTS) - kmem_free(cuip); - else -@@ -207,7 +207,7 @@ xfs_cud_item_release( - struct xfs_cud_log_item *cudp = CUD_ITEM(lip); - - xfs_cui_release(cudp->cud_cuip); -- kmem_free(cudp->cud_item.li_lv_shadow); -+ kvfree(cudp->cud_item.li_lv_shadow); - kmem_cache_free(xfs_cud_cache, cudp); - } - -diff --git a/fs/xfs/xfs_rmap_item.c b/fs/xfs/xfs_rmap_item.c -index 5e8a02d2b045d..dd0a562ec79cc 100644 ---- a/fs/xfs/xfs_rmap_item.c -+++ b/fs/xfs/xfs_rmap_item.c -@@ -36,7 +36,7 @@ STATIC void - xfs_rui_item_free( - struct xfs_rui_log_item *ruip) - { -- kmem_free(ruip->rui_item.li_lv_shadow); -+ kvfree(ruip->rui_item.li_lv_shadow); - if (ruip->rui_format.rui_nextents > XFS_RUI_MAX_FAST_EXTENTS) - kmem_free(ruip); - else -@@ -205,7 +205,7 @@ xfs_rud_item_release( - struct xfs_rud_log_item *rudp = RUD_ITEM(lip); - - xfs_rui_release(rudp->rud_ruip); -- kmem_free(rudp->rud_item.li_lv_shadow); -+ kvfree(rudp->rud_item.li_lv_shadow); - kmem_cache_free(xfs_rud_cache, rudp); - } - -diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c -index 4bec890d93d2c..0ccadedfdb016 100644 ---- a/fs/xfs/xfs_rtalloc.c -+++ b/fs/xfs/xfs_rtalloc.c -@@ -1185,10 +1185,10 @@ xfs_growfs_rt( - */ - if (rsum_cache != mp->m_rsum_cache) { - if (error) { -- kmem_free(mp->m_rsum_cache); -+ kvfree(mp->m_rsum_cache); - mp->m_rsum_cache = rsum_cache; - } else { -- kmem_free(rsum_cache); -+ kvfree(rsum_cache); - } - } - -@@ -1433,7 +1433,7 @@ void - xfs_rtunmount_inodes( - struct xfs_mount *mp) - { -- kmem_free(mp->m_rsum_cache); -+ kvfree(mp->m_rsum_cache); - if (mp->m_rbmip) - xfs_irele(mp->m_rbmip); - if (mp->m_rsumip) --- -2.43.0 - diff --git a/queue-6.6/xfs-fix-log-recovery-buffer-allocation-for-the-legac.patch b/queue-6.6/xfs-fix-log-recovery-buffer-allocation-for-the-legac.patch deleted file mode 100644 index 7c9ec1420ce..00000000000 --- a/queue-6.6/xfs-fix-log-recovery-buffer-allocation-for-the-legac.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 6f069e2fd9f155e5face3c5aef5cf7bd1acf99ad Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Apr 2024 06:07:55 +0200 -Subject: xfs: fix log recovery buffer allocation for the legacy h_size fixup - -From: Christoph Hellwig - -[ Upstream commit 45cf976008ddef4a9c9a30310c9b4fb2a9a6602a ] - -Commit a70f9fe52daa ("xfs: detect and handle invalid iclog size set by -mkfs") added a fixup for incorrect h_size values used for the initial -umount record in old xfsprogs versions. Later commit 0c771b99d6c9 -("xfs: clean up calculation of LR header blocks") cleaned up the log -reover buffer calculation, but stoped using the fixed up h_size value -to size the log recovery buffer, which can lead to an out of bounds -access when the incorrect h_size does not come from the old mkfs -tool, but a fuzzer. - -Fix this by open coding xlog_logrec_hblks and taking the fixed h_size -into account for this calculation. - -Fixes: 0c771b99d6c9 ("xfs: clean up calculation of LR header blocks") -Reported-by: Sam Sun -Signed-off-by: Christoph Hellwig -Reviewed-by: Brian Foster -Reviewed-by: "Darrick J. Wong" -Signed-off-by: Chandan Babu R -Signed-off-by: Sasha Levin ---- - fs/xfs/xfs_log_recover.c | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c -index f3fcd58349c16..d6cb097f63729 100644 ---- a/fs/xfs/xfs_log_recover.c -+++ b/fs/xfs/xfs_log_recover.c -@@ -2965,7 +2965,7 @@ xlog_do_recovery_pass( - int error = 0, h_size, h_len; - int error2 = 0; - int bblks, split_bblks; -- int hblks, split_hblks, wrapped_hblks; -+ int hblks = 1, split_hblks, wrapped_hblks; - int i; - struct hlist_head rhash[XLOG_RHASH_SIZE]; - LIST_HEAD (buffer_list); -@@ -3021,14 +3021,22 @@ xlog_do_recovery_pass( - if (error) - goto bread_err1; - -- hblks = xlog_logrec_hblks(log, rhead); -- if (hblks != 1) { -- kvfree(hbp); -- hbp = xlog_alloc_buffer(log, hblks); -+ /* -+ * This open codes xlog_logrec_hblks so that we can reuse the -+ * fixed up h_size value calculated above. Without that we'd -+ * still allocate the buffer based on the incorrect on-disk -+ * size. -+ */ -+ if (h_size > XLOG_HEADER_CYCLE_SIZE && -+ (rhead->h_version & cpu_to_be32(XLOG_VERSION_2))) { -+ hblks = DIV_ROUND_UP(h_size, XLOG_HEADER_CYCLE_SIZE); -+ if (hblks > 1) { -+ kvfree(hbp); -+ hbp = xlog_alloc_buffer(log, hblks); -+ } - } - } else { - ASSERT(log->l_sectBBsize == 1); -- hblks = 1; - hbp = xlog_alloc_buffer(log, 1); - h_size = XLOG_BIG_RECORD_BSIZE; - } --- -2.43.0 - diff --git a/queue-6.6/xfs-match-lock-mode-in-xfs_buffered_write_iomap_begi.patch b/queue-6.6/xfs-match-lock-mode-in-xfs_buffered_write_iomap_begi.patch deleted file mode 100644 index 15e455ed26f..00000000000 --- a/queue-6.6/xfs-match-lock-mode-in-xfs_buffered_write_iomap_begi.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 2920cac12f7a637704199feef95f802f9692b7e4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 25 Apr 2024 21:13:27 +0800 -Subject: xfs: match lock mode in xfs_buffered_write_iomap_begin() - -From: Zhang Yi - -[ Upstream commit bb712842a85d595525e72f0e378c143e620b3ea2 ] - -Commit 1aa91d9c9933 ("xfs: Add async buffered write support") replace -xfs_ilock(XFS_ILOCK_EXCL) with xfs_ilock_for_iomap() when locking the -writing inode, and a new variable lockmode is used to indicate the lock -mode. Although the lockmode should always be XFS_ILOCK_EXCL, it's still -better to use this variable instead of useing XFS_ILOCK_EXCL directly -when unlocking the inode. - -Fixes: 1aa91d9c9933 ("xfs: Add async buffered write support") -Signed-off-by: Zhang Yi -Reviewed-by: "Darrick J. Wong" -Reviewed-by: Christoph Hellwig -Signed-off-by: Chandan Babu R -Signed-off-by: Sasha Levin ---- - fs/xfs/xfs_iomap.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c -index 18c8f168b1532..ccf83e72d8ca8 100644 ---- a/fs/xfs/xfs_iomap.c -+++ b/fs/xfs/xfs_iomap.c -@@ -1149,13 +1149,13 @@ xfs_buffered_write_iomap_begin( - * them out if the write happens to fail. - */ - seq = xfs_iomap_inode_sequence(ip, IOMAP_F_NEW); -- xfs_iunlock(ip, XFS_ILOCK_EXCL); -+ xfs_iunlock(ip, lockmode); - trace_xfs_iomap_alloc(ip, offset, count, allocfork, &imap); - return xfs_bmbt_to_iomap(ip, iomap, &imap, flags, IOMAP_F_NEW, seq); - - found_imap: - seq = xfs_iomap_inode_sequence(ip, 0); -- xfs_iunlock(ip, XFS_ILOCK_EXCL); -+ xfs_iunlock(ip, lockmode); - return xfs_bmbt_to_iomap(ip, iomap, &imap, flags, 0, seq); - - found_cow: -@@ -1165,17 +1165,17 @@ xfs_buffered_write_iomap_begin( - if (error) - goto out_unlock; - seq = xfs_iomap_inode_sequence(ip, IOMAP_F_SHARED); -- xfs_iunlock(ip, XFS_ILOCK_EXCL); -+ xfs_iunlock(ip, lockmode); - return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, - IOMAP_F_SHARED, seq); - } - - xfs_trim_extent(&cmap, offset_fsb, imap.br_startoff - offset_fsb); -- xfs_iunlock(ip, XFS_ILOCK_EXCL); -+ xfs_iunlock(ip, lockmode); - return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, 0, seq); - - out_unlock: -- xfs_iunlock(ip, XFS_ILOCK_EXCL); -+ xfs_iunlock(ip, lockmode); - return error; - } - --- -2.43.0 - diff --git a/queue-6.6/xfs-require-xfs_sb_feat_incompat_log_xattrs-for-attr.patch b/queue-6.6/xfs-require-xfs_sb_feat_incompat_log_xattrs-for-attr.patch deleted file mode 100644 index 08a55665ac3..00000000000 --- a/queue-6.6/xfs-require-xfs_sb_feat_incompat_log_xattrs-for-attr.patch +++ /dev/null @@ -1,48 +0,0 @@ -From e90f2ae615227c6ca739c3ba286b060744dc04fb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 22 Apr 2024 09:47:24 -0700 -Subject: xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item - recovery - -From: Darrick J. Wong - -[ Upstream commit 8ef1d96a985e4dc07ffbd71bd7fc5604a80cc644 ] - -The XFS_SB_FEAT_INCOMPAT_LOG_XATTRS feature bit protects a filesystem -from old kernels that do not know how to recover extended attribute log -intent items. Make this check mandatory instead of a debugging assert. - -Fixes: fd920008784ea ("xfs: Set up infrastructure for log attribute replay") -Signed-off-by: Darrick J. Wong -Reviewed-by: Christoph Hellwig -Signed-off-by: Sasha Levin ---- - fs/xfs/xfs_attr_item.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c -index 82775e9537df8..ebf656aaf3012 100644 ---- a/fs/xfs/xfs_attr_item.c -+++ b/fs/xfs/xfs_attr_item.c -@@ -510,6 +510,9 @@ xfs_attri_validate( - unsigned int op = attrp->alfi_op_flags & - XFS_ATTRI_OP_FLAGS_TYPE_MASK; - -+ if (!xfs_sb_version_haslogxattrs(&mp->m_sb)) -+ return false; -+ - if (attrp->__pad != 0) - return false; - -@@ -602,8 +605,6 @@ xfs_attri_item_recover( - args->op_flags = XFS_DA_OP_RECOVERY | XFS_DA_OP_OKNOENT | - XFS_DA_OP_LOGGED; - -- ASSERT(xfs_sb_version_haslogxattrs(&mp->m_sb)); -- - switch (attr->xattri_op_flags) { - case XFS_ATTRI_OP_FLAGS_SET: - case XFS_ATTRI_OP_FLAGS_REPLACE: --- -2.43.0 - diff --git a/queue-6.6/xfs-upgrade-the-extent-counters-in-xfs_reflink_end_c.patch b/queue-6.6/xfs-upgrade-the-extent-counters-in-xfs_reflink_end_c.patch deleted file mode 100644 index ab2e76611ce..00000000000 --- a/queue-6.6/xfs-upgrade-the-extent-counters-in-xfs_reflink_end_c.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 59d442e43f2bda5291d8d7df5c82fe8940aa8c60 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 2 May 2024 09:33:53 +0200 -Subject: xfs: upgrade the extent counters in xfs_reflink_end_cow_extent later - -From: Christoph Hellwig - -[ Upstream commit 99fb6b7ad1f2fb83d8df2c1382be63a1f50b1ae0 ] - -Defer the extent counter size upgrade until we know we're going to -modify the extent mapping. This also defers dirtying the transaction -and will allow us safely back out later in the function in later -changes. - -Fixes: 4f86bb4b66c9 ("xfs: Conditionally upgrade existing inodes to use large extent counters") -Reviewed-by: "Darrick J. Wong" -Signed-off-by: Christoph Hellwig -Signed-off-by: Chandan Babu R -Signed-off-by: Sasha Levin ---- - fs/xfs/xfs_reflink.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c -index e5b62dc284664..2322d45ac5e78 100644 ---- a/fs/xfs/xfs_reflink.c -+++ b/fs/xfs/xfs_reflink.c -@@ -750,14 +750,6 @@ xfs_reflink_end_cow_extent( - xfs_ilock(ip, XFS_ILOCK_EXCL); - xfs_trans_ijoin(tp, ip, 0); - -- error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK, -- XFS_IEXT_REFLINK_END_COW_CNT); -- if (error == -EFBIG) -- error = xfs_iext_count_upgrade(tp, ip, -- XFS_IEXT_REFLINK_END_COW_CNT); -- if (error) -- goto out_cancel; -- - /* - * In case of racing, overlapping AIO writes no COW extents might be - * left by the time I/O completes for the loser of the race. In that -@@ -786,6 +778,14 @@ xfs_reflink_end_cow_extent( - del = got; - xfs_trim_extent(&del, *offset_fsb, end_fsb - *offset_fsb); - -+ error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK, -+ XFS_IEXT_REFLINK_END_COW_CNT); -+ if (error == -EFBIG) -+ error = xfs_iext_count_upgrade(tp, ip, -+ XFS_IEXT_REFLINK_END_COW_CNT); -+ if (error) -+ goto out_cancel; -+ - /* Grab the corresponding mapping in the data fork. */ - nmaps = 1; - error = xfs_bmapi_read(ip, del.br_startoff, del.br_blockcount, &data, --- -2.43.0 - diff --git a/queue-6.9/series b/queue-6.9/series index 38af771ed18..a04019ff085 100644 --- a/queue-6.9/series +++ b/queue-6.9/series @@ -264,7 +264,6 @@ riscv-selftests-add-hwprobe-binaries-to-.gitignore.patch revert-ixgbe-manual-an-37-for-troublesome-link-partn.patch net-fec-avoid-lock-evasion-when-reading-pps_enable.patch tls-fix-missing-memory-barrier-in-tls_init.patch -tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch net-relax-socket-state-check-at-accept-time.patch nfc-nci-fix-handling-of-zero-length-payload-packets-.patch drivers-xen-improve-the-late-xenstore-init-protocol.patch @@ -277,7 +276,6 @@ cifs-set-zero_point-in-the-copy_file_range-and-remap.patch cifs-fix-missing-set-of-remote_i_size.patch tracing-probes-fix-error-check-in-parse_btf_field.patch tpm_tis_spi-account-for-spi-header-when-allocating-t.patch -tcp-reduce-accepted-window-in-new_syn_recv-state.patch netfilter-nfnetlink_queue-acquire-rcu_read_lock-in-i.patch netfilter-ipset-add-list-flush-to-cancel_gc.patch netfilter-nft_payload-restore-vlan-q-in-q-match-supp.patch diff --git a/queue-6.9/tcp-reduce-accepted-window-in-new_syn_recv-state.patch b/queue-6.9/tcp-reduce-accepted-window-in-new_syn_recv-state.patch deleted file mode 100644 index 12252c2b233..00000000000 --- a/queue-6.9/tcp-reduce-accepted-window-in-new_syn_recv-state.patch +++ /dev/null @@ -1,111 +0,0 @@ -From f4dca95fc0f6350918f2e6727e35b41f7f86fcce Mon Sep 17 00:00:00 2001 -From: Eric Dumazet -Date: Thu, 23 May 2024 13:05:27 +0000 -Subject: tcp: reduce accepted window in NEW_SYN_RECV state - -From: Eric Dumazet - -commit f4dca95fc0f6350918f2e6727e35b41f7f86fcce upstream. - -Jason commit made checks against ACK sequence less strict -and can be exploited by attackers to establish spoofed flows -with less probes. - -Innocent users might use tcp_rmem[1] == 1,000,000,000, -or something more reasonable. - -An attacker can use a regular TCP connection to learn the server -initial tp->rcv_wnd, and use it to optimize the attack. - -If we make sure that only the announced window (smaller than 65535) -is used for ACK validation, we force an attacker to use -65537 packets to complete the 3WHS (assuming server ISN is unknown) - -Fixes: 378979e94e95 ("tcp: remove 64 KByte limit for initial tp->rcv_wnd value") -Link: https://datatracker.ietf.org/meeting/119/materials/slides-119-tcpm-ghost-acks-00 -Signed-off-by: Eric Dumazet -Acked-by: Neal Cardwell -Reviewed-by: Jason Xing -Link: https://lore.kernel.org/r/20240523130528.60376-1-edumazet@google.com -Signed-off-by: Jakub Kicinski -Cc: Holger Hoffstätte -Signed-off-by: Greg Kroah-Hartman ---- - include/net/request_sock.h | 12 ++++++++++++ - net/ipv4/tcp_ipv4.c | 7 +------ - net/ipv4/tcp_minisocks.c | 7 +++++-- - net/ipv6/tcp_ipv6.c | 7 +------ - 4 files changed, 19 insertions(+), 14 deletions(-) - ---- a/include/net/request_sock.h -+++ b/include/net/request_sock.h -@@ -282,4 +282,16 @@ static inline int reqsk_queue_len_young( - return atomic_read(&queue->young); - } - -+/* RFC 7323 2.3 Using the Window Scale Option -+ * The window field (SEG.WND) of every outgoing segment, with the -+ * exception of segments, MUST be right-shifted by -+ * Rcv.Wind.Shift bits. -+ * -+ * This means the SEG.WND carried in SYNACK can not exceed 65535. -+ * We use this property to harden TCP stack while in NEW_SYN_RECV state. -+ */ -+static inline u32 tcp_synack_window(const struct request_sock *req) -+{ -+ return min(req->rsk_rcv_wnd, 65535U); -+} - #endif /* _REQUEST_SOCK_H */ ---- a/net/ipv4/tcp_ipv4.c -+++ b/net/ipv4/tcp_ipv4.c -@@ -1143,14 +1143,9 @@ static void tcp_v4_reqsk_send_ack(const - #endif - } - -- /* RFC 7323 2.3 -- * The window field (SEG.WND) of every outgoing segment, with the -- * exception of segments, MUST be right-shifted by -- * Rcv.Wind.Shift bits: -- */ - tcp_v4_send_ack(sk, skb, seq, - tcp_rsk(req)->rcv_nxt, -- req->rsk_rcv_wnd >> inet_rsk(req)->rcv_wscale, -+ tcp_synack_window(req) >> inet_rsk(req)->rcv_wscale, - tcp_rsk_tsval(tcp_rsk(req)), - READ_ONCE(req->ts_recent), - 0, &key, ---- a/net/ipv4/tcp_minisocks.c -+++ b/net/ipv4/tcp_minisocks.c -@@ -783,8 +783,11 @@ struct sock *tcp_check_req(struct sock * - - /* RFC793: "first check sequence number". */ - -- if (paws_reject || !tcp_in_window(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq, -- tcp_rsk(req)->rcv_nxt, tcp_rsk(req)->rcv_nxt + req->rsk_rcv_wnd)) { -+ if (paws_reject || !tcp_in_window(TCP_SKB_CB(skb)->seq, -+ TCP_SKB_CB(skb)->end_seq, -+ tcp_rsk(req)->rcv_nxt, -+ tcp_rsk(req)->rcv_nxt + -+ tcp_synack_window(req))) { - /* Out of window: send ACK and drop. */ - if (!(flg & TCP_FLAG_RST) && - !tcp_oow_rate_limited(sock_net(sk), skb, ---- a/net/ipv6/tcp_ipv6.c -+++ b/net/ipv6/tcp_ipv6.c -@@ -1268,15 +1268,10 @@ static void tcp_v6_reqsk_send_ack(const - /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV - * sk->sk_state == TCP_SYN_RECV -> for Fast Open. - */ -- /* RFC 7323 2.3 -- * The window field (SEG.WND) of every outgoing segment, with the -- * exception of segments, MUST be right-shifted by -- * Rcv.Wind.Shift bits: -- */ - tcp_v6_send_ack(sk, skb, (sk->sk_state == TCP_LISTEN) ? - tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt, - tcp_rsk(req)->rcv_nxt, -- req->rsk_rcv_wnd >> inet_rsk(req)->rcv_wscale, -+ tcp_synack_window(req) >> inet_rsk(req)->rcv_wscale, - tcp_rsk_tsval(tcp_rsk(req)), - READ_ONCE(req->ts_recent), sk->sk_bound_dev_if, - &key, ipv6_get_dsfield(ipv6_hdr(skb)), 0, diff --git a/queue-6.9/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch b/queue-6.9/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch deleted file mode 100644 index 09a3d50cb85..00000000000 --- a/queue-6.9/tcp-remove-64-kbyte-limit-for-initial-tp-rcv_wnd-val.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 60a7bcc7a2afccc4f028031313d60907cbba4321 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 May 2024 21:42:20 +0800 -Subject: tcp: remove 64 KByte limit for initial tp->rcv_wnd value - -From: Jason Xing - -[ Upstream commit 378979e94e953c2070acb4f0e0c98d29260bd09d ] - -Recently, we had some servers upgraded to the latest kernel and noticed -the indicator from the user side showed worse results than before. It is -caused by the limitation of tp->rcv_wnd. - -In 2018 commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin -to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most -CDN teams would not benefit from this change because they cannot have a -large window to receive a big packet, which will be slowed down especially -in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's -the side effect for the latency/time-sensitive users. - -To avoid future confusion, current change doesn't affect the initial -receive window on the wire in a SYN or SYN+ACK packet which are set within -65535 bytes according to RFC 7323 also due to the limit in -__tcp_transmit_skb(): - - th->window = htons(min(tp->rcv_wnd, 65535U)); - -In one word, __tcp_transmit_skb() already ensures that constraint is -respected, no matter how large tp->rcv_wnd is. The change doesn't violate -RFC. - -Let me provide one example if with or without the patch: -Before: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=65536 ---> server -Note: for the last ACK, the calculation is 512 << 7. - -After: -client --- SYN: rwindow=65535 ---> server -client <--- SYN+ACK: rwindow=65535 ---- server -client --- ACK: rwindow=175232 ---> server -Note: I use the following command to make it work: -ip route change default via [ip] dev eth0 metric 100 initrwnd 120 -For the last ACK, the calculation is 1369 << 7. - -When we apply such a patch, having a large rcv_wnd if the user tweak this -knob can help transfer data more rapidly and save some rtts. - -Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") -Signed-off-by: Jason Xing -Reviewed-by: Eric Dumazet -Acked-by: Neal Cardwell -Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - net/ipv4/tcp_output.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 02caeb7bcf634..16ef24a37c498 100644 ---- a/net/ipv4/tcp_output.c -+++ b/net/ipv4/tcp_output.c -@@ -229,7 +229,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, - if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows)) - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - else -- (*rcv_wnd) = min_t(u32, space, U16_MAX); -+ (*rcv_wnd) = space; - - if (init_rcv_wnd) - *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); --- -2.43.0 - -- 2.47.3