[Fuego] change vlan id maximum to 4094 for vlan01

qiutt qiutt at cn.fujitsu.com
Mon Sep 14 11:41:29 UTC 2020


details: for vlan01 in net.features, create a vlan interface in the vlan id range (maximum 4095), 
and then delete the created vlan interface in turn.
but VLAN identifier (VID): a 12-bit field specifying the VLAN to
which the frame belongs. The hexadecimal values of 0x000 and 0xFFF are
reserved. All other values may be used as VLAN identifiers, allowing up
to 4,094 VLANs.
refer to
https://networkengineering.stackexchange.com/questions/24404/vlan-0-1-and-4095-are-reserved-what-are-they-reserved-for

Signed-off-by: qiutt <qiutt at cn.fujitsu.com>
---
 tests/Functional.LTP/fuego_test.sh                  |  2 ++
 tests/Functional.LTP/ltp-network-net.features.patch | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 tests/Functional.LTP/ltp-network-net.features.patch

diff --git a/tests/Functional.LTP/fuego_test.sh b/tests/Functional.LTP/fuego_test.sh
index c4c8129..4bd592a 100755
--- a/tests/Functional.LTP/fuego_test.sh
+++ b/tests/Functional.LTP/fuego_test.sh
@@ -358,6 +358,8 @@ function test_build {
         skip_if_config_unavailable "HAVE_NUMA" "get_mempolicy01 mbind01 migrate_pages01 migrate_pages02 move_pages01 move_pages02 move_pages03 move_pages04 move_pages05 move_pages06 move_pages07 move_pages08 move_pages09 move_pages10 move_pages11" "No NUMA support"
         skip_if_config_unavailable "HAVE_MODIFY_LDT" "modify_ldt01 modify_ldt02 modify_ldt03" "Add modify_ldt support"
 
+        patch -p0 < ${TEST_HOME}/ltp-network-net.features.patch
+
         # save build results in build.log
         # Typical build error:
         #   undefined reference to `io_submit'
diff --git a/tests/Functional.LTP/ltp-network-net.features.patch b/tests/Functional.LTP/ltp-network-net.features.patch
new file mode 100644
index 0000000..6bc80ff
--- /dev/null
+++ b/tests/Functional.LTP/ltp-network-net.features.patch
@@ -0,0 +1,20 @@
+--- testcases/network/virt/virt_lib.sh	2020-09-08 16:30:55.178336290 +0800
++++ testcases/network/virt/virt_lib.sh	2020-09-08 16:30:09.469282575 +0800
+@@ -144,7 +144,7 @@ virt_add_rhost()
+ virt_multiple_add_test()
+ {
+ 	local opt="$@"
+-	local max=$(($start_id + $NS_TIMES - 1))
++	local max=$((($start_id + $NS_TIMES - 1) > 4094 ? 4094 : ($start_id + $NS_TIMES - 1)))
+ 
+ 	tst_resm TINFO "add $NS_TIMES $virt_type, then delete"
+ 
+@@ -165,7 +165,7 @@ virt_multiple_add_test()
+ virt_add_delete_test()
+ {
+ 	local opt="$@"
+-	local max=$(($start_id + $NS_TIMES - 1))
++	local max=$((($start_id + $NS_TIMES - 1) > 4094 ? 4094 : ($start_id + $NS_TIMES - 1)))
+ 
+ 	tst_resm TINFO "add/del $virt_type $NS_TIMES times"
+ 
-- 
2.11.0





More information about the Fuego mailing list