From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796374569; b=v0lSXXJjRmIxvMzbK3w+6LPb/ohSbfLKMN4svtyJINRmV3l8LCkZBGE7KoGS7Q3RJh4E No5VvEPS22ZwsCxN9cwPe2g3x9JjaOsxkgjoaf1tRkTzYCzZUYi0nmZEL9IFwVTF/4xBt OoF8tyDoLU9qImTefZn/xM7QFvWqxJsB/uD3rCW0M6mnkyWwNpf/L4HPYzLDB4OlW6WYH BuEg/B6qfG73AtTryCDnLJATn9E+arzRCZTnddbfr1s//wH898nz7FVPoIkMcI4XCwkXl hbW3/Ek8UXQWjkXZsOmuFGyYbU/eA6rqNeZznBVF2PkJEA0sa74rp5bQzqam7Pd/8TA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796374569; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=ocJUCPeelLNLeDQfjIw3oVlWqLs/u+QJjlkh1lCpT00=; b=PoSVu5toct0pNZPwsc0gT15wW6W31+88+sx3F9AEGXqbpoRG6WuXbkzzNgNqUwaX2xiU VLrfesw1rYXiKqeHdHjAeISFEq3mk/wTmbrGK88Q7wfYuzhCpg5FNala0eD4RjJG41n+Q 4MsKSN9ns9FYOWwfD7mDzYa6u/i+UBvFF+nQQ8wE80xNrS8HxwE3WbtdTHWIEUNxwZ4z0 K0YZ3QJRRuDfqe4pLm3nF1jYY7dFoW/bLcvZtt3JWPzXLXOezJR/YDyMNLIliY8PVsCoo 5MAz5iQGO0zgfoWdTLuLqvLjNJYBckUQ52MgNjkkcRlUrJ0x/eT2GrKp3ox3JKWehuQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=QxFBV7se; arc=none smtp.remote-ip=209.85.214.197 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F7A6606A322 for ; Fri, 4 Dec 2026 08:56:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8F7A6606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=QxFBV7se Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2f03a137f6aso7844495ad.3 for ; Fri, 04 Dec 2026 00:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796374568; x=1796979368; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ocJUCPeelLNLeDQfjIw3oVlWqLs/u+QJjlkh1lCpT00=; b=QxFBV7sex6NlfmTFZfFhZ6IxQhUMgszZvwfoqXtVaXx+xmZrpzSu2y3m5U/W5fKFfI dVTV6xkARF1UH/rU0N//6GHJN6VdfKGrV1XI34m70yPw/mOSTuV4S8lx3FSNBe73UwmI klB1BOoUbY51lN8CH6oqe0F8ccavbGADzPbl1VUaZAdYMRaICE1qLQzvEb1ZtXUF3eeg JZq0A8cWuyWr/PIHmQ2f5u/icuwYiJe2jdbSr6clqc/x7KhPcq7x7eB68axYlOOizxTw CESOD1+9Z23BFNvPFkwaetG+tWZJOSAowFN3GpQs53BMAtQ8qRRt0ekS7TJJyrmArHmw 03Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796374568; x=1796979368; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ocJUCPeelLNLeDQfjIw3oVlWqLs/u+QJjlkh1lCpT00=; b=NYq6GllvPWiFu7OUIhach6v2o5kp2jiKfRpaDXx+pi6KBiaF4QGYTJw4nQVavkAw75 U0YjfsxqKOehkUERExo+AIA8lq7iaPaFdI2y9FtV2z4dSOa0iIHSY97eYlCDbuQqfTjY IwOdt1ThNljEgLb4dXrXRBCNLgIZ+hA6mcbykcl1zHhKFZAKwWAn6ZHoQ61QrFMA+ZUF UfygHppQSRYNxEzqUmi3pQ1rxf+8UZRppU6sIi9G2XfztsZMoKQPhUwqPuW9NdOsyFsP P4PvLkzZqOkhKiUJD76pLvm2opW/hl1oACPaWH4fw5oXV8tkClk53Y9ZM6cBegOHmj6n Kpvw== X-Forwarded-Encrypted: i=1; AL+hErFeLnyGRTRRPecm9dKWqHsfjkO1GS+eBuH0ZNoNVIAttpoAqC+pA/IQdT5OE/Yad0M0gsYAopA=@vger.kernel.org X-Gm-Message-State: APuU4Z/PL5hjQQ6G9Qi7M59uAEesxALooz0tjJRpovGu2lGBaD54Kdov 6q6DIfBmBgQKhdzuIRH7ewEPnQPzE0/DbcvTWcge8ub0b5XcCGa4QiW9OGfDknwHxeKTdgKjnwV FkIXHxQ== X-Received: from plbkc16.prod.google.com ([2002:a17:903:33d0:b0:2eb:4a7:306e]) (user=kuniyu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f549:b0:2e8:9820:80cf with SMTP id d9443c01a7336-2f1ba22372bmr12322355ad.58.1796374567493; Fri, 04 Dec 2026 00:56:07 -0800 (PST) Date: Fri, 4 Dec 2026 17:54:30 +0900 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261204085551.1518105-1-kuniyu@google.com> Subject: [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB. From: Kuniyuki Iwashima 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@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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