From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 3A4BB5A0269; Tue, 11 Oct 2022 01:33:50 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 1/3] tcp, tcp_splice: Adjust comments to current meaning of inbound and outbound Date: Tue, 11 Oct 2022 01:33:48 +0200 Message-Id: <20221010233350.1198630-2-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221010233350.1198630-1-sbrivio@redhat.com> References: <20221010233350.1198630-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6X5GONGA26OVZS245KXACETJLEOIR5JF X-Message-ID-Hash: 6X5GONGA26OVZS245KXACETJLEOIR5JF X-MailFrom: sbrivio@passt.top 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: For tcp_sock_init_ns(), "inbound" connections used to be the ones being established toward any listening socket we create, as opposed to sockets we connect(). Similarly, tcp_splice_new() used to handle "inbound" connections in the sense that they originated from listening sockets, and they would in turn cause a connect() on an "outbound" socket. Since commit 1128fa03fe73 ("Improve types and names for port forwarding configuration"), though, inbound connections are more broadly defined as the ones directed to guest or namepsace, and outbound the ones originating from there. Update comments for those two functions. Signed-off-by: Stefano Brivio --- tcp.c | 2 +- tcp_splice.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcp.c b/tcp.c index 7e82589..63153b6 100644 --- a/tcp.c +++ b/tcp.c @@ -3178,7 +3178,7 @@ void tcp_sock_init(const struct ctx *c, int ns, sa_family_t af, } /** - * tcp_sock_init_ns() - Bind sockets in namespace for inbound connections + * tcp_sock_init_ns() - Bind sockets in namespace for outbound connections * @arg: Execution context * * Return: 0 diff --git a/tcp_splice.c b/tcp_splice.c index 4a015d0..96c31c8 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -502,7 +502,7 @@ static int tcp_splice_connect_ns(void *arg) } /** - * tcp_splice_new() - Handle new inbound, spliced connection + * tcp_splice_new() - Handle new spliced connection * @c: Execution context * @conn: Connection pointer * @port: Destination port, host order -- 2.35.1