Re: [PATCH net-next 0/2] inet_diag: add cgroup attribute and filter
From: Konstantin Khlebnikov <hidden>
Date: 2020-05-01 05:54:19
Also in:
bpf, cgroups
From: Konstantin Khlebnikov <hidden>
Date: 2020-05-01 05:54:19
Also in:
bpf, cgroups
On 30/04/2020 22.55, David Miller wrote:
From: Dmitry Yakunin <redacted> Date: Thu, 30 Apr 2020 18:51:13 +0300quoted
This patch series extends inet diag with cgroup v2 ID attribute and filter. Which allows investigate sockets on per cgroup basis. Patch for ss is already sent to iproute2-next mailing list.Ok, this looks fine, series applied. Although I wish you could have done something like only emit the cgroup attribute if it is a non-default value (zero, or whatever it is). Every time a new socket attribute is added, it makes long dumps more and more expensive.
Maybe then put it under condition
if (ext & (1 << (INET_DIAG_CLASS_ID - 1)) ||
ext & (1 << (INET_DIAG_TCLASS - 1))) {
like legacy cgroup id INET_DIAG_CLASS_ID above.
(userspace requests it by INET_DIAG_TCLASS because INET_DIAG_CLASS_ID does not fit into field)