linux-stable/include/uapi
Konstantin Khlebnikov 589503cb24 inet_diag: fix reporting cgroup classid and fallback to priority
[ Upstream commit 1ec17dbd90 ]

Field idiag_ext in struct inet_diag_req_v2 used as bitmap of requested
extensions has only 8 bits. Thus extensions starting from DCTCPINFO
cannot be requested directly. Some of them included into response
unconditionally or hook into some of lower 8 bits.

Extension INET_DIAG_CLASS_ID has not way to request from the beginning.

This patch bundle it with INET_DIAG_TCLASS (ipv6 tos), fixes space
reservation, and documents behavior for other extensions.

Also this patch adds fallback to reporting socket priority. This filed
is more widely used for traffic classification because ipv4 sockets
automatically maps TOS to priority and default qdisc pfifo_fast knows
about that. But priority could be changed via setsockopt SO_PRIORITY so
INET_DIAG_TOS isn't enough for predicting class.

Also cgroup2 obsoletes net_cls classid (it always zero), but we cannot
reuse this field for reporting cgroup2 id because it is 64-bit (ino+gen).

So, after this patch INET_DIAG_CLASS_ID will report socket priority
for most common setup when net_cls isn't set and/or cgroup2 in use.

Fixes: 0888e372c3 ("net: inet: diag: expose sockets cgroup classid")
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:08:58 +01:00
..
asm-generic mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes 2018-10-05 16:32:04 -07:00
drm drm: add msm compressed format modifiers 2018-07-26 10:39:21 -04:00
linux inet_diag: fix reporting cgroup classid and fallback to priority 2019-02-27 10:08:58 +01:00
misc ocxl: Add an IOCTL so userspace knows what OCXL features are available 2018-06-03 20:40:32 +10:00
mtd ubi: expose the volume CRC check skip flag 2018-08-15 00:25:21 +02:00
rdma RDMA/vmw_pvrdma: Return the correct opcode when creating WR 2019-01-22 21:40:34 +01:00
scsi
sound ASoC: uapi: fix sound/skl-tplg-interface.h userspace compilation errors 2018-08-14 15:08:07 +01:00
video
xen xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00