]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Allow full IP tos/IPv6 tclass to be reflected in L3 header
authorAlexander Duyck <alexanderduyck@fb.com>
Thu, 19 Nov 2020 21:23:51 +0000 (13:23 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Nov 2020 02:09:47 +0000 (18:09 -0800)
commit8092b90deba455453ecab1518035123309ec6624
treef24e978749d7674ef971527afa9ea448ea9ca7fa
parentb707565293f7a6d9e8b7a83a9c9a5d2894947cb0
tcp: Allow full IP tos/IPv6 tclass to be reflected in L3 header

An issue was recently found where DCTCP SYN/ACK packets did not have the
ECT bit set in the L3 header. A bit of code review found that the recent
change referenced below had gone though and added a mask that prevented the
ECN bits from being populated in the L3 header.

This patch addresses that by rolling back the mask so that it is only
applied to the flags coming from the incoming TCP request instead of
applying it to the socket tos/tclass field. Doing this the ECT bits were
restored in the SYN/ACK packets in my testing.

One thing that is not addressed by this patch set is the fact that
tcp_reflect_tos appears to be incompatible with ECN based congestion
avoidance algorithms. At a minimum the feature should likely be documented
which it currently isn't.

Fixes: 6553988b8db0 ("tcp: reflect tos value received in SYN to the socket")
Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Acked-by: Wei Wang <weiwan@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c