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