Signed-off-by: Guinan Sun --- ..._fixed_link_speed_in_drivers_test_plan.rst | 323 ++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 test_plans/support_fixed_link_speed_in_drivers_test_plan.rst diff --git a/test_plans/support_fixed_link_speed_in_drivers_test_plan.rst b/test_plans/support_fixed_link_speed_in_drivers_test_plan.rst new file mode 100644 index 0000000..e26f8f1 --- /dev/null +++ b/test_plans/support_fixed_link_speed_in_drivers_test_plan.rst @@ -0,0 +1,323 @@ +.. Copyright (c) <2019>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + + +============================================= +Port Config Fixed Link Speed in drivers Tests +============================================= + +Description +=========== +Test whether support fixed link speed in drivers and "port config speed" command works properly. +Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required +to disable auto-negotiation. + +Prerequisites +============= + +1. Hardware:: + NIC driver driverversion firmware speed(MB) + I350 igb 5.4.0-k 1.63, 0x800009fa 10half/10/100half/100/1000 + X722 i40e 2.1.14-k 3.31 0x80000d31 1.1767.0 1000/10000 + X710 i40e 2.1.14-k 3.31 0x80000d31 1.1767.0 1000/10000 + X550T ixgbe 5.1.0-k 0x61bf0001 100/1000/10000 + X520(82599) ixgbe 5.1.0-k 0x61bf0001 10000 + E810-XXVDA2 ice 0.12.25 1.00 0x80001e61 1.2535.0 1000/10000/25000 + +2. linkage:: + link two ports of every NIC. + example: (i350_port0 Active<--->i350_port1(dpdk); E810_port0 Active<--->E810_port1(dpdk) etc.) + +3. Modify/Unmodify the testpmd code as following for the test:: + + --- a/app/test-pmd/cmdline.c + +++ b/app/test-pmd/cmdline.c + @@ -1597,17 +1597,17 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) + return -1; + } + if (!strcmp(speedstr, "1000")) { + - *speed = ETH_LINK_SPEED_1G; + + *speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "10000")) { + - *speed = ETH_LINK_SPEED_10G; + + *speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "25000")) { + - *speed = ETH_LINK_SPEED_25G; + + *speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "40000")) { + - *speed = ETH_LINK_SPEED_40G; + + *speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "50000")) { + - *speed = ETH_LINK_SPEED_50G; + + *speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "100000")) { + - *speed = ETH_LINK_SPEED_100G; + + *speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED; + } else if (!strcmp(speedstr, "auto")) { + *speed = ETH_LINK_SPEED_AUTONEG; + } else { + +Test Case: I350 port config +============================= + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 10 MB half-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 10 duplex half  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10 Mbps + Link duplex: half-duplex +2. set link speed to 10 MB full-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 10 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10 Mbps + Link duplex: full-duplex +3. set link speed to 100 MB half-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 100 duplex half  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 100 Mbps + Link duplex: half-duplex +4. set link speed to 100 MB full-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 100 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 100 Mbps + Link duplex: full-duplex +5. set link speed to 1000 MB full-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 1000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + +Test Case: x722 port config +============================= + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 1000 MB full-duplex, verify link speed:: + + testpmd> port stop all + testpmd> port config 0 speed 1000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + +2. set link speed to 10000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 10000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10000 Mbps + Link duplex: full-duplex + +Test Case: x710 port config +============================= + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 1000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 1000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + +2. set link speed to 10000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 10000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10000 Mbps + Link duplex: full-duplex + +Test Case: X550T port config +============================ + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 100 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 100 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 100 Mbps + Link duplex: full-duplex + +2. set link speed to 1000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 1000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + +3. set link speed to 10000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 10000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info all + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10000 Mbps + Link duplex: full-duplex + +Test Case: X520(82599) port config +=================================== + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 10000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 10000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10000 Mbps + Link duplex: full-duplex + +Test Case: E810-XXVDA2 port config +=================================== + +Run testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i + +1. set link speed to 1000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 1000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + +2. set link speed to 10000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 10000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 10000 Mbps + Link duplex: full-duplex + +3. set link speed to 25000 MB full-duplex, verify link speed:: + testpmd> port stop all + testpmd> port config 0 speed 25000 duplex full  + testpmd> port start all + Port 0: link state change event + testpmd> show port info 0 + Verify Result:: + ********************* Infos for port 0 ********************* + Link status: up + Link speed: 25000 Mbps + Link duplex: full-duplex -- 2.17.1