From: David Miller <davem@davemloft.net>
To: zeil@yandex-team.ru
Cc: netdev@vger.kernel.org, khlebnikov@yandex-team.ru,
cgroups@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v3 net] inet_diag: add cgroup id attribute
Date: Fri, 03 Apr 2020 16:08:09 -0700 (PDT) [thread overview]
Message-ID: <20200403.160809.1500394661848619682.davem@davemloft.net> (raw)
In-Reply-To: <20200403095627.GA85072@yandex-team.ru>
From: Dmitry Yakunin <zeil@yandex-team.ru>
Date: Fri, 3 Apr 2020 12:56:27 +0300
> This patch adds cgroup v2 ID to common inet diag message attributes.
> Cgroup v2 ID is kernfs ID (ino or ino+gen). This attribute allows filter
> inet diag output by cgroup ID obtained by name_to_handle_at() syscall.
> When net_cls or net_prio cgroup is activated this ID is equal to 1 (root
> cgroup ID) for newly created sockets.
>
> Some notes about this ID:
>
> 1) gets initialized in socket() syscall
> 2) incoming socket gets ID from listening socket
> (not during accept() syscall)
> 3) not changed when process get moved to another cgroup
> 4) can point to deleted cgroup (refcounting)
>
> v2:
> - use CONFIG_SOCK_CGROUP_DATA instead if CONFIG_CGROUPS
>
> v3:
> - fix attr size by using nla_total_size_64bit() (Eric Dumazet)
> - more detailed commit message (Konstantin Khlebnikov)
>
> Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
> Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
As a new feature, this should be resubmitted when net-next opens back
up. Thank you.
prev parent reply other threads:[~2020-04-03 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 9:56 [PATCH v3 net] inet_diag: add cgroup id attribute Dmitry Yakunin
2020-04-03 13:38 ` Tejun Heo
2020-04-03 13:41 ` Tejun Heo
2020-04-03 14:37 ` Konstantin Khlebnikov
[not found] ` <c28be8aa-d91c-3827-7e99-f92ad05ef6f1-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>
2020-04-03 14:45 ` Tejun Heo
2020-04-03 14:56 ` Konstantin Khlebnikov
2020-04-03 23:08 ` David Miller [this message]
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=20200403.160809.1500394661848619682.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bpf@vger.kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=khlebnikov@yandex-team.ru \
--cc=netdev@vger.kernel.org \
--cc=zeil@yandex-team.ru \
/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