From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 87BC35A026D for ; Mon, 29 Jan 2024 05:36:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1706502959; bh=K51Jy7+bR+Id4dVrIXU0g7ZGAPq3yldD5QuPkxGuqy0=; h=From:To:Cc:Subject:Date:From; b=GwqOaaiMAT6MQwb63Ufxm6cBz8doXz4P7HpEns6XTcWX8PW3KiN+7J2RrC5ytM4Q4 cavfBRDnieLy5rCuifPhsJacUOkb36F0yox6eV2qXLvSbgh0D5nDOhCwVBhwoCNlIJ TGhJVKmUVitQysPAY8DK6MiN+q71xl0PKF9g/TmjPNH0+D1Iv2Y05V9djJouRTVJe9 vetKvTL2RLU8Pzwsu/1oYKGPFBU+NZpuuDZH9PvPMd3289mXQLgm+51EIPwBzzoLHg mW80XkuIIgCLZIjp4ZvVZ68zAxn7FE/BV2vYUSByil+c0MGPxJoECuM4kM2dkSthRq 6+CdiXWE5M/Hg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4TNb8b52Hjz4x1v; Mon, 29 Jan 2024 15:35:59 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 00/16] More flow table preliminaries: address handling improvements Date: Mon, 29 Jan 2024 15:35:41 +1100 Message-ID: <20240129043557.823451-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.43.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: YD4VDDFLRFVU72AREOAONAKG32U5FKZQ X-Message-ID-Hash: YD4VDDFLRFVU72AREOAONAKG32U5FKZQ 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: 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. David Gibson (16): treewide: Use sa_family_t for address family variables 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 inany: Helper to test for IPv4 or IPv6 loopback address tcp, tcp_splice: Helpers for getting sockets from the pools tcp_splice: More specific variable names in new splice path tcp_splice: Fix incorrect parameter comment for tcp_splice_connect() tcp_splice: Merge tcp_splice_new() into its caller tcp_splice: Improve error reporting on connect path inany: Add inany_ntop() helper tcp_splice: Improve logic deciding when to splice util: Provide global constants for IPv4 loopback and unspecified address inany: Introduce union sockaddr_inany tcp, tcp_splice: Better construction of IPv4 or IPv6 sockaddrs inany: Extend inany_from_af to easily set unspecified addresses Makefile | 6 +- flow.c | 7 ++ flow.h | 4 + icmp.c | 24 +++--- icmp.h | 4 +- inany.c | 34 ++++++++ inany.h | 96 ++++++++++++++++++---- tcp.c | 106 ++++++++++++------------ tcp.h | 4 +- tcp_conn.h | 4 +- tcp_splice.c | 223 ++++++++++++++++++++++++++------------------------- tcp_splice.h | 5 +- udp.c | 21 ++--- udp.h | 2 +- util.c | 5 +- util.h | 4 +- 16 files changed, 335 insertions(+), 214 deletions(-) create mode 100644 inany.c -- 2.43.0