test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH]test_plans: add cases to qos_meter_test_plan.rst
@ 2019-08-12  7:44 Peng Yuan
  2019-08-14  3:28 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yuan @ 2019-08-12  7:44 UTC (permalink / raw)
  To: dts; +Cc: Peng Yuan

Add some cases to qos_meter_test_plan.rst

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH]test_plans: add cases to qos_meter_test_plan.rst
  2019-08-12  7:44 [dts] [PATCH]test_plans: add cases to qos_meter_test_plan.rst Peng Yuan
@ 2019-08-14  3:28 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-08-14  3:28 UTC (permalink / raw)
  To: Peng, Yuan, dts; +Cc: Peng, Yuan

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan
> Sent: Monday, August 12, 2019 3:45 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: [dts] [PATCH]test_plans: add cases to qos_meter_test_plan.rst
> 
> Add some cases to qos_meter_test_plan.rst
> 
> Signed-off-by: Peng Yuan <yuan.peng@intel.com>
> 
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12  7:44 [dts] [PATCH]test_plans: add cases to qos_meter_test_plan.rst Peng Yuan
2019-08-14  3:28 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox