linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>,
	John Fastabend <john.fastabend@gmail.com>
Cc: Jiang Wang <jiang.wang@bytedance.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	"Cong Wang ." <cong.wang@bytedance.com>,
	Xiongchun Duan <duanxiongchun@bytedance.com>,
	xieyongji@bytedance.com, chaiwen.cc@bytedance.com,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	Lorenz Bauer <lmb@cloudflare.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, KP Singh <kpsingh@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Johan Almbladh <johan.almbladh@anyfinetworks.com>,
	linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 2/5] af_unix: add unix_stream_proto for sockmap
Date: Wed, 28 Jul 2021 11:43:55 -0700	[thread overview]
Message-ID: <6101a56bf2a11_1e1ff620813@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <CAM_iQpVedTzRbf-bC7WuGMFYF=qnUxbnUdqJ9+FaxrTAn5DkTw@mail.gmail.com>

Cong Wang wrote:
> On Tue, Jul 27, 2021 at 9:37 AM John Fastabend <john.fastabend@gmail.com> wrote:
> > Do we really need an unhash hook for unix_stream? I'm doing some testing
> > now to pull it out of TCP side as well. It seems to be an artifact of old
> > code that is no longer necessary. On TCP side at least just using close()
> > looks to be enough now.
> 
> How do you handle the disconnection from remote without ->unhash()?

Would close() not work for stream/dgram sockets?

> 
> For all stream sockets, we still only allow established sockets to stay
> in sockmap, which means we have to remove it if it is disconnected
> or closed.

+1.

> 
> But it seems Jiang forgot to call ->unhash() when disconnecting.

Aha so we need to add it in af_unix code I guess. Anyways looking forward
to v2.

Thanks.

  reply	other threads:[~2021-07-28 18:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  0:12 [PATCH bpf-next v1 0/5] sockmap: add sockmap support for unix stream socket Jiang Wang
2021-07-27  0:12 ` [PATCH bpf-next v1 1/5] af_unix: add read_sock for stream socket types Jiang Wang
2021-07-29  8:37   ` Jakub Sitnicki
2021-07-27  0:12 ` [PATCH bpf-next v1 2/5] af_unix: add unix_stream_proto for sockmap Jiang Wang
2021-07-27 16:37   ` John Fastabend
2021-07-28  2:07     ` Cong Wang
2021-07-28 18:43       ` John Fastabend [this message]
2021-07-29 21:27         ` Cong Wang
2021-08-10 17:04           ` John Fastabend
2021-07-27  0:12 ` [PATCH bpf-next v1 3/5] selftest/bpf: add tests for sockmap with unix stream type Jiang Wang
2021-07-27 16:38   ` John Fastabend
2021-07-27  0:12 ` [PATCH bpf-next v1 4/5] selftest/bpf: change udp to inet in some function names Jiang Wang
2021-07-27 16:40   ` John Fastabend
2021-07-27  0:12 ` [PATCH bpf-next v1 5/5] selftest/bpf: add new tests in sockmap for unix stream to tcp Jiang Wang
2021-07-27 16:42   ` John Fastabend
2021-07-27 16:44 ` [PATCH bpf-next v1 0/5] sockmap: add sockmap support for unix stream socket John Fastabend

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=6101a56bf2a11_1e1ff620813@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chaiwen.cc@bytedance.com \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=duanxiongchun@bytedance.com \
    --cc=jakub@cloudflare.com \
    --cc=jiang.wang@bytedance.com \
    --cc=johan.almbladh@anyfinetworks.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lmb@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=xieyongji@bytedance.com \
    --cc=xiyou.wangcong@gmail.com \
    --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).