• Konstantin Khlebnikov's avatar
    inet_diag: fix reporting cgroup classid and fallback to priority · 25b3f56a
    Konstantin Khlebnikov authored
    [ Upstream commit 1ec17dbd ]
    
    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: 0888e372 ("net: inet: diag: expose sockets cgroup classid")
    Signed-off-by: 's avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    25b3f56a
Name
Last commit
Last update
..
bpfilter Loading commit data...
netfilter Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
af_inet.c Loading commit data...
ah4.c Loading commit data...
arp.c Loading commit data...
cipso_ipv4.c Loading commit data...
datagram.c Loading commit data...
devinet.c Loading commit data...
esp4.c Loading commit data...
esp4_offload.c Loading commit data...
fib_frontend.c Loading commit data...
fib_lookup.h Loading commit data...
fib_notifier.c Loading commit data...
fib_rules.c Loading commit data...
fib_semantics.c Loading commit data...
fib_trie.c Loading commit data...
fou.c Loading commit data...
gre_demux.c Loading commit data...
gre_offload.c Loading commit data...
icmp.c Loading commit data...
igmp.c Loading commit data...
inet_connection_sock.c Loading commit data...
inet_diag.c Loading commit data...
inet_fragment.c Loading commit data...
inet_hashtables.c Loading commit data...
inet_timewait_sock.c Loading commit data...
inetpeer.c Loading commit data...
ip_forward.c Loading commit data...
ip_fragment.c Loading commit data...
ip_gre.c Loading commit data...
ip_input.c Loading commit data...
ip_options.c Loading commit data...
ip_output.c Loading commit data...
ip_sockglue.c Loading commit data...
ip_tunnel.c Loading commit data...
ip_tunnel_core.c Loading commit data...
ip_vti.c Loading commit data...
ipcomp.c Loading commit data...
ipconfig.c Loading commit data...
ipip.c Loading commit data...
ipmr.c Loading commit data...
ipmr_base.c Loading commit data...
metrics.c Loading commit data...
netfilter.c Loading commit data...
netlink.c Loading commit data...
ping.c Loading commit data...
proc.c Loading commit data...
protocol.c Loading commit data...
raw.c Loading commit data...
raw_diag.c Loading commit data...
route.c Loading commit data...
syncookies.c Loading commit data...
sysctl_net_ipv4.c Loading commit data...
tcp.c Loading commit data...
tcp_bbr.c Loading commit data...
tcp_bic.c Loading commit data...
tcp_bpf.c Loading commit data...
tcp_cdg.c Loading commit data...
tcp_cong.c Loading commit data...
tcp_cubic.c Loading commit data...
tcp_dctcp.c Loading commit data...
tcp_dctcp.h Loading commit data...
tcp_diag.c Loading commit data...
tcp_fastopen.c Loading commit data...
tcp_highspeed.c Loading commit data...
tcp_htcp.c Loading commit data...
tcp_hybla.c Loading commit data...
tcp_illinois.c Loading commit data...
tcp_input.c Loading commit data...
tcp_ipv4.c Loading commit data...
tcp_lp.c Loading commit data...
tcp_metrics.c Loading commit data...
tcp_minisocks.c Loading commit data...
tcp_nv.c Loading commit data...
tcp_offload.c Loading commit data...
tcp_output.c Loading commit data...
tcp_rate.c Loading commit data...
tcp_recovery.c Loading commit data...
tcp_scalable.c Loading commit data...
tcp_timer.c Loading commit data...
tcp_ulp.c Loading commit data...
tcp_vegas.c Loading commit data...
tcp_vegas.h Loading commit data...
tcp_veno.c Loading commit data...
tcp_westwood.c Loading commit data...
tcp_yeah.c Loading commit data...
tunnel4.c Loading commit data...
udp.c Loading commit data...
udp_diag.c Loading commit data...
udp_impl.h Loading commit data...
udp_offload.c Loading commit data...
udp_tunnel.c Loading commit data...
udplite.c Loading commit data...
xfrm4_input.c Loading commit data...
xfrm4_mode_beet.c Loading commit data...
xfrm4_mode_transport.c Loading commit data...
xfrm4_mode_tunnel.c Loading commit data...
xfrm4_output.c Loading commit data...
xfrm4_policy.c Loading commit data...
xfrm4_protocol.c Loading commit data...
xfrm4_state.c Loading commit data...
xfrm4_tunnel.c Loading commit data...