From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202512 header.b=RuPQ1/Dd; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 7F7695A065D for ; Fri, 19 Dec 2025 15:19:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1766153948; bh=wLMNo5eXQCnf/h9mrKYSfoWVSn0e8ua90RfW4cgefoM=; h=From:To:Cc:Subject:Date:From; b=RuPQ1/DdAfwFzJlnmE3ivjXinr3yYR97I/Inn4A2bnG0+cqUFXU9aCPHsFRwkvW2f jwT4GLuEkWoQ+Af1cYk9nVOfgoZvOrjKGDMjWzj0VsQQO3RFYX3db6e3SI29cGIGY6 lOfnsd8zj1DBfS+OKaR57OSy92dzUO4StqTQjMghfAhL6oXRplug5LhboG3oTs1MgW 0ETQ9Ly8y1mkwlqNVrYnMbBqjh3D959CezY4T9Yz3LOLso0h7BGtHw9xcdnDhmC103 OkDQNaRZdI1jjKpGZQxHpUlkqWIgTKeRffaHprD/OyRuukaykDbTZqOljMKd/g7FZS GZcR9h4RvQLig== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dXqR01m2yz4wB4; Sat, 20 Dec 2025 01:19:08 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 00/12] RFC: Improve forwarding data structure Date: Sat, 20 Dec 2025 01:18:52 +1100 Message-ID: <20251219141904.1758072-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.52.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HPSXIL5R75ZPDRCHD6OEVQUKUJJHNXS4 X-Message-ID-Hash: HPSXIL5R75ZPDRCHD6OEVQUKUJJHNXS4 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This replaces the existing data structures storing forwarding information, with new ones that can store more detailed and flexible information, Eventually we plan to allow dynamically updating this as well. Patches 1, 2 & 8 could be merged (1 & 2 are the same as the the earlier series with cleanups to the listening socket init functions). The rest are just for early review. Since I'm going to be away for the next two weeks, no rush at all. v2: * Remove preliminary patches already merged * Add several patches actually using the new data structure David Gibson (12): tcp: Combine tcp_sock_init_one() and tcp_sock_init() into tcp_listen() udp: Rename udp_sock_init() to udp_listen() with small cleanups conf, fwd: Keep a table of our port forwarding configuration conf: Accurately record ifname and address for outbound forwards conf, fwd: Record "auto" port forwards in forwarding table tcp, udp: Make {tcp,udp}_listen() return socket fds fwd: Make space to store listening sockets in forward table ip: Add ipproto_name() function fwd, tcp, udp: Set up listening sockets based on forward table tcp, udp: Remove old auto-forwarding socket arrays fwd: Generate auto-forward exclusions from socket fd tables tcp: Remove unused tcp_epoll_ref conf.c | 125 +++++++++++++++++--------- fwd.c | 273 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- fwd.h | 49 ++++++++++- ip.c | 26 ++++++ ip.h | 2 + tcp.c | 190 +++------------------------------------ tcp.h | 17 +--- udp.c | 140 ++--------------------------- udp.h | 8 +- 9 files changed, 447 insertions(+), 383 deletions(-) -- 2.52.0