From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 8DAF55A0268 for ; Thu, 15 Dec 2022 02:30:23 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NXZRc0yLmz4xGH; Thu, 15 Dec 2022 12:30:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1671067820; bh=rqA7PepygEXcFKJio6owIsJ8IMmFqA7ErN69qc9OwsA=; h=From:To:Cc:Subject:Date:From; b=WC0z5aggLLZ7iJtLxlb0OmTNdxINzFNU6qKUutD42T2p+VCuBCM87HqQ+xlwirl5C GyY9BD7PUFHQIOqWnmypUc0X0kMJ7vlCCBtUYxgEQucpmr+Z2YImGVVCH3kb2aVt/I bUUE6zoB/1jzRHXLsN5CkNudwYDlx7wqq/WSnc+w= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/8] Don't use additional sockets for receiving "spliced" UDP communications Date: Thu, 15 Dec 2022 12:30:10 +1100 Message-Id: <20221215013018.1556807-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: DWNI4ZXL3XMKBPSVW42RZ3JGJANZGS27 X-Message-ID-Hash: DWNI4ZXL3XMKBPSVW42RZ3JGJANZGS27 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.3 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: At present, the UDP "splice" and "tap" paths are quite separate. We have separate sockets to receive packets bound for the tap and splice paths. This leads to some code duplication, and extra open sockets. This series partially unifies the two paths, allowing us to use a single (host side) socket, bound to 0.0.0.0 or :: to receive packets for both cases. This is based on my earlier series with some fixes for the tap path. Changes since v1: * Renamed udp_localname[46] to udp[46]_localname * Allow handling of UDP port 0 * Fix a bug which could misidentify certain v6 packets as v4-spliceable * Some minor cosmetic fixes to code and commit messages David Gibson (8): udp: Move sending pasta tap frames to the end of udp_sock_handler() udp: Split sending to passt tap interface into separate function udp: Split receive from preparation and send in udp_sock_handler() udp: Receive multiple datagrams at once on the pasta sock->tap path udp: Pre-populate msg_names with local address udp: Unify udp_sock_handler_splice() with udp_sock_handler() udp: Decide whether to "splice" per datagram rather than per socket udp: Don't use separate sockets to listen for spliced packets udp.c | 380 ++++++++++++++++++++++++++++++--------------------------- udp.h | 2 +- util.h | 7 ++ 3 files changed, 205 insertions(+), 184 deletions(-) -- 2.38.1