[dts] [PATCH] test_plans: move rss to rte flow

Liu, Yong yong.liu at intel.com
Tue Apr 24 03:34:10 CEST 2018


Yuan,
Some comments are inline. 

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Peng Yuan
> Sent: Thursday, April 19, 2018 5:51 PM
> To: dts at dpdk.org
> Cc: Peng, Yuan <yuan.peng at intel.com>
> Subject: [dts] [PATCH] test_plans: move rss to rte flow
> 
> Add the test plan for the feature "move rss to rte flow"
> 


Yuan, "move rss to rte flow" is the internal naming. It's not suitable for the name of test plan.
I think rte_flow_rss_enable will be more suitable. 

> Signed-off-by: Peng Yuan <yuan.peng at intel.com>
> 
> diff --git a/test_plans/rss_to_rte_flow_test_plan.rst
> b/test_plans/rss_to_rte_flow_test_plan.rst
> new file mode 100644
> index 0000000..35a7f4b
> --- /dev/null
> +++ b/test_plans/rss_to_rte_flow_test_plan.rst
> @@ -0,0 +1,265 @@
> +.. Copyright (c) <2018>, 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.
> +
> +====================
> +Move RSS to rte_flow
> +====================
> +Description
> +===========
> +
> +   rte_flow actually defined to include RSS, but till now,
> +   RSS is out of rte_flow. It was suggested to move existing RSS to
> rte_flow.

Please check grammar issue. 

> +   This can be better for users, and may save effort for CPK development.
> +   RSS enabling: now the rss enable is done through
> rte_eth_rss_conf.rss_hf,
> +   need to enable it on rte_flow API . Need to implement it on igb ixgbe
> and
> +   i40e.

Please simplify the description, like "rte_flow API enabling RSS is support on igb/ixgbe/i40e"
And "rte flow API RSS input set is support on i40e".

> +   RSS input set changing: now the input set changing is done through
> +   rte_eth_dev_filter_ctrl, need to enable it on rte_flow API.
> +   Need to implement it on i40e.
> +   It will make the DDP and FXP on NICs can be changed by rte_flow API.

Not sure about the relationship between DDP/FXP and rte_flow RSS feature.
Please describe with more details. 

> +   New packet type group or pctype can be done in driver instead of the
> +   format of private API.
> +
> +Prerequisites
> +=============
> +
> +1. Hardware:
> +   Fortville/82599/I350
> +
> +2. Software:
> +   dpdk: http://dpdk.org/git/dpdk
> +   scapy: http://www.secdev.org/projects/scapy/
> +
> +3. Bind the pf port to dpdk driver::
> +
> +    ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1
> +
> +4. Configure three packets ready sent to port 0::
> +
> +    pkt1 =
> Ether(dst="00:00:00:00:01:00")/IP(src="10.0.0.1",dst="192.168.0.2")/SCTP(d
> port=80, sport=80)/("X"*48)
> +    pkt2 =
> Ether(dst="00:00:00:00:01:00")/IP(src="10.0.0.1",dst="192.168.0.2")/UDP(dp
> ort=50, sport=50)/("X"*48)
> +    pkt3 =
> Ether(dst="00:00:00:00:01:00")/IP(src="10.0.0.1",dst="192.168.0.3")/TCP(dp
> ort=50, sport=50)/("X"*48)
> +
> +Test case: set valid and invalid parameter
> +==========================================

Is this case suitable for all mentioned NICs? If not, please announce the NIC type.

> +
> +1. Start the testpmd::
> +
> +    ./testpmd -c 1ffff -n 4 -- -i --nb-cores=8 --rxq=16 --txq=16 --port-
> topology=chained
> +    testpmd> set fwd rxonly
> +    testpmd> set verbose 1
> +    testpmd> start
> +
> +2. Set the RSS queue rule::
> +
Please add more details for this rule like "Set queue 0, 8 and 15 into RSS region".

> +    testpmd> flow create 0 ingress pattern end actions rss queues 0 8 15
> end / end
> +
> +3. Send the three packets to port 0.
> +   All the packets are distributed to queue 0/8/15.
> +
> +4. Set a second RSS queue rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 3 end /
> end
> +    Caught error type 2 (flow rule (handle)): Failed to create flow.
> +
> +   There can't be more than one RSS queue rule.
> +
> +5. Reset the RSS queue rule::
> +
> +    testpmd> flow flush 0
> +    testpmd> flow create 0 ingress pattern end actions rss queues 3 end /
> end
> +
> +   The rule is set successfully.
> +   Send the three packets to port 0, all of them are distributed to queue
> 3.
> +
> +6. Set a wrong parameter::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 16 end
> / end
> +    Caught error type 11 (specific action): cause: 0x7ffdb2bbe6e8, queue
> id > max number of queues
> +
> +7. Set all the queues to the rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 0 1 2 3
> 4 5 6 7 8 9 10 11 12 13 14 15 end / end
> +
> +   Send the three packets to port 0, the packets may be distributed to
> any
> +   of the queue 0-15.
> +
> +Test case: disable rss in command-line
> +======================================
> +
> +1. Start the testpmd::
> +
> +    ./testpmd -c 1ffff -n 4 -- -i --nb-cores=8 --rxq=16 --txq=16 --
> +    testpmd> set fwd rxonly
> +    testpmd> set verbose 1
> +    testpmd> start
> +
> +2. Send the three packets to port 0.
> +   All the packets are distributed to queue 0.
> +
> +3. Set the RSS queue rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 6 7 8
> end / end
> +
> +   Send the three packets to port 0.
> +   All the packets are distributed to queue 6/7/8.
> +
> +4. Clean the rule::
> +
> +    testpmd> flow flush 0
> +
> +   Send the three packets to port 0.
> +   All the packets are distributed to queue 0.
> +
> +Test case: both set flow directer and rss rule
> +==============================================
> +
Case name like "Flow director rule and RSS rule combination" should be better.

> +1. Start the testpmd::
> +
> +    ./testpmd -c 1ffff -n 4 -- -i --nb-cores=8 --rxq=16 --txq=16 --pkt-
> filter-mode=perfect
> +    testpmd> set fwd rxonly
> +    testpmd> set verbose 1
> +    testpmd> start
> +
> +2. Set RSS queue rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 6 7 8
> end / end
> +
> +   Send pkt1 to port 0, pkt1 is distributed to queue 7.
> +
> +3. Set a flow director rule::
> +
> +    testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1
> dst is 192.168.0.2 / end actions queue index 1 / end
> +
> +   Send pkt1 to port 0, pkt1 is distributed to queue 1.
> +
> +4. Destroy the flow director rule::
> +
> +    testpmd> flow destroy 0 rule 1
> +
> +   Send pkt1 to port 0, pkt1 is distributed to queue 7 again.
> +
> +Test case: both set queue region and rss rule(fortville)
> +========================================================
> +
You can emphasize the NIC type in the content. 

> +1. Start the testpmd::
> +
> +    ./testpmd -c 1ffff -n 4 -- -i --nb-cores=16 --rxq=16 --txq=16 --port-
> topology=chained
> +    testpmd> set fwd rxonly
> +    testpmd> set verbose 1
> +    testpmd> start
> +
> +2. Set RSS queue rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 7 8 10
> 11 12 14 15 end / end
> +
> +3. Send pkt to port 0::
> +
> +    pkt1 = Ether(dst="00:00:00:00:01:00",
> src="52:00:00:00:00:00")/Dot1Q(prio=1) \
> +    /IP(src="10.0.0.1",dst="192.168.0.2")/TCP(dport=80, sport=80)/("X"*48)
> +    pkt2 = Ether(dst="00:00:00:00:01:00",
> src="52:00:00:00:00:00")/Dot1Q(prio=2) \
> +    /IP(src="10.0.0.1",dst="192.168.0.2")/TCP(dport=80, sport=80)/("X"*48)
> +    pkt3 = Ether(dst="00:00:00:00:01:00",
> src="52:00:00:00:00:00")/Dot1Q(prio=3) \
> +    /IP(src="10.0.0.1",dst="192.168.0.2")/TCP(dport=80, sport=80)/("X"*48)
> +
> +   They are all distributed to queue 8.
> +
> +4. Set queue region::
> +
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end
> actions rss queues 7 8 end / end
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x4000 / end
> actions rss queues 11 12 end / end
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x6000 / end
> actions rss queues 15 end / end
> +
> +   Send the 3 packets to port 0. They are distributed to queue 7/11/15.
> +
> +5. Flush the queue region::
> +
> +    testpmd> flow list 0
> +    ID      Group   Prio    Attr    Rule
> +    0       0       0       i-      => RSS
> +    1       0       0       i-      VLAN => RSS
> +    2       0       0       i-      VLAN => RSS
> +    3       0       0       i-      VLAN => RSS
> +
> +    testpmd> flow destroy 0 rule 2
> +    Flow rule #2 destroyed
> +    testpmd> flow list 0
> +    ID      Group   Prio    Attr    Rule
> +    0       0       0       i-      => RSS
> +    1       0       0       i-      VLAN => RSS
> +    3       0       0       i-      VLAN => RSS
> +
> +   Send the 3 packets to port 0. They are distributed to queue 0.
> +   destroy one queue region rule, all the rules become invalid.
> +
> +6. Set invalid queue or set discontinuous queue region::
> +
> +    testpmd> flow flush 0
> +    testpmd> flow create 0 ingress pattern end actions rss queues 8 10 11
> 12 15 end / end
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end
> actions rss queues 8 9 end / end
> +    Caught error type 11 (specific action): cause: 0x7ffda008efe8, no
> valid queues
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end
> actions rss queues 8 10 end / end
> +    Caught error type 11 (specific action): cause: 0x7ffda008efe8, no
> valid queues
> +    testpmd> flow create 0 ingress pattern vlan tci is 0x4000 / end
> actions rss queues 10 11 12 end / end
> +    i40e_flow_parse_rss_action(): The region sizes should be any of the
> following values: 1, 2, 4, 8, 16, 32, 64 as long as the total number of
> queues do not exceed the VSI allocation
> +    Caught error type 2 (flow rule (handle)): Failed to create flow.
> +
> +Test case: both set queue region and rss rule(fortville use old API)
> +====================================================================
> +
> +1. Start the testpmd::
> +
> +    ./testpmd -c 1ffff -n 4 -- -i --nb-cores=8 --rxq=16 --txq=16 --port-
> topology=chained
> +    testpmd> port config all rss all
> +    testpmd> set fwd rxonly
> +    testpmd> set verbose 1
> +    testpmd> start
> +
> +2. Set queue region::
> +
> +    testpmd> set port 0 queue-region region_id 0 queue_start_index 1
> queue_num 1
> +    testpmd> set port 0 queue-region region_id 0 flowtype 31
> +    testpmd> set port 0 queue-region flush on
> +
> +   Send pkt2 to port 0. It is distributed to queue 1.
> +
> +3. Set RSS queue rule::
> +
> +    testpmd> flow create 0 ingress pattern end actions rss queues 6 7 end
> / end
> +
> +   Send pkt2 to port 0. It is still distributed to queue 1.
> +
> +4. flush the queue region::
> +
> +    testpmd> set port 0 queue-region flush off
> +
> +   Send pkt2 to port 0. It is distributed to queue 7.
> --
> 2.5.0



More information about the dts mailing list