test suite reviews and discussions
 help / color / mirror / Atom feed
From: Guinan Sun <guinanx.sun@intel.com>
To: dts@dpdk.org
Cc: Guinan Sun <guinanx.sun@intel.com>
Subject: [dts] [PATCH v1] test_plans: support fixed link speed in drivers
Date: Tue,  3 Dec 2019 17:36:58 +0000	[thread overview]
Message-ID: <20191203173658.74952-1-guinanx.sun@intel.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 11606 bytes --]

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 ..._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


                 reply	other threads:[~2019-12-03  9:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203173658.74952-1-guinanx.sun@intel.com \
    --to=guinanx.sun@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).