From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7D7ECA046B for ; Tue, 25 Jun 2019 10:42:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2FA1C1BB83; Tue, 25 Jun 2019 10:42:04 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 48CB81BB78 for ; Tue, 25 Jun 2019 10:42:02 +0200 (CEST) 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; 25 Jun 2019 01:42:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,415,1557212400"; d="scan'208";a="182838477" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 25 Jun 2019 01:41:58 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Jun 2019 01:41:45 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Jun 2019 01:41:44 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0439.000; Tue, 25 Jun 2019 16:41:42 +0800 From: "Lin, Xueqin" To: "Mo, YufengX" , "dts@dpdk.org" CC: "Mo, YufengX" Thread-Topic: [dts] [PATCH V5 1/2] [examples/flow_classify]: upload test plan Thread-Index: AQHVKy6tGbnB8Nw6YEqfTOtDkjtmWKasDPbQ Date: Tue, 25 Jun 2019 08:41:42 +0000 Message-ID: <0D300480287911409D9FF92C1FA2A3355B51CEE0@SHSMSX104.ccr.corp.intel.com> References: <1561450799-144563-1-git-send-email-yufengx.mo@intel.com> <1561450799-144563-2-git-send-email-yufengx.mo@intel.com> In-Reply-To: <1561450799-144563-2-git-send-email-yufengx.mo@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V5 1/2] [examples/flow_classify]: upload test plan 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" Acked-by: Lin Xueqin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx > Sent: Tuesday, June 25, 2019 4:20 PM > To: dts@dpdk.org > Cc: Mo, YufengX > Subject: [dts] [PATCH V5 1/2] [examples/flow_classify]: upload test plan >=20 >=20 > This test plan is for flow classify feature. > flow_classify is the tool to call flow_classify lib for group of packets,= just after > receiving them or before transmitting them. >=20 > Signed-off-by: yufengmx > --- > test_plans/flow_classify_test_plan.rst | 332 > +++++++++++++++++++++++++++++++++ > 1 file changed, 332 insertions(+) > create mode 100644 test_plans/flow_classify_test_plan.rst >=20 > diff --git a/test_plans/flow_classify_test_plan.rst > b/test_plans/flow_classify_test_plan.rst > new file mode 100644 > index 0000000..1b30b06 > --- /dev/null > +++ b/test_plans/flow_classify_test_plan.rst > @@ -0,0 +1,332 @@ > +.. 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. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +flow classify > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +This document provides test plan for flow classify feature. > + > +Flow Classify provides flow record information with some measured > properties. > + > +DPDK provides a Flow Classification library that provides the ability > +to classify an input packet by matching it against a set of Flow rules. > +The implementation supports counting of IPv4 5-tuple packets which > +match a particular Flow rule only. > + > +example/flow_classify is the tool to call flow_classify lib for group > +of packets, just after receiving them or before transmitting them. It > +is intended as a demonstration of the basic components of a DPDK > +forwarding application which uses the Flow Classify library API's. > + > +DPDK technical doc refer to:: > + > + dpdk/doc/guides/sample_app_ug/flow_classify.rst > + dpdk/doc/guides/prog_guide/flow_classify_lib.rst > + > +Prerequisites > +------------- > +2xNICs (2 full duplex optical ports per NIC) Flow Classify should run > +on 2 pair link peer at least. > + > +i40e driver nic: > +Ethernet Controller X710 for 10GbE SFP+ 1572 Ethernet Controller XXV710 > +for 25GbE SFP28 158b Ethernet Controller XL710 for 40GbE QSFP+ 1583 > + > +ixgbe driver nic: > +82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb > + > +HW configuration > +---------------- > +link peer topology:: > + > + Tester DUT > + .-------. .-------. > + | port0 | <------------------> | port0 | > + | port1 | <------------------> | port1 | > + '-------' '-------' > + > +Stream configuration > +-------------------- > +five valid streams(as examples/flow_classify/ipv4_rules_file.txt), > +three invalid streams are the streams beyond config file. > + > +UDP_1:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,UDP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 2.2.2.7 Src Address: 2.2.2.3 > + UDP Header: Src Port: 32 Dest Port: 33 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'udp', src=3D'2.2.2.3', > + dst=3D'2.2.2.7')/UDP(sport=3D32, dport=3D33)/Raw() > + > +UDP_2:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,UDP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 9.9.9.7 Src Address: 9.9.9.3 > + UDP Header: Src Port: 32 Dest Port: 33 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'udp', src=3D'9.9.9.3', > + dst=3D'9.9.9.7')/UDP(sport=3D32, dport=3D33)/Raw() > + > +UDP_invalid:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,UDP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 9.8.7.6 Src Address: 192.168.0.36 > + UDP Header: Src Port: 10 Dest Port: 11 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'udp', src=3D'9.8.7.6', > + dst=3D'192.168.0.36')/UDP(sport=3D10, dport=3D11)/Raw() > + > +TCP_1:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,TCP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 9.9.9.7 Src Address: 9.9.9.3 > + TCP Header: Src Port: 32 Dest Port: 33 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'tcp', src=3D'9.9.9.3', > + dst=3D'9.9.9.7')/TCP(sport=3D32, dport=3D33)/Raw() > + > +TCP_2:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,TCP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 9.9.8.7 Src Address: 9.9.8.3 > + TCP Header: Src Port: 32 Dest Port: 33 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'tcp', src=3D'9.9.8.3', > + dst=3D'9.9.8.7')/TCP(sport=3D32, dport=3D33)/Raw() > + > +TCP_invalid:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4,TCP/IP, Fixed 64. > + IPv4 Header Page: Dest Address: 9.8.7.6 Src Address: 192.168.0.36 > + TCP Header: Src Port: 10 Dest Port: 11 > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'tcp', src=3D'9.8.7.6', > + dst=3D'192.168.0.36')/TCP(sport=3D10, dport=3D11)/Raw() > + > +SCTP_1:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4, None, Fixed 256. > + IPv4 Header Page: Dest Address: 2.3.4.5 Src Address: 6.7.8.9 > + SCTP Header: Src Port: 32 Dest Port: 33 > + Protocol: 132-SCTP > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'sctp', src=3D'6.7.8.9', > + dst=3D'2.3.4.5')/SCTP(sport=3D32, dport=3D33)/Raw() > + > +SCTP_invalid:: > + > + Frame Data/Protocols: Ethernet 2 0800, IPv4, None, Fixed 256. > + IPv4 Header Page: Dest Address: 9.8.7.6 Src Address: 192.168.0.36 > + SCTP Header: Src Port: 10 Dest Port: 11 > + Protocol: 132-SCTP > + > +.. code-block:: console > + > + Ether()/IP (proto=3D'sctp', src=3D'9.8.7.6', > + dst=3D'192.168.0.36')/SCTP(sport=3D10, dport=3D11)/Raw() > + > + > +Compilation: > +------------ > +steps:: > + > + cd $DPDK_PATH > + export RTE_TARGET=3D$DPDK_PATH > + export RTE_SDK=3D`pwd` > + make -C examples/flow_classify > + > +Flow classify bin file under:: > + > + $DPDK_PATH/examples/flow_classify/build/flow_classify > + > +rule config file(default):: > + > + $DPDK_PATH/examples/flow_classify/ipv4_rules_file.txt > + > +Test cases > +---------- > +The idea behind the testing process is to compare packet count sending > +by ixia packet generator with packet count filtered by flow_classify. > +Valid packets should be in flow_classify output and invalid packets shou= ld > be ignored. > +The rules are configured in a txt file. Testing content includes single > +udp/tcp/sctp stream and multiple streams. > + > +Test Case : check valid rule with udp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of valid stream(as UDP_1 or UDP_2 in Stream > +configuration), then check the total received packets in flow_classify's > output message. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(UDP_1, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output contain the following message:: > + > + rule[0] count=3D1 > + or > + rule[1] count=3D1 > + > +Test Case : check invalid rule with udp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of invalid stream(as UDP_invalid in Stream > +configuration), then check flow_classify's output message has no count > +message > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(UDP_invalid, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output has no message as "rule[xxx] count=3Dxxx",= such > as:: > + > + rule[0] count=3D1 > + > +Test Case : check valid rule with tcp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of valid stream(as TCP_1 or TCP_2 in Stream > +configuration), then check the total received packets in flow_classify's > output message. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(TCP_1, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output contain the following message:: > + > + rule[2] count=3D1 > + or > + rule[3] count=3D1 > + > +Test Case : check invalid rule with tcp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of invalid stream(as TCP_invalid in Stream > +configuration), then check flow_classify's output message has no count > message. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(TCP_invalid, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output has no message as "rule[xxx] count=3Dxxx",= such > as:: > + > + rule[2] count=3D1 > + > +Test Case : check valid rule with sctp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of valid stream(as SCTP_1 in Stream configuration), > +then check the total received packets in flow_classify's output message. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(SCTP_1, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output contain the following message:: > + > + rule[4] count=3D1 > + > +Test Case : check invalid rule with sctp stream > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Send 32 packets of invalid stream(as SCTP_invalid in Stream > +configuration), then check flow_classify's output message has no count > message. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send stream by packet generator(e.g. scapy or ixia):: > + > + scapy> sendp(SCTP_invalid, iface=3D'xxxxx', count=3D32) > + > +#. check flow_classify output has no "rule[xxx] count=3Dxxx" message, su= ch as:: > + > + rule[4] count=3D1 > + > +Test Case: check valid/invalid rule with multiple streams > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > +Send multiple streams, 32 packets/each stream type(all stream types in > +Stream configuration), then check if they are filtered/captured by > flow_classify. > + > +steps: > + > +#. boot up flow_classify:: > + > + ./flow_classify -c 4 -n 4 -- --rule_ipv4=3D > + > +#. send multiple stream by packet generator(e.g. scapy or ixia), include > SCTP_1/SCTP_invalid/TCP_invalid/TCP_1/TCP_2/UDP_invalid/UDP_1/UDP_2 > :: > + > + scapy> multiple_stream =3D [SCTP_1, SCTP_invalid, TCP_invalid, TCP_1= , > TCP_2, UDP_invalid, UDP_1, UDP_2] > + scapy> sendp(multiple_stream, iface=3D'xxxx', count=3D32) > + > +#. check flow_classify output only contain the following count message:: > + > + rule[0] count=3D1 > + rule[1] count=3D1 > + rule[2] count=3D1 > + rule[3] count=3D1 > + rule[4] count=3D1 > \ No newline at end of file > -- > 1.9.3