From: Bobby Eshleman <bobbyeshleman@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Bobby Eshleman <bobby.eshleman@bytedance.com>,
Cong Wang <cong.wang@bytedance.com>,
kvm@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
virtualization@lists.linux-foundation.org,
Song Liu <song@kernel.org>, Eric Dumazet <edumazet@google.com>,
Stanislav Fomichev <sdf@google.com>,
linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
Mykola Lysenko <mykolal@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>,
Paolo Abeni <pabeni@redhat.com>, KP Singh <kpsingh@kernel.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Jakub Kicinski <kuba@kernel.org>, Hao Luo <haoluo@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next v3 1/3] vsock: support sockmap
Date: Sat, 18 Feb 2023 07:25:41 +0000 [thread overview]
Message-ID: <Y/B9ddkfQw6Ae/lY@bullseye> (raw)
In-Reply-To: <20230228163518-mutt-send-email-mst@kernel.org>
On Tue, Feb 28, 2023 at 04:36:22PM -0500, Michael S. Tsirkin wrote:
> On Tue, Feb 28, 2023 at 07:04:34PM +0000, Bobby Eshleman wrote:
> > @@ -1241,19 +1252,34 @@ static int vsock_dgram_connect(struct socket *sock,
> >
> > memcpy(&vsk->remote_addr, remote_addr, sizeof(vsk->remote_addr));
> > sock->state = SS_CONNECTED;
> > + sk->sk_state = TCP_ESTABLISHED;
> >
> > out:
> > release_sock(sk);
> > return err;
> > }
>
>
> How is this related? Maybe add a comment to explain? Does
> TCP_ESTABLISHED make sense for all types of sockets?
>
Hey Michael, definitely, I can leave a comment.
The real reason is due to this piece of logic in sockmap:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/sock_map.c?h=v6.2#n531
And because of it, you see the same thing in (for example)
unix_dgram_connect():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/unix/af_unix.c?h=v6.2#n1394
I believe it makes sense for these other socket types.
next prev parent reply other threads:[~2023-02-28 22:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 19:04 [PATCH net-next v3 0/3] vsock: add support for sockmap Bobby Eshleman
2023-02-28 19:04 ` [PATCH net-next v3 1/3] vsock: support sockmap Bobby Eshleman
2023-02-28 21:36 ` Michael S. Tsirkin
2023-02-18 7:25 ` Bobby Eshleman [this message]
2023-03-02 9:20 ` Stefano Garzarella
2023-03-02 9:42 ` Stefano Garzarella
2023-02-28 19:04 ` [PATCH net-next v3 2/3] selftests/bpf: add vsock to vmtest.sh Bobby Eshleman
2023-03-02 9:53 ` Stefano Garzarella
2023-02-28 19:04 ` [PATCH net-next v3 3/3] selftests/bpf: add a test case for vsock sockmap Bobby Eshleman
2023-03-02 9:54 ` Stefano Garzarella
2023-03-10 8:53 ` [PATCH net-next v3 0/3] vsock: add support for sockmap Michael S. Tsirkin
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=Y/B9ddkfQw6Ae/lY@bullseye \
--to=bobbyeshleman@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bobby.eshleman@bytedance.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mst@redhat.com \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=yhs@fb.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.
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 NNTP newsgroup(s).