提交 0fccfe5b 编写于 作者: H Hangbin Liu 提交者: Zheng Zengkai

selftests: forwarding: vxlan_bridge_1d: Fix vxlan ecn decapsulate value

stable inclusion
from stable-5.10.27
commit 7693b64ae508d71e42c7fd88b90845b65a25e818
bugzilla: 51493

--------------------------------

[ Upstream commit 5aa3c334 ]

The ECN bit defines ECT(1) = 1, ECT(0) = 2. So inner 0x02 + outer 0x01
should be inner ECT(0) + outer ECT(1). Based on the description of
__INET_ECN_decapsulate, the final decapsulate value should be
ECT(1). So fix the test expect value to 0x01.

Before the fix:
TEST: VXLAN: ECN decap: 01/02->0x02                                 [FAIL]
        Expected to capture 10 packets, got 0.

After the fix:
TEST: VXLAN: ECN decap: 01/02->0x01                                 [ OK ]

Fixes: a0b61f3d ("selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test")
Signed-off-by: NHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b1f2d93c
...@@ -658,7 +658,7 @@ test_ecn_decap() ...@@ -658,7 +658,7 @@ test_ecn_decap()
# In accordance with INET_ECN_decapsulate() # In accordance with INET_ECN_decapsulate()
__test_ecn_decap 00 00 0x00 __test_ecn_decap 00 00 0x00
__test_ecn_decap 01 01 0x01 __test_ecn_decap 01 01 0x01
__test_ecn_decap 02 01 0x02 __test_ecn_decap 02 01 0x01
__test_ecn_decap 01 03 0x03 __test_ecn_decap 01 03 0x03
__test_ecn_decap 02 03 0x03 __test_ecn_decap 02 03 0x03
test_ecn_decap_error test_ecn_decap_error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册