From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 186F1A0471 for ; Mon, 12 Aug 2019 09:40:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA7541252; Mon, 12 Aug 2019 09:40:27 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 75F602C5 for ; Mon, 12 Aug 2019 09:40:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 00:40:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,376,1559545200"; d="scan'208";a="204626676" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 12 Aug 2019 00:40:11 -0700 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Mon, 12 Aug 2019 15:44:47 +0800 Message-Id: <1565595887-64969-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH]test_plans: add cases to qos_meter_test_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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Add some cases to qos_meter_test_plan.rst Signed-off-by: Peng Yuan diff --git a/test_plans/qos_meter_test_plan.rst b/test_plans/qos_meter_test_plan.rst index 671c6ce..8e20167 100644 --- a/test_plans/qos_meter_test_plan.rst +++ b/test_plans/qos_meter_test_plan.rst @@ -60,15 +60,35 @@ dut_port_1 : "0000:05:00.1" APP_MODE_SRTCM_COLOR_BLIND -Test Case: srTCM blind -====================== -1. The application is constrained to use a single core in the EAL core mask +4. The policy table is:: + + policer_table[RTE_COLORS][RTE_COLORS] = + { + { GREEN, RED, RED}, + { DROP, YELLOW, RED}, + { DROP, DROP, RED} + }; + + In which:: + + GREEN = 0; YELLOW = 1; RED = 2; DROP = 3. + + So the policy action is decided by input_color and output_color. + +5. The application is constrained to use a single core in the EAL core mask and 2 ports only in the application port mask (first port from the port mask is used for RX and the other port in the core mask is used for TX):: ./build/qos_meter -c 1 -n 4 -- -p 0x3 -2. Assuming the input traffic is generated at line rate and all packets +Test Case: srTCM blind input color RED +====================================== +1. The input color of packets depends on the value "APP_PKT_COLOR_POS". + The default value is 5, caculate the input_color is "RED" + +2. Use the default setting, the packets are 64 bytes Ethernet frames, + and the metering mode is srTCM blind. + Assuming the input traffic is generated at line rate and all packets are 64 bytes Ethernet frames (IPv4 packet size of 46 bytes) and green, the expected output traffic should be marked as shown in the following table: @@ -87,7 +107,175 @@ Test Case: srTCM blind | FWD | 14.88 | 0 | 0 | +-------------+------------------------------+------------+ -3. Use the default setting, the packets are 64 bytes Ethernet frames, - and the metering mode is srTCM blind. - The green packets are dropped. + The data is caculated by "cir = 1000000 * 46, .cbs = 2048, .ebs = 2048". + The linerate is 14.88Mpps, 1Mpps packets output_color are marked Green, + 13.88Mpps packets output_color are marked Red and Yellow. + mapping the policer_table[2][0](DROP), policer_table[2][1](YELLOW) + and policer_table[2][2](RED). So the valid frames received on the peer IXIA port is 13.88(Mpps). + +Test Case: srTCM blind input color GREEN +======================================== +1. The input color of packets depends on the value "APP_PKT_COLOR_POS". + Set:: + + #define APP_PKT_COLOR_POS 3 + + Caculate the input_color is "GREEN". + +2. Use the default setting, the packets are 64 bytes Ethernet frames, + and the metering mode is srTCM blind. + All the packets are mapped to the first row policer_table[0][0](GREEN), + and policer_table[0][1](RED) and policer_table[0][2](RED). + So the valid frames received on the peer IXIA port is 14.88(Mpps). + +Test Case: srTCM aware input color RED +====================================== +1. The input color of packets depends on the value "APP_PKT_COLOR_POS". + Set:: + + #define APP_PKT_COLOR_POS 5 + + Caculate the input_color is "RED". + +2. Use the default setting, the packets are 64 bytes Ethernet frames, + and the metering mode is srTCM aware:: + + #define APP_MODE APP_MODE_SRTCM_COLOR_AWARE + +3. In Color-Aware mode, if the input color is red, then output color is red too. + See the RFC 2697 file. + The linerate is 14.88Mpps, all packets output_color are marked red, + mapping the policer_table[2][2](RED). + So the valid frames received on the peer IXIA port is 14.88(Mpps). + +Test Case: trTCM blind mode +=========================== +1. The input color of packets depends on the value "APP_PKT_COLOR_POS". + Set:: + + #define APP_PKT_COLOR_POS 5 + + Caculate the input_color is "RED". + +2. Use the default setting, the packets are 64 bytes Ethernet frames, + and the metering mode is trTCM blind:: + + #define APP_MODE APP_MODE_TRTCM_COLOR_BLIND + +3. In Color-Blind mode, the output color has nothing to do with input color. + See the RFC 2698 file. + The linerate is 14.88Mpps, 1Mpps packets output_color are marked Green, + 0.5Mpps packets are marked yellow, 13.38Mpps packets output_color are marked Red. + Mapping the policer_table[2][0](DROP), policer_table[2][1](DROP) + and policer_table[2][2](RED). + So the valid frames received on the peer IXIA port is 13.38(Mpps). + +4. If Set:: + + #define APP_PKT_COLOR_POS 4 + + Caculate the input_color is "YELLOW". + Mapping the policer_table[1][0](DROP), policer_table[1][1](YELLOW) + and policer_table[1][2](RED). + The valid frames received on the peer IXIA port is 13.88(Mpps). + +5. If Set:: + + #define APP_PKT_COLOR_POS 3 + + Caculate the input_color is "GREEN". + Mapping the policer_table[0][0](GREEN), policer_table[0][1](RED) + and policer_table[0][2](RED). + The valid frames received on the peer IXIA port is 14.88(Mpps). + +Test Case: trTCM aware mode +=========================== +1. The input color of packets depends on the value "APP_PKT_COLOR_POS". + Set:: + + #define APP_PKT_COLOR_POS 5 + + Caculate the input_color is "RED". + +2. Use the default setting, the packets are 64 bytes Ethernet frames, + and the metering mode is trTCM aware:: + + #define APP_MODE APP_MODE_TRTCM_COLOR_AWARE + +3. See the RFC 2698 file. + If the packet has been precolored as red or if Tp(t)-B < 0, the packet is red, + So all packets output_color are marked Red. + Mapping the policer_table[2][2](RED). + So the valid frames received on the peer IXIA port is 14.88(Mpps). + +4. If Set:: + + #define APP_PKT_COLOR_POS 4 + + Caculate the input_color is "YELLOW". + If the packet has been precolored as yellow or if Tc(t)-B < 0, + the packet is yellow and Tp is decremented by B + So all packets output_color are marked yellow. + Mapping the policer_table[2][2](YELLOW). + The valid frames received on the peer IXIA port is 14.88(Mpps). + +5. If Set:: + + #define APP_PKT_COLOR_POS 3 + + Caculate the input_color is "GREEN". + See the RFC 2698 file, all packets output_color are marked green. + The valid frames received on the peer IXIA port is 14.88(Mpps). + +Test Case: srTCM blind changed CBS and EBS +========================================== +1. Use the default settings:: + + #define APP_MODE APP_MODE_SRTCM_COLOR_BLIND + #define APP_PKT_COLOR_POS 5 + + Caculate the input_color is "RED". + +2. Set app_srtcm_params:: + + .cbs = 64, + .ebs = 512 + +3. The metering mode is srTCM blind. + The packets are 64 bytes Ethernet frames, the IPv4 packet size of 46 bytes. + The linerate is 14.88Mpps, 1.01Mpps packets output_color are marked Green and yellow, + 13.87Mpps packets output_color are marked red. + Mapping the policer_table[2][0]/[2][1](DROP) and policer_table[2][2](RED). + So the valid frames received on the peer IXIA port is 13.87(Mpps). + The drop percent is 6.79% + +4. The packets are 82 bytes Ethernet frames, the IPv4 packet size of 64 bytes. + The linerate is 12.255 Mpps, the valid frames received on the peer IXIA port is 11.530Mpps. + The drop percent is 5.92%. + If set policer_table[2][0] "GREEN", + the valid frames received on the peer IXIA port is 12.142Mpps. + The drop percent is 0.92%. + So the packets whose output color are marked green are 5%, yellow 0.92%, red 94.08%. + +5. The packets are 83 bytes Ethernet frames, the IPv4 packet size of 65 bytes > cbs. + The linerate is 12.135 Mpps, the valid frames received on the peer IXIA port is 11.422Mpps. + The drop percent is 5.88%. + If set policer_table[2][0] "GREEN", + the valid frames received on the peer IXIA port is still 11.422Mpps. + So the packets whose output color are marked green are 0%, yellow 5.88%, red 94.12%. + +6. The packets are 146 bytes Ethernet frames, the IPv4 packet size of 128 bytes. + The linerate is 7.530 Mpps, the valid frames received on the peer IXIA port is 7.168Mpps. + The dropped packets are marked yellow, others are marked red. + The drop percent is 4.81%. + +7. The packets are 512 bytes Ethernet frames, the IPv4 packet size of 530 bytes. + The linerate is 2.272 Mpps, the valid frames received on the peer IXIA port is 2.191Mpps. + The dropped packets are marked yellow, others are marked red. + The drop percent is 3.57%. + +8. The packets are 513 bytes Ethernet frames, the IPv4 packet size of 531 bytes > ebs. + The linerate is 2.268 Mpps, the valid frames received on the peer IXIA port is 2.268Mpps. + All the packets are marked red. + The drop percent is 0%. -- 2.7.4