Paolo Abeni
e4a2a4328c
tcp: fix mid stream window clamp.
...
[ Upstream commit 58d3aade20cdddbac6c9707ac0f3f5f8c1278b74 ]
After the blamed commit below, if the user-space application performs
window clamping when tp->rcv_wnd is 0, the TCP socket will never be
able to announce a non 0 receive window, even after completely emptying
the receive buffer and re-setting the window clamp to higher values.
Refactor tcp_set_window_clamp() to address the issue: when the user
decreases the current clamp value, set rcv_ssthresh according to the
same logic used at buffer initialization, but ensuring reserved mem
provisioning.
To avoid code duplication factor-out the relevant bits from
tcp_adjust_rcv_ssthresh() in a new helper and reuse it in the above
scenario.
When increasing the clamp value, give the rcv_ssthresh a chance to grow
according to previously implemented heuristic.
Fixes: 3aa7857fe1 ("tcp: enable mid stream window clamp")
Reported-by: David Gibson <david@gibson.dropbear.id.au >
Reported-by: Stefano Brivio <sbrivio@redhat.com >
Signed-off-by: Paolo Abeni <pabeni@redhat.com >
Reviewed-by: Eric Dumazet <edumazet@google.com >
Link: https://lore.kernel.org/r/705dad54e6e6e9a010e571bf58e0b35a8ae70503.1701706073.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-13 18:45:07 +01:00
..
2023-03-27 02:33:48 +00:00
2023-11-20 11:59:03 +01:00
2023-08-10 18:24:48 -07:00
2023-10-05 11:45:06 +02:00
2023-11-28 17:19:52 +00:00
2023-09-13 09:20:28 +02:00
2023-10-04 14:22:27 -07:00
2023-06-15 22:33:26 -07:00
2023-08-10 19:31:52 -07:00
2023-11-28 17:19:54 +00:00
2023-02-20 16:46:10 -08:00
2023-03-17 08:56:37 +00:00
2023-05-01 07:43:19 +01:00
2023-12-08 08:52:23 +01:00
2023-08-04 15:34:03 -07:00
2022-07-22 12:53:22 +01:00
2023-03-21 21:32:18 -07:00
2023-03-18 12:23:34 +00:00
2022-08-09 22:14:02 -07:00
2023-07-28 18:06:30 -07:00
2022-11-02 20:38:13 -07:00
2022-07-22 12:53:22 +01:00
2023-08-24 10:07:13 +02:00
2023-08-03 08:38:07 -07:00
2022-11-16 11:31:47 +02:00
2023-11-20 11:58:55 +01:00
2023-07-14 20:39:29 -07:00
2023-01-27 11:19:46 +00:00
2022-07-22 12:53:22 +01:00
2023-07-14 20:39:29 -07:00
2022-07-24 18:39:17 -06:00
2023-07-27 17:17:32 -07:00
2022-07-22 12:53:22 +01:00
2023-01-20 09:33:22 +00:00
2023-08-27 17:08:45 -07:00
2023-08-19 15:30:15 +01:00
2023-08-14 08:01:06 +01:00
2023-04-09 15:35:49 +01:00
2023-07-18 09:47:08 +02:00
2022-12-05 21:58:27 -08:00
2023-08-22 13:19:02 +02:00
2023-03-28 18:52:28 -07:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-28 22:21:54 -07:00
2023-08-02 10:09:31 +01:00
2023-08-02 10:09:32 +01:00
2023-11-20 11:59:34 +01:00
2023-04-12 16:40:39 -07:00
2022-12-01 15:09:10 +01:00
2023-08-08 15:58:23 -07:00
2022-07-22 12:53:22 +01:00
2023-08-15 15:01:03 -07:00
2022-10-31 10:43:04 +00:00
2023-07-29 17:10:27 +01:00
2023-06-10 00:11:41 -07:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2023-07-28 14:07:59 -07:00
2022-07-22 12:53:22 +01:00
2023-08-22 21:40:40 +02:00
2023-03-23 21:51:30 +01:00
2022-07-22 12:53:22 +01:00
2023-08-15 13:57:51 -07:00
2023-08-14 07:06:13 +01:00
2023-08-16 11:09:17 +01:00
2023-07-14 20:39:29 -07:00
2023-08-15 13:57:51 -07:00
2023-08-24 10:51:39 -07:00
2022-12-30 07:25:52 +00:00
2023-08-31 12:33:03 +02:00
2023-07-28 11:01:56 +01:00
2023-10-03 09:00:40 +02:00
2023-09-06 06:05:59 +01:00
2023-04-22 01:39:41 +02:00
2023-09-01 08:11:51 +01:00
2022-09-29 07:18:00 +02:00
2022-07-22 12:53:22 +01:00
2022-10-31 20:14:27 -07:00
2022-09-02 20:34:32 -07:00
2023-09-13 07:18:04 +01:00
2023-08-22 21:40:40 +02:00
2023-06-12 21:13:23 -07:00
2023-08-04 15:33:17 -07:00
2023-08-04 15:33:17 -07:00
2022-07-22 12:53:22 +01:00
2023-07-20 10:46:28 +02:00
2023-07-14 20:39:29 -07:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-28 11:29:36 +02:00
2023-08-18 16:05:26 +02:00
2023-08-25 18:35:09 -07:00
2022-10-12 12:57:19 +02:00
2023-10-10 10:30:30 +02:00
2023-06-20 20:06:16 -07:00
2022-07-22 12:53:22 +01:00
2023-08-22 17:31:18 -07:00
2022-11-18 12:14:55 +00:00
2022-07-22 12:53:22 +01:00
2023-08-07 08:53:55 +01:00
2023-12-08 08:52:23 +01:00
2023-08-29 17:39:15 -07:00
2023-04-18 12:59:01 +02:00
2023-08-03 08:38:07 -07:00
2022-07-22 12:53:22 +01:00
2023-07-27 13:45:51 +02:00
2022-07-22 12:53:22 +01:00
2023-05-11 18:07:05 -07:00
2023-01-28 13:51:22 +01:00
2023-07-14 20:39:29 -07:00
2023-08-04 15:33:50 -07:00
2023-07-14 20:39:30 -07:00
2023-06-02 09:55:22 +01:00
2023-08-07 08:53:54 +01:00
2023-07-12 15:59:33 -07:00
2022-07-22 12:53:22 +01:00
2022-07-15 18:50:35 -07:00
2022-07-22 12:53:22 +01:00
2023-04-06 12:01:20 -07:00
2023-03-17 08:56:37 +00:00
2022-10-11 17:42:58 -06:00
2023-06-19 12:05:29 +02:00
2022-08-01 11:59:23 -07:00
2023-08-16 11:09:17 +01:00
2023-06-19 11:32:58 -07:00
2023-07-14 20:39:30 -07:00
2023-08-20 11:40:03 +01:00
2023-08-01 10:47:24 +02:00
2023-09-04 11:00:17 +01:00
2022-07-22 12:53:22 +01:00
2023-03-15 08:18:35 +00:00
2022-10-25 11:35:16 +02:00
2023-11-28 17:19:38 +00:00
2023-08-03 18:10:10 -07:00
2022-07-22 12:53:22 +01:00
2022-07-18 11:24:10 +01:00
2023-08-09 13:12:15 -07:00
2023-02-16 09:27:07 +01:00
2023-12-13 18:45:07 +01:00
2023-07-19 10:07:27 -07:00
2023-07-28 14:07:59 -07:00
2023-08-27 17:17:41 -07:00
2023-08-01 15:06:27 -07:00
2022-12-12 15:04:39 -08:00
2022-07-22 12:53:22 +01:00
2023-11-20 11:58:56 +01:00
2023-08-07 08:53:55 +01:00
2023-11-20 11:58:56 +01:00
2023-08-02 10:58:26 +01:00
2023-03-18 12:23:34 +00:00
2022-07-22 12:53:22 +01:00
2023-07-19 09:56:49 -07:00
2023-07-19 09:56:49 -07:00
2023-08-03 08:38:07 -07:00
2023-08-01 12:04:43 +02:00
2023-07-19 09:56:49 -07:00