From: Florent Revest <revest@chromium.org>
To: Yonghong Song <yhs@fb.com>, bpf@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, davem@davemloft.net, kuba@kernel.org,
ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
andrii@kernel.org, kpsingh@chromium.org, revest@google.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 5/6] bpf: Add an iterator selftest for bpf_sk_storage_get
Date: Fri, 27 Nov 2020 10:21:44 +0100 [thread overview]
Message-ID: <492ad793692d03105f3ac2a2e1a3196dc01e5cef.camel@chromium.org> (raw)
In-Reply-To: <2c5a814a-7b69-3a8d-e4e0-e595d009cf82@fb.com>
On Thu, 2020-11-26 at 23:00 -0800, Yonghong Song wrote:
> On 11/26/20 8:44 AM, Florent Revest wrote:
> > +SEC("iter/task_file")
> > +int fill_socket_owner(struct bpf_iter__task_file *ctx)
> > +{
> > + struct task_struct *task = ctx->task;
> > + struct file *file = ctx->file;
> > + struct socket *sock;
> > + int *sock_tgid;
> > +
> > + if (!task || !file || task->tgid != task->pid)
>
> task->tgid != task->pid is not needed here.
> The task_file iterator already tries to skip task with task->pid
> if its file table is the same as task->tgid.
Good to know!
next prev parent reply other threads:[~2020-11-27 9:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 16:44 [PATCH bpf-next v3 1/6] net: Remove the err argument from sock_from_file Florent Revest
2020-11-26 16:44 ` [PATCH bpf-next v3 2/6] bpf: Add a bpf_sock_from_file helper Florent Revest
2020-11-26 16:44 ` [PATCH bpf-next v3 3/6] bpf: Expose bpf_sk_storage_* to iterator programs Florent Revest
2020-11-26 22:58 ` KP Singh
2020-11-26 16:44 ` [PATCH bpf-next v3 4/6] bpf: Add an iterator selftest for bpf_sk_storage_delete Florent Revest
2020-11-26 16:44 ` [PATCH bpf-next v3 5/6] bpf: Add an iterator selftest for bpf_sk_storage_get Florent Revest
2020-11-27 7:00 ` Yonghong Song
2020-11-27 9:21 ` Florent Revest [this message]
2020-11-26 16:44 ` [PATCH bpf-next v3 6/6] bpf: Test bpf_sk_storage_get in tcp iterators Florent Revest
2020-11-27 7:02 ` Yonghong Song
2020-11-26 22:58 ` [PATCH bpf-next v3 1/6] net: Remove the err argument from sock_from_file KP Singh
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=492ad793692d03105f3ac2a2e1a3196dc01e5cef.camel@chromium.org \
--to=revest@chromium.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=revest@google.com \
--cc=viro@zeniv.linux.org.uk \
--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