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=202602 header.b=fJUut/Fz; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 0C7275A0274 for ; Thu, 19 Mar 2026 07:12:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1773900721; bh=A1d7+KysUm0HM7F7OxisieDX3fKkCUVkxJtiVX03Ulk=; h=From:To:Cc:Subject:Date:From; b=fJUut/FzfLIsudxxQMVT0X4LonuQqKNuqHj+/KR6J4FBPyGEBIIxWzpwtb/2a+VHY 2e6fMiUyij+eH/gAlqhel1J2wD6Eh5Rzk4l+ig1dpqj3iPpBk8p9gnE0g1E5OUP9S5 +sYD3Qfa57iwVaXEa8CLwQ53DNv/YTuvWOvqIpIfMGOF9Ko+SqHxAqw/68UKv40Cb2 OlxkRUhyojdUP9OD8xKiRLmPO+wzd6lZneSyvd2pCGV7zCDMYIcowfSQy+bcI/go8F rXcrTRaLsSfbBhh6hmsyNE/s0YEtE9VgBxwrXnrIEXsslXHnTOaoi7nIYHo1hd3CPS behgJWrPJ6yig== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fbwMP6VNLz4wSh; Thu, 19 Mar 2026 17:12:01 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v2 00/15] RFC: Read-only dynamic update implementation Date: Thu, 19 Mar 2026 17:11:42 +1100 Message-ID: <20260319061157.1983818-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: Z6DK3JRLS3MRVALIS4WURJXQBHWAP7DI X-Message-ID-Hash: Z6DK3JRLS3MRVALIS4WURJXQBHWAP7DI 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: I've taken Stefano's draft implementation of dynamic updates, and polished it up to have a read-only implementation of the dynamic update protocol. So far it retrieves the pif names and ruleset from passt/pasta and displays it. Sending a new ruleset back comes next. Patches 1..6/15 are preliminary reworks that make moderate sense even without pesto - feel free to apply if you're happy with them. Changes in v2: * Removed already applied cleanups * Reworked assert() patch to handle -DNDEBUG properly * Numerous extra patches: * Factored out serialisation helpers and use them for migration as well * Reworked to allow ip.[ch] and inany.[ch] to be shared with pesto * Reworks to share some forwarding rule datatypes with pesto * Implemented sending pif names and current ruleset to pesto David Gibson (15): treewide: Spell ASSERT() as assert() serialise: Split functions user for serialisation from util.c serialise: Add helpers for serialising unsigned integers fwd: Move selecting correct scan bitmap into fwd_sync_one() fwd: Look up rule index in fwd_sync_one() fwd: Store forwarding tables indexed by (origin) pif pesto: Introduce stub configuration interface and tool pesto: Add command line option parsing and debug messages pesto: Expose list of pifs to pesto ip: Prepare ip.[ch] for sharing with pesto tool inany: Prepare inany.[ch] for sharing with pesto tool fwd: Split forwading rule specification from its implementation state ip: Define a bound for the string returned by ipproto_name() fwd_rule: Move forwarding rule text formatting to common code pesto: Read current ruleset from passt/pasta and display it .gitignore | 2 + Makefile | 43 ++++--- common.h | 79 ++++++++++++ conf.c | 294 ++++++++++++++++++++++++++++++++++++++++---- conf.h | 2 + epoll_type.h | 4 + flow.c | 117 +++++++++--------- flow_table.h | 2 +- fwd.c | 218 +++++++++++++++----------------- fwd.h | 35 ++---- fwd_rule.c | 113 +++++++++++++++++ fwd_rule.h | 59 +++++++++ icmp.c | 14 +-- inany.c | 16 ++- inany.h | 20 +-- iov.c | 4 +- ip.c | 74 +++-------- ip.h | 4 +- isolation.c | 2 +- lineread.c | 5 +- log.c | 1 + migrate.c | 9 +- netlink.c | 2 +- packet.c | 4 +- passt.1 | 5 + passt.c | 11 +- passt.h | 9 +- pcap.c | 3 +- pesto.1 | 46 +++++++ pesto.c | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++ pesto.h | 34 +++++ pif.c | 4 +- serialise.c | 147 ++++++++++++++++++++++ serialise.h | 27 ++++ siphash.h | 13 ++ tap.c | 58 ++++++++- tcp.c | 43 +++---- tcp_splice.c | 10 +- tcp_vu.c | 8 +- udp.c | 22 ++-- udp_flow.c | 4 +- udp_vu.c | 4 +- util.c | 82 ++----------- util.h | 84 ++----------- vhost_user.c | 8 +- virtio.c | 6 +- vu_common.c | 4 +- 47 files changed, 1535 insertions(+), 561 deletions(-) create mode 100644 common.h create mode 100644 fwd_rule.c create mode 100644 fwd_rule.h create mode 100644 pesto.1 create mode 100644 pesto.c create mode 100644 pesto.h create mode 100644 serialise.c create mode 100644 serialise.h -- 2.53.0