linux/include
Konstantin Khlebnikov 1ec17dbd90 inet_diag: fix reporting cgroup classid and fallback to priority
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>
2019-02-12 13:35:57 -05:00
..
acpi Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-26 17:03:51 -08:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2019-01-05 09:16:18 -08:00
clocksource
crypto crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
drm Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes 2019-01-11 10:26:21 +01:00
dt-bindings Mostly driver fixes, but there's a core framework fix in here too. 2019-01-31 23:22:57 -08:00
keys
kvm KVM: arm/arm64: Remove arch timer workqueue 2018-12-19 17:47:07 +00:00
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 11:21:54 -08:00
math-emu
media media fixes for v4.20-rc8 2018-12-25 13:11:30 -08:00
memory
misc
net net: ipv4: use a dedicated counter for icmp_v4 redirect packets 2019-02-08 21:50:15 -08:00
pcmcia
ras
rdma RDMA/device: Expose ib_device_try_get(() 2019-01-21 14:33:08 -07:00
scsi 4.21 merge window pull request 2018-12-28 14:57:10 -08:00
soc ARM: SoC driver updates 2018-12-31 17:32:35 -08:00
sound ALSA: compress: Fix stop handling on compressed capture streams 2019-02-05 22:01:41 +01:00
target
trace afs: Fix race in async call refcounting 2019-01-17 15:17:28 +00:00
uapi inet_diag: fix reporting cgroup classid and fallback to priority 2019-02-12 13:35:57 -05:00
video
xen arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00