]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: reflect tos value received in SYN to the socket
authorWei Wang <weiwan@google.com>
Thu, 10 Sep 2020 00:50:48 +0000 (17:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Sep 2020 20:15:40 +0000 (13:15 -0700)
commit6553988b8db05396aabe46ba804ca0a60bbb02d6
treef9db7718210545aa9708155babb2b1df39fb0fce
parent32389723e5c8342c628e1dbeb70c89add5622737
tcp: reflect tos value received in SYN to the socket

This commit adds a new TCP feature to reflect the tos value received in
SYN, and send it out on the SYN-ACK, and eventually set the tos value of
the established socket with this reflected tos value. This provides a
way to set the traffic class/QoS level for all traffic in the same
connection to be the same as the incoming SYN request. It could be
useful in data centers to provide equivalent QoS according to the
incoming request.
This feature is guarded by /proc/sys/net/ipv4/tcp_reflect_tos, and is by
default turned off.

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netns/ipv4.h
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c