public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v5 00/18] RFC: Dynamic configuration update implementation
@ 2026-04-21  6:24 David Gibson
  2026-04-21  6:24 ` [PATCH v5 01/18] conf, fwd: Stricter rule checking in fwd_rule_add() David Gibson
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: David Gibson @ 2026-04-21  6:24 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

Here's the next draft of dynamic configuration updates.  This now can
successfully update rules, though I've not tested it very extensively.

Patches 1..8/18 are preliminary reworks that make sense even without
pesto - feel free to apply if you're happy with them.  I don't think
the rest should be applied yet; we need to at least harden it so passt
can't be blocked indefinitely by a client which sends a partial update
then waits.

Based on my earlier series reworking static checking invocation.

TODO:
 - Don't allow a client which sends a partial configuration then
   blocks also block passt
 - Allow pesto to clear existing configuration, not just add
 - Allow pesto selectively delete existing rules, not just add

Changes in v5:
 * If multiple clients connect at once, they're now blocked until the
   first one finishes, instead of later ones being discarded
Changes in v4:
 * Merged with remainder of forward rule parsing rework series
   * Fix some bugs in rule checking pointed out by Laurent
 * Significantly cleaned up option parsing code
 * Changed from replacing all existing rules to adding new rules
   (clear and remove still TBD)
 * Somewhat simplified protocol (pif names and rules sent in a single
   pass)
 * pesto is now allocation free
 * Fixed commit message and style nits pointed out by Stefano
Changes in v3:
 * Removed already applied ASSERT() rename
 * Renamed serialisation functions
 * Incorporated Stefano's extensions, reworked and fixed
 * Several additional cleanups / preliminary reworks
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 (18):
  conf, fwd: Stricter rule checking in fwd_rule_add()
  fwd_rule: Move ephemeral port probing to fwd_rule.c
  fwd, conf: Move rule parsing code to fwd_rule.[ch]
  fwd_rule: Move conflict checking back within fwd_rule_add()
  fwd: Generalise fwd_rules_info()
  pif: Limit pif names to 128 bytes
  fwd_rule: Fix some format specifiers
  tap, repair: Use SOCK_NONBLOCK and SOCK_CLOEXEC on Unix sockets
  pesto: Introduce stub configuration tool
  pesto, log: Share log.h (but not log.c) with pesto tool
  pesto, conf: Have pesto connect to passt and check versions
  pesto: Expose list of pifs to pesto and optionally display
  ip: Prepare ip.[ch] for sharing with pesto tool
  inany: Prepare inany.[ch] for sharing with pesto tool
  pesto: Read current ruleset from passt/pasta and optionally display it
  pesto: Parse and add new rules from command line
  pesto, conf: Send updated rules from pesto back to passt/pasta
  conf, fwd: Allow switching to new rules received from pesto

 .gitignore   |   2 +
 Makefile     |  54 ++--
 common.h     | 122 +++++++++
 conf.c       | 686 ++++++++++++++++++++++-----------------------------
 conf.h       |   2 +
 epoll_type.h |   4 +
 flow.c       |   4 +-
 fwd.c        | 169 ++++---------
 fwd.h        |  41 +--
 fwd_rule.c   | 603 ++++++++++++++++++++++++++++++++++++++++++--
 fwd_rule.h   |  66 ++++-
 inany.c      |  19 +-
 inany.h      |  17 +-
 ip.c         |  56 +----
 ip.h         |   4 +-
 lineread.c   |   2 +-
 log.h        |  59 ++++-
 passt.1      |   5 +
 passt.c      |   8 +
 passt.h      |   8 +
 pesto.1      |  46 ++++
 pesto.c      | 470 +++++++++++++++++++++++++++++++++++
 pesto.h      |  55 +++++
 pif.c        |   2 +-
 pif.h        |   8 +-
 repair.c     |   9 +-
 serialise.c  |   7 +
 serialise.h  |   1 +
 siphash.h    |  13 +
 tap.c        |  64 ++++-
 util.c       |   2 +-
 util.h       | 110 +--------
 32 files changed, 1921 insertions(+), 797 deletions(-)
 create mode 100644 common.h
 create mode 100644 pesto.1
 create mode 100644 pesto.c
 create mode 100644 pesto.h

-- 
2.53.0


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

end of thread, other threads:[~2026-04-21  6:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-21  6:24 [PATCH v5 00/18] RFC: Dynamic configuration update implementation David Gibson
2026-04-21  6:24 ` [PATCH v5 01/18] conf, fwd: Stricter rule checking in fwd_rule_add() David Gibson
2026-04-21  6:25 ` [PATCH v5 02/18] fwd_rule: Move ephemeral port probing to fwd_rule.c David Gibson
2026-04-21  6:25 ` [PATCH v5 03/18] fwd, conf: Move rule parsing code to fwd_rule.[ch] David Gibson
2026-04-21  6:25 ` [PATCH v5 04/18] fwd_rule: Move conflict checking back within fwd_rule_add() David Gibson
2026-04-21  6:25 ` [PATCH v5 05/18] fwd: Generalise fwd_rules_info() David Gibson
2026-04-21  6:25 ` [PATCH v5 06/18] pif: Limit pif names to 128 bytes David Gibson
2026-04-21  6:25 ` [PATCH v5 07/18] fwd_rule: Fix some format specifiers David Gibson
2026-04-21  6:25 ` [PATCH v5 08/18] tap, repair: Use SOCK_NONBLOCK and SOCK_CLOEXEC on Unix sockets David Gibson
2026-04-21  6:25 ` [PATCH v5 09/18] pesto: Introduce stub configuration tool David Gibson
2026-04-21  6:25 ` [PATCH v5 10/18] pesto, log: Share log.h (but not log.c) with pesto tool David Gibson
2026-04-21  6:25 ` [PATCH v5 11/18] pesto, conf: Have pesto connect to passt and check versions David Gibson
2026-04-21  6:25 ` [PATCH v5 12/18] pesto: Expose list of pifs to pesto and optionally display David Gibson
2026-04-21  6:25 ` [PATCH v5 13/18] ip: Prepare ip.[ch] for sharing with pesto tool David Gibson
2026-04-21  6:25 ` [PATCH v5 14/18] inany: Prepare inany.[ch] " David Gibson
2026-04-21  6:25 ` [PATCH v5 15/18] pesto: Read current ruleset from passt/pasta and optionally display it David Gibson
2026-04-21  6:25 ` [PATCH v5 16/18] pesto: Parse and add new rules from command line David Gibson
2026-04-21  6:25 ` [PATCH v5 17/18] pesto, conf: Send updated rules from pesto back to passt/pasta David Gibson
2026-04-21  6:25 ` [PATCH v5 18/18] conf, fwd: Allow switching to new rules received from pesto David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).