public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 00/22] More flow table preliminaries: address handling improvements
@ 2024-02-06  1:17 David Gibson
  2024-02-06  1:17 ` [PATCH v2 01/22] treewide: Use sa_family_t for address family variables David Gibson
                   ` (22 more replies)
  0 siblings, 23 replies; 38+ messages in thread
From: David Gibson @ 2024-02-06  1:17 UTC (permalink / raw)
  To: passt-dev, Stefano Brivio; +Cc: David Gibson

Here's another batch of cleanups and tweaks in preparation for the
flow table.  This set focuses on improved helpers for handling
addresses, particularly in the TCP splice path.

Changes since v1:
 * Rebased, and reordered in a way I hope is clearer
 * Add patch to rename port_fwd.[ch]
 * Added doc comments to clarify flow life cycle
 * Added uniform logging of flow start / end to match that lifecycle
 * union inany_addr typed special address constants
 * inany based tests for unspecified and multicast addresses, as well
   as loopback
 * Dropped patch allowing NULL parameter to inany_from_af(), turned
   out not to be that useful
 * Dropped sockaddr_any_init function, turned out not to be very
   useful in that form
 * Added patch enforcing no loopback addresses on tap interface
 * Added logic to sanity check TCP endpoint addresses
 * Moved socket creation into tcp_splice_connect()
 * Moved epoll ref parsing into tcp_listen_handler()
 * Allowed IN4_IS_*() helpers to work on void * addresses

David Gibson (22):
  treewide: Use sa_family_t for address family variables
  inany: Helper to test for various address types
  inany: Add inany_ntop() helper
  inany: Provide more conveniently typed constants for special addresses
  inany: Introduce union sockaddr_inany
  util: Allow IN4_IS_* macros to operate on untyped addresses
  tcp, udp: Don't precompute port remappings in epoll references
  flow: Add helper to determine a flow's protocol
  tcp_splice: Simplify clean up logic
  tcp_splice: Don't use flow_trace() before setting flow type
  flow: Clarify flow entry life cycle, introduce uniform logging
  tcp, tcp_splice: Helpers for getting sockets from the pools
  tcp_splice: More specific variable names in new splice path
  tcp_splice: Merge tcp_splice_new() into its caller
  tcp_splice: Make tcp_splice_connect() create its own sockets
  tcp_splice: Improve error reporting on connect path
  tcp_splice: Improve logic deciding when to splice
  tcp, tcp_splice: Parse listening socket epoll ref in
    tcp_listen_handler()
  tcp: Validate TCP endpoint addresses
  tap: Disallow loopback addresses on tap interface
  port_fwd: Fix copypasta error in port_fwd_scan_udp() comments
  fwd: Rename port_fwd.[ch] and their contents

 Makefile            |  14 +--
 conf.c              |   8 +-
 flow.c              |  83 +++++++++++++++++-
 flow.h              |   9 ++
 port_fwd.c => fwd.c |  32 +++----
 port_fwd.h => fwd.h |  24 +++---
 icmp.c              |  24 ++----
 icmp.h              |   4 +-
 inany.c             |  50 +++++++++++
 inany.h             |  99 ++++++++++++++++++---
 passt.h             |   2 +-
 tap.c               |  19 ++++
 tcp.c               | 158 ++++++++++++++++++++++++---------
 tcp.h               |   8 +-
 tcp_conn.h          |   4 +-
 tcp_splice.c        | 206 +++++++++++++++++++++++++-------------------
 tcp_splice.h        |   7 +-
 udp.c               |  34 ++++----
 udp.h               |  12 +--
 util.c              |   2 +-
 util.h              |  10 +--
 21 files changed, 569 insertions(+), 240 deletions(-)
 rename port_fwd.c => fwd.c (83%)
 rename port_fwd.h => fwd.h (62%)
 create mode 100644 inany.c

-- 
2.43.0


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

end of thread, other threads:[~2024-02-27 14:23 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06  1:17 [PATCH v2 00/22] More flow table preliminaries: address handling improvements David Gibson
2024-02-06  1:17 ` [PATCH v2 01/22] treewide: Use sa_family_t for address family variables David Gibson
2024-02-06  1:17 ` [PATCH v2 02/22] inany: Helper to test for various address types David Gibson
2024-02-18 20:58   ` Stefano Brivio
2024-02-19  1:48     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 03/22] inany: Add inany_ntop() helper David Gibson
2024-02-06  1:17 ` [PATCH v2 04/22] inany: Provide more conveniently typed constants for special addresses David Gibson
2024-02-06  1:17 ` [PATCH v2 05/22] inany: Introduce union sockaddr_inany David Gibson
2024-02-06  1:17 ` [PATCH v2 06/22] util: Allow IN4_IS_* macros to operate on untyped addresses David Gibson
2024-02-06  1:17 ` [PATCH v2 07/22] tcp, udp: Don't precompute port remappings in epoll references David Gibson
2024-02-06  1:17 ` [PATCH v2 08/22] flow: Add helper to determine a flow's protocol David Gibson
2024-02-06  1:17 ` [PATCH v2 09/22] tcp_splice: Simplify clean up logic David Gibson
2024-02-18 20:59   ` Stefano Brivio
2024-02-19  1:50     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 10/22] tcp_splice: Don't use flow_trace() before setting flow type David Gibson
2024-02-06  1:17 ` [PATCH v2 11/22] flow: Clarify flow entry life cycle, introduce uniform logging David Gibson
2024-02-18 21:00   ` Stefano Brivio
2024-02-19  1:58     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 12/22] tcp, tcp_splice: Helpers for getting sockets from the pools David Gibson
2024-02-18 21:00   ` Stefano Brivio
2024-02-19  1:51     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 13/22] tcp_splice: More specific variable names in new splice path David Gibson
2024-02-18 21:00   ` Stefano Brivio
2024-02-19  1:53     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 14/22] tcp_splice: Merge tcp_splice_new() into its caller David Gibson
2024-02-06  1:17 ` [PATCH v2 15/22] tcp_splice: Make tcp_splice_connect() create its own sockets David Gibson
2024-02-06  1:17 ` [PATCH v2 16/22] tcp_splice: Improve error reporting on connect path David Gibson
2024-02-18 21:01   ` Stefano Brivio
2024-02-19  3:23     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 17/22] tcp_splice: Improve logic deciding when to splice David Gibson
2024-02-06  1:17 ` [PATCH v2 18/22] tcp, tcp_splice: Parse listening socket epoll ref in tcp_listen_handler() David Gibson
2024-02-06  1:17 ` [PATCH v2 19/22] tcp: Validate TCP endpoint addresses David Gibson
2024-02-22 12:45   ` Stefano Brivio
2024-02-23  3:56     ` David Gibson
2024-02-06  1:17 ` [PATCH v2 20/22] tap: Disallow loopback addresses on tap interface David Gibson
2024-02-06  1:17 ` [PATCH v2 21/22] port_fwd: Fix copypasta error in port_fwd_scan_udp() comments David Gibson
2024-02-06  1:17 ` [PATCH v2 22/22] fwd: Rename port_fwd.[ch] and their contents David Gibson
2024-02-27 14:22 ` [PATCH v2 00/22] More flow table preliminaries: address handling improvements Stefano Brivio

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).