bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Dmitry Yakunin <zeil@yandex-team.ru>
Cc: davem@davemloft.net, 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, 3 Apr 2020 09:41:47 -0400	[thread overview]
Message-ID: <20200403134147.GX162390@mtj.duckdns.org> (raw)
In-Reply-To: <20200403133817.GW162390@mtj.duckdns.org>

On Fri, Apr 03, 2020 at 09:38:17AM -0400, Tejun Heo wrote:
> On Fri, Apr 03, 2020 at 12:56:27PM +0300, Dmitry Yakunin wrote:
> > 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)
> 
> How would this work with things like inetd? Would it make sense to associate the
> socket on the first actual send/recv?

Oh, it's not a problem with your patch as you're just following the associated
ptr, so we can have that discussion separately. Looks good to me from cgroup
side. Please feel free to add my acked-by.

Thanks.

-- 
tejun

  reply	other threads:[~2020-04-03 13:41 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 [this message]
2020-04-03 14:37   ` Konstantin Khlebnikov
2020-04-03 14:45     ` Tejun Heo
2020-04-03 14:56       ` Konstantin Khlebnikov
2020-04-03 23:08 ` David Miller

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=20200403134147.GX162390@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).