public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 1/3] tcp, tcp_splice: Adjust comments to current meaning of inbound and outbound
Date: Tue, 11 Oct 2022 11:57:47 +1100	[thread overview]
Message-ID: <Y0S/iysnJpgku+1z@yekko> (raw)
In-Reply-To: <20221010233350.1198630-2-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]

On Tue, Oct 11, 2022 at 01:33:48AM +0200, Stefano Brivio wrote:
> 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 <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

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

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-10-11  1:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 23:33 [PATCH 0/3] Fixes for spliced connections Stefano Brivio
2022-10-10 23:33 ` [PATCH 1/3] tcp, tcp_splice: Adjust comments to current meaning of inbound and outbound Stefano Brivio
2022-10-11  0:57   ` David Gibson [this message]
2022-10-10 23:33 ` [PATCH 2/3] tcp, tcp_splice: Fix port remapping for inbound, spliced connections Stefano Brivio
2022-10-11  1:19   ` David Gibson
2022-10-11  7:42     ` Stefano Brivio
2022-10-10 23:33 ` [PATCH 3/3] tcp: Don't create 'tap' socket for ports that are bound to loopback only Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0S/iysnJpgku+1z@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).