Netdev List
 help / color / mirror / Atom feed
* [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB.
@ 2026-12-04  8:54 Kuniyuki Iwashima
  2026-12-04  8:54 ` [PATCH v1 net-next 01/10] tcp: Return early when tcp_plb_check_rehash() does not rehash a flow Kuniyuki Iwashima
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Kuniyuki Iwashima @ 2026-12-04  8:54 UTC (permalink / raw)
  To: Eric Dumazet, Neal Cardwell, David S . Miller, Jakub Kicinski,
	Paolo Abeni, Willem de Bruijn
  Cc: Simon Horman, Yuchung Cheng, Kuniyuki Iwashima, Kuniyuki Iwashima,
	netdev

Currently, PLB (Protective Load Balancing) relies on ECN signals
and is only hooked into DCTCP.  However, ECN is often unavailable
in cloud VM and virtualised network environments, and widely deployed
congestion control algorithms such as CUBIC and BBR cannot benefit
from PLB.

This series introduces Generic PLB, a congestion-control-agnostic
PLB mechanism triggered by a combination of packet loss and low
delivery rate.

Generic PLB adds one per-netns sysctl knob:

  net.ipv4.tcp_plb_loss_rehash_prob (default: 128, range: 0 - 255)

Every 5th Fast Recovery, tcp_plb_check_rehash_loss() computes a
rehash probability in [0, 255] from rate_prob and floor, and
rehashes the flow via tcp_plb_rehash() if a random number in
[0, 254] is smaller than the probability:

  prob = max(rate_prob, floor)
  if (get_random_u32_below(255) < prob)
      tcp_plb_rehash(sk);

See patch 8 for experiment results.


Overview:
  Patch 1 - 2 : Trivial non-urgent fixes
  Patch 3 - 6 : Factor out common PLB code from ECN-PLB
  Patch 7     : Lower tcp_plb_suspend_rto_sec default for both PLB
  Patch 8     : Introduce Generic PLB
  Patch 9     : Packetdrill tests
  Patch 10    : Deflake ecmp_rehash.sh


Kuniyuki Iwashima (10):
  tcp: Return early when tcp_plb_check_rehash() does not rehash a flow.
  tcp: Don't call get_random_u32_below(0) in
    tcp_plb_update_state_upon_rto().
  tcp: Move struct tcp_plb_state to struct tcp_sock.
  tcp: Call tcp_plb_update_state_upon_rto() after rehash in
    tcp_write_timeout().
  tcp: Rename tcp_plb_check_rehash() to tcp_plb_check_rehash_ecn().
  tcp: Factorise tcp_plb_rehash().
  tcp: Lower tcp_plb_suspend_rto_sec default.
  tcp: Introduce Generic PLB.
  selftest: packetdrill: Add tests for Generic PLB.
  selftest: net: Disable Generic PLB in ecmp_rehash.sh.

 Documentation/networking/ip-sysctl.rst        |  24 ++-
 .../net_cachelines/netns_ipv4_sysctl.rst      |   1 +
 .../networking/net_cachelines/tcp_sock.rst    |   5 +
 include/linux/tcp.h                           |   9 +
 include/net/netns/ipv4.h                      |   3 +-
 include/net/tcp.h                             |  21 +--
 net/core/net_namespace.c                      |   2 +
 net/ipv4/sysctl_net_ipv4.c                    |   7 +
 net/ipv4/tcp.c                                |   6 +
 net/ipv4/tcp_dctcp.c                          |  17 +-
 net/ipv4/tcp_input.c                          |  15 ++
 net/ipv4/tcp_ipv4.c                           |   3 +-
 net/ipv4/tcp_plb.c                            | 136 ++++++++++----
 net/ipv4/tcp_timer.c                          |   1 +
 tools/testing/selftests/net/ecmp_rehash.sh    |   1 +
 .../net/packetdrill/tcp_plb_loss_rate.pkt     |  83 +++++++++
 .../packetdrill/tcp_plb_loss_rto_suspend.pkt  | 166 ++++++++++++++++++
 .../net/packetdrill/tcp_plb_loss_tlp.pkt      | 102 +++++++++++
 18 files changed, 536 insertions(+), 66 deletions(-)
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_rto_suspend.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_tlp.pkt

-- 
2.56.1.915.g69d5ec7298-goog


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-12-04 10:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  8:54 [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 01/10] tcp: Return early when tcp_plb_check_rehash() does not rehash a flow Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 02/10] tcp: Don't call get_random_u32_below(0) in tcp_plb_update_state_upon_rto() Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 03/10] tcp: Move struct tcp_plb_state to struct tcp_sock Kuniyuki Iwashima
2026-12-04 10:34   ` David Laight
2026-12-04  8:54 ` [PATCH v1 net-next 04/10] tcp: Call tcp_plb_update_state_upon_rto() after rehash in tcp_write_timeout() Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 05/10] tcp: Rename tcp_plb_check_rehash() to tcp_plb_check_rehash_ecn() Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 06/10] tcp: Factorise tcp_plb_rehash() Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 07/10] tcp: Lower tcp_plb_suspend_rto_sec default Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 08/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for " Kuniyuki Iwashima
2026-12-04  8:54 ` [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh Kuniyuki Iwashima
2026-12-04  9:03 ` [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB netdev-bot+sinfo
2026-12-04  9:29   ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox