]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "vxlan: fix tos value before xmit"
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 5 Aug 2020 02:41:31 +0000 (10:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Aug 2020 19:09:10 +0000 (12:09 -0700)
commit5871e1011d9185b9ad993daf203d9caba13dc72d
treeb099834f98025f072610db1706f08fde6b227b19
parentc3cf76db75c0a3051c0967e3915ce3c5a6a33078
Revert "vxlan: fix tos value before xmit"

This reverts commit 6f031e6b7c58c0cf11e679389a547321149f4faa.

In commit 6f031e6b7c58 ("vxlan: fix tos value before xmit") we want to
make sure the tos value are filtered by RT_TOS() based on RFC1349.

       0     1     2     3     4     5     6     7
    +-----+-----+-----+-----+-----+-----+-----+-----+
    |   PRECEDENCE    |          TOS          | MBZ |
    +-----+-----+-----+-----+-----+-----+-----+-----+

But RFC1349 has been obsoleted by RFC2474. The new DSCP field defined like

       0     1     2     3     4     5     6     7
    +-----+-----+-----+-----+-----+-----+-----+-----+
    |          DS FIELD, DSCP           | ECN FIELD |
    +-----+-----+-----+-----+-----+-----+-----+-----+

So with

IPTOS_TOS_MASK          0x1E
RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)

the first 3 bits DSCP info will get lost.

To take all the DSCP info in xmit, we should revert the patch and just push
all tos bits to ip_tunnel_ecn_encap(), which will handling ECN field later.

Fixes: 6f031e6b7c58 ("vxlan: fix tos value before xmit")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c