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 A36285A026F for ; Tue, 7 Nov 2023 02:40:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1699321229; bh=hai4xIugBKsOsjZtQd2/lDmRJUXsjLKtYzkqeMyylfQ=; h=From:To:Cc:Subject:Date:From; b=PIaO2WH6RNfXajestyRVutl032v19ZFg5ep7o10idtjpqchpMu39nhZc7WZlUHXtE ke7F7leoPSJoOxFrZMpnalf0kz+qYMBuaxzjtxNfRMiuVLwl4+mMpLle+a9L2hKl6C dsPCNKK0IZLrPSIU+8UPCRvcsCFgmyqv1bEgZqRk= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4SPWBP2JdCz4x5p; Tue, 7 Nov 2023 12:40:29 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/4] Passt Interface Identifiers Date: Tue, 7 Nov 2023 12:40:12 +1100 Message-ID: <20231107014016.1927410-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: YOWSTYYHNNGKHY5O7E2WYA5FCD4IGX2F X-Message-ID-Hash: YOWSTYYHNNGKHY5O7E2WYA5FCD4IGX2F 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: For the generalisations to forwarding we want to accomplish with the flow table, we will need a more formalised notion of passt "interfaces" - that is way that passt communicates with network, whether that be over L4 sockets (as on the host) or via an L2 tunnel. This series makes a small start on this, by introducing a type to identify passt interfaces. We don't use it for a whole lot yet, but it will become more useful in future. Based on the automatic port forwarding cleanup series Changes since v1: * Don't use a type alias for pif ids, just use bare uint8_t David Gibson (4): udp: Clean up ref initialisation in udp_sock_init() pif: Introduce notion of passt/pasta interface pif: Record originating pif in listening socket refs pif: Pass originating pif to tap handler functions Makefile | 2 +- icmp.c | 4 +++- icmp.h | 4 ++-- passt.h | 1 + pif.h | 27 +++++++++++++++++++++++++++ tap.c | 26 ++++++++++++++++---------- tcp.c | 11 ++++++++--- tcp.h | 7 ++++--- tcp_splice.c | 10 ++++++---- udp.c | 35 ++++++++++++++++++----------------- udp.h | 11 ++++++----- 11 files changed, 92 insertions(+), 46 deletions(-) create mode 100644 pif.h -- 2.41.0