From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 8FB7D1150 for ; Wed, 23 Jan 2019 10:58:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2019 01:57:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,510,1539673200"; d="scan'208";a="140566927" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 23 Jan 2019 01:57:58 -0800 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Wed, 23 Jan 2019 18:01:38 +0800 Message-Id: <1548237698-23926-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH] test_plans: Add qos_api_plan.rst X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2019 09:58:01 -0000 Add qos_api_plan.rst to test_plans Signed-off-by: Peng Yuan diff --git a/test_plans/qos_api_plan.rst b/test_plans/qos_api_plan.rst new file mode 100644 index 0000000..5f0f10a --- /dev/null +++ b/test_plans/qos_api_plan.rst @@ -0,0 +1,403 @@ +======= +QoS API +======= + +Description +=========== +The generic API for the Quality of Service (QoS) Traffic Management of Ethernet +devices, which includes the following main features: hierarchical scheduling, +traffic shaping, congestion management, packet marking. +The TM setting commands are as following: +1. Add the port traffic management private shaper profile:: + + testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \ + (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size) \ + (packet_length_adjust) + +2. Add nonleaf node to port traffic management hiearchy:: + + testpmd> add port tm nonleaf node (port_id) (node_id) (parent_node_id) \ + (priority) (weight) (level_id) (shaper_profile_id) \ + (n_sp_priorities) (stats_mask) (n_shared_shapers) \ + [(shared_shaper_0) (shared_shaper_1) ...] \ + +3. Add leaf node to port traffic management hiearchy:: + + testpmd> add port tm leaf node (port_id) (node_id) (parent_node_id) \ + (priority) (weight) (level_id) (shaper_profile_id) \ + (cman_mode) (wred_profile_id) (stats_mask) (n_shared_shapers) \ + [(shared_shaper_id) (shared_shaper_id) ...] \ + +4. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit (port_id) (clean_on_fail) + +Prerequisites +============= +For i40e, need enable rss +For ixgbe, need disable rss. +The DUT must have two 10G Ethernet ports connected to two ports on tester:: + + dut_port_0 <---> tester_port_0 + dut_port_1 <---> tester_port_1 + +Assume two DUT 10G Ethernet ports' pci device id is as the following:: + + dut_port_0 : "0000:05:00.0" + dut_port_1 : "0000:05:00.1" + +Bind two ports to dpdk driver:: + + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 + +Test Cases for I40e: +==================== + +Test Case: dcb 4 tc queue mapping +================================= +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-27 -n 4 --master-lcore=23 -- -i --nb-cores=4 --rxq=4 --txq=4 --rss-ip + testpmd> port stop all + testpmd> port config 0 dcb vt off 4 pfc off + testpmd> port config 1 dcb vt off 4 pfc off + testpmd> port start all + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Send packets with set vlan user priority 0, 1, 2, 3, verify:: + + pkt1 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=0)/IP()/Raw('x'*20) + pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=1)/IP()/Raw('x'*20) + pkt3 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=2)/IP()/Raw('x'*20) + pkt4 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=3)/IP()/Raw('x'*20) + + packet with vlan user priority 0 should be received by queue 0 + packet with vlan user priority 1 should be received by queue 1 + packet with vlan user priority 2 should be received by queue 2 + packet with vlan user priority 3 should be received by queue 3 + +Test Case: dcb 8 tc queue mapping +================================= +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-31 -n 4 --master-lcore=23 -- -i --nb-cores=8 --rxq=8 --txq=8 --rss-ip + testpmd> port stop all + testpmd> port config 0 dcb vt off 8 pfc off + testpmd> port config 1 dcb vt off 8 pfc off + testpmd> port start all + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Send packet with set vlan user priority 0, 1, 2, 3, 4, 5, 6, 7, verify:: + + pkt1 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=0)/IP()/Raw('x'*20) + pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=1)/IP()/Raw('x'*20) + pkt3 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=2)/IP()/Raw('x'*20) + pkt4 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=3)/IP()/Raw('x'*20) + pkt5 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=4)/IP()/Raw('x'*20) + pkt6 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=5)/IP()/Raw('x'*20) + pkt7 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=6)/IP()/Raw('x'*20) + pkt8 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=7)/IP()/Raw('x'*20) + + packet with vlan user priority 0 should be received by queue 0 + packet with vlan user priority 1 should be received by queue 1 + packet with vlan user priority 2 should be received by queue 2 + packet with vlan user priority 3 should be received by queue 3 + packet with vlan user priority 4 should be received by queue 4 + packet with vlan user priority 5 should be received by queue 5 + packet with vlan user priority 6 should be received by queue 6 + packet with vlan user priority 7 should be received by queue 7 + +Test Case: shaping 1 port 4 tc +============================== +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-27 -n 4 --master-lcore=23 -- -i --nb-cores=4 --rxq=4 --txq=4 --rss-ip + testpmd> port stop all + testpmd> port config 0 dcb vt off 4 pfc off + testpmd> port config 1 dcb vt off 4 pfc off + +2. Add root non leaf node:: + + testpmd> add port tm nonleaf node 1 1000000 -1 0 1 0 -1 1 0 0 + +3. Add private shaper 1, 2, 3, 4 for tc node 0-4:: + + testpmd> add port tm node shaper profile 1 1 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 2 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 3 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 4 0 0 25000000 0 0 + +4. Add tc node:: + + testpmd> add port tm nonleaf node 1 900000 1000000 0 1 1 1 1 0 0 + testpmd> add port tm nonleaf node 1 900001 1000000 0 1 1 2 1 0 0 + testpmd> add port tm nonleaf node 1 900002 1000000 0 1 1 3 1 0 0 + testpmd> add port tm nonleaf node 1 900003 1000000 0 1 1 4 1 0 0 + +5. Add queue leaf node:: + + testpmd> add port tm leaf node 1 0 900000 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 1 900001 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 2 900002 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 3 900003 0 1 2 -1 0 0xffffffff 0 0 + +6. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit 1 no + testpmd> port start all + testpmd> start + +7. Send four flows with user priority 0, 1, 2, 3, + verify shaping each flow to 200Mbps(25MBps). + +Test Case: shaping 1 port 8 tc +=============================== +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-31 -n 4 --master-lcore=23 -- -i --nb-cores=8 --rxq=8 --txq=8 --rss-ip + testpmd> port stop all + testpmd> port config 0 dcb vt off 8 pfc off + testpmd> port config 1 dcb vt off 8 pfc off + +2. Add root non leaf node:: + + testpmd> add port tm nonleaf node 1 1000000 -1 0 1 0 -1 1 0 0 + +3. Add private shaper 1, 2, 3, 4, 5, 6, 7, 8, for tc node 0-7:: + + testpmd> add port tm node shaper profile 1 1 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 2 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 3 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 4 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 5 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 6 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 7 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 8 0 0 25000000 0 0 + +4. Add tc node:: + + testpmd> add port tm nonleaf node 1 900000 1000000 0 1 1 1 1 0 0 + testpmd> add port tm nonleaf node 1 900001 1000000 0 1 1 2 1 0 0 + testpmd> add port tm nonleaf node 1 900002 1000000 0 1 1 3 1 0 0 + testpmd> add port tm nonleaf node 1 900003 1000000 0 1 1 4 1 0 0 + testpmd> add port tm nonleaf node 1 900004 1000000 0 1 1 5 1 0 0 + testpmd> add port tm nonleaf node 1 900005 1000000 0 1 1 6 1 0 0 + testpmd> add port tm nonleaf node 1 900006 1000000 0 1 1 7 1 0 0 + testpmd> add port tm nonleaf node 1 900007 1000000 0 1 1 8 1 0 0 + +5. Add queue leaf node:: + + testpmd> add port tm leaf node 1 0 900000 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 1 900001 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 2 900002 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 3 900003 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 4 900004 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 5 900005 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 6 900006 0 1 2 -1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 7 900007 0 1 2 -1 0 0xffffffff 0 0 + +6. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit 1 no + testpmd> port start all + testpmd> start + +7. Send four flows with user priority 0, 1, 2, 3, 4, 5, 6, 7, + verify shaping each flow to 200Mbps(25MBps). + +Test Case: shaping for port +=========================== +1. Start testpmd:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-27 -n 4 --master-lcore=23 -- -i --nb-cores=4 --rxq=4 --txq=4 --rss-ip + testpmd> port stop 1 + +1. Add private shaper 0:: + + testpmd> add port tm node shaper profile 1 0 0 0 25000000 0 0 + +2. Add port (root nonleaf) node:: + + testpmd> add port tm nonleaf node 1 1000000 -1 0 1 0 0 1 0 0 + +3. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit 1 no + testpmd> port start 1 + testpmd> start + +4. Start transmitting, + verify shaping the traffic to 200Mbps(25MBps). + +Test Cases for ixgbe: +==================== + +Test Case: dcb 4 tc queue mapping +================================= +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 3-7 -n 4 --master-lcore=3 -- -i --nb-cores=4 --rxq=4 --txq=4 --disable-rss + testpmd> vlan set filter off 0 + testpmd> vlan set filter off 1 + testpmd> port stop all + testpmd> port config 0 dcb vt off 4 pfc off + testpmd> port config 1 dcb vt off 4 pfc off + testpmd> port start all + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Send packets with set vlan user priority 0, 1, 2, 3, verify:: + + pkt1 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=0)/IP()/Raw('x'*20) + pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=1)/IP()/Raw('x'*20) + pkt3 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=2)/IP()/Raw('x'*20) + pkt4 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=3)/IP()/Raw('x'*20) + + packet with vlan user priority 0 should be received by queue 0 + packet with vlan user priority 1 should be received by queue 32 + packet with vlan user priority 2 should be received by queue 64 + packet with vlan user priority 3 should be received by queue 96 + +Test Case: dcb 8 tc queue mapping +================================= +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 3-11 -n 4 --master-lcore=3 -- -i --nb-cores=8 --rxq=8 --txq=8 --disable-rss + testpmd> vlan set filter off 0 + testpmd> vlan set filter off 1 + testpmd> port stop all + testpmd> port config 0 dcb vt off 8 pfc off + testpmd> port config 1 dcb vt off 8 pfc off + testpmd> port start all + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Send packet with set vlan user priority 0, 1, 2, 3, 4, 5, 6, 7, verify:: + + pkt1 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=0)/IP()/Raw('x'*20) + pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=1)/IP()/Raw('x'*20) + pkt3 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=2)/IP()/Raw('x'*20) + pkt4 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=3)/IP()/Raw('x'*20) + pkt5 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=4)/IP()/Raw('x'*20) + pkt6 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=5)/IP()/Raw('x'*20) + pkt7 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=6)/IP()/Raw('x'*20) + pkt8 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(prio=7)/IP()/Raw('x'*20) + + packet with vlan user priority 0 should be received by queue 0 + packet with vlan user priority 1 should be received by queue 16 + packet with vlan user priority 2 should be received by queue 32 + packet with vlan user priority 3 should be received by queue 48 + packet with vlan user priority 4 should be received by queue 64 + packet with vlan user priority 5 should be received by queue 80 + packet with vlan user priority 6 should be received by queue 96 + packet with vlan user priority 7 should be received by queue 112 + +Test Case: shaping for queue with 4 tc +====================================== +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 3-7 -n 4 --master-lcore=3 -- -i --nb-cores=4 --rxq=4 --txq=4 --disable-rss + testpmd> vlan set filter off 0 + testpmd> vlan set filter off 1 + testpmd> port stop all + testpmd> port config 0 dcb vt off 4 pfc off + testpmd> port config 1 dcb vt off 4 pfc off + testpmd> port start all + +2. Add root non leaf node:: + + testpmd> add port tm nonleaf node 1 1000000 -1 0 1 0 -1 1 0 0 + +3. Add tc node:: + + testpmd> add port tm nonleaf node 1 900000 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900001 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900002 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900003 1000000 0 1 1 -1 1 0 0 + +4. Add private shaper 1, 2, 3, 4 for tc node 0-4:: + + testpmd> add port tm node shaper profile 1 0 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 1 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 2 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 3 0 0 25000000 0 0 + +5. Add queue leaf node:: + + testpmd> add port tm leaf node 1 0 900000 0 1 2 0 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 1 900001 0 1 2 1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 2 900002 0 1 2 2 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 3 900003 0 1 2 3 0 0xffffffff 0 0 + +6. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit 1 no + testpmd> port start all + testpmd> start + +7. Send four flows with user priority 0, 1, 2, 3, + verify shaping each flow to 200Mbps(25MBps). + +Test Case: shaping for queue with 8 tc +====================================== +1. Start testpmd and set DCB:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -l 3-11 -n 4 --master-lcore=3 -- -i --nb-cores=8 --rxq=8 --txq=8 --disable-rss + testpmd> vlan set filter off 0 + testpmd> vlan set filter off 1 + testpmd> port stop all + testpmd> port config 0 dcb vt off 8 pfc off + testpmd> port config 1 dcb vt off 8 pfc off + testpmd> port start all + +2. Add root non leaf node:: + + testpmd> add port tm nonleaf node 1 1000000 -1 0 1 0 -1 1 0 0 + +3. Add tc node:: + + testpmd> add port tm nonleaf node 1 900000 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900001 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900002 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900003 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900004 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900005 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900006 1000000 0 1 1 -1 1 0 0 + testpmd> add port tm nonleaf node 1 900007 1000000 0 1 1 -1 1 0 0 + +4. Add private shaper 1, 2, 3, 4, 5, 6, 7, 8, for tc node 0-7:: + + testpmd> add port tm node shaper profile 1 0 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 1 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 2 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 3 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 4 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 5 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 6 0 0 25000000 0 0 + testpmd> add port tm node shaper profile 1 7 0 0 25000000 0 0 + +5. Add queue leaf node:: + + testpmd> add port tm leaf node 1 0 900000 0 1 2 0 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 1 900001 0 1 2 1 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 2 900002 0 1 2 2 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 3 900003 0 1 2 3 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 4 900004 0 1 2 4 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 5 900005 0 1 2 5 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 6 900006 0 1 2 6 0 0xffffffff 0 0 + testpmd> add port tm leaf node 1 7 900007 0 1 2 7 0 0xffffffff 0 0 + +6. Commit the traffic management hierarchy on the port:: + + testpmd> port tm hierarchy commit 1 no + testpmd> port start all + testpmd> start + +7. Send four flows with user priority 0, 1, 2, 3, 4, 5, 6, 7, 8, + verify shaping each flow to 200Mbps(25MBps). -- 2.5.0