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 078BAA034C; Tue, 18 Aug 2020 07:07:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC0711C023; Tue, 18 Aug 2020 07:07:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A8D6C1C020 for ; Tue, 18 Aug 2020 07:07:21 +0200 (CEST) IronPort-SDR: yTarFtroNNUgQOHllwfSuBXQYXjRGzjDYTZi7CsSEbaAGEwUgqze49lkGodnVlA6Paigg94jm2 YhWPHfc5PLPQ== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="239666784" X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="239666784" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 22:07:20 -0700 IronPort-SDR: pZMwNqT1m2m3SyeHK0P4FfUaeGd9Q28QbGXv2F48h18+bQqGSnQvrkX2TOEvOGqzFmuhDCxa+W JVbhsrOwVEXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="296712402" Received: from orsmsx604-2.jf.intel.com (HELO ORSMSX604.amr.corp.intel.com) ([10.22.229.84]) by orsmga006.jf.intel.com with ESMTP; 17 Aug 2020 22:07:20 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 17 Aug 2020 22:07:19 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 17 Aug 2020 22:07:19 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 17 Aug 2020 22:07:19 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.45) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Aug 2020 22:07:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f1A/9a2zkZhuimSBoHxqWDhMAxFbuV6BgWK3sG5VlzHTTKIFf/I8cYzdYOx2z0NWTNqFLYWR6PKMfYHgIQDZiqQIySYjBXjGSCMGkhYqH/LTodvnEYcJLrgF5KndMDllETgzX1cFg48IE8mxDzBMMlooaeQdzE2U9LGB/lFDOnGoyJDkfS0SP9Kn6YxVduy8T/BuenIErIvAzVBEDL2jOETk0yU5Z0l60DQyKDn2J0OU8qcs4GbfWl2nW9sCLh3VFr1A+hKpYZ1mQXQkbifFlTZ3g3h6Ms5P1DekJ4Tmf/9nkX8a9HVQe9UeppG13G6h9P6YdBGdY68/Ev3Sn8BFRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PnkInqn9nh4kyYZ69uZSvmJgvVgRAFlMs8AsJ9II7I4=; b=Dp6HTGIXw5etPgGXDLGdkJyXVsIa/SOBcTwHSAdEwUHOLwVlmnRXL5pr14MgQeHnmrtkO1Qs8++ycHdWpIs/e3NujFlQTYuGBY77Tbf7a8Qsv97JONXZRxCVqg/B9JXkdnjDG4+29uo3jojX80tv34qZwu9wn0J13n1q+Um/GKjycp9um4aqxhGOOpOrAsN45pMQwQOyD4Whn5Uk8l3a3mweyvCFRJCN0twhdYKAguUpPObmyL4X6NpPKGUkMS7HlfOyj9deSMYahJakw6ovuVMMVswr2mR6zkuwrH4hSvbfcZaVUVHVCSljsB7ukkOXn+dSEQlkFVWe9J6HAgQTcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PnkInqn9nh4kyYZ69uZSvmJgvVgRAFlMs8AsJ9II7I4=; b=I76ORvu+WxwsCDdOtNjlgUESxgCp6f4P7OAVMDkwQ0JNRrdIM2kae5ta/F0vvlVKChvDxpksZotJvvzJsGE7iPGYJJanj5B7CWl8JFHrGAGEn7P3GtQuNwhziRrXHAmTewpaXjhE7M0NgPxA4Y3MARKO1nI0QWP9nldGP04IWHQ= Received: from BL0PR11MB3364.namprd11.prod.outlook.com (2603:10b6:208:69::21) by BL0PR11MB3473.namprd11.prod.outlook.com (2603:10b6:208:6e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Tue, 18 Aug 2020 05:07:15 +0000 Received: from BL0PR11MB3364.namprd11.prod.outlook.com ([fe80::34a2:b1af:211:5a26]) by BL0PR11MB3364.namprd11.prod.outlook.com ([fe80::34a2:b1af:211:5a26%7]) with mapi id 15.20.3283.028; Tue, 18 Aug 2020 05:07:15 +0000 From: "Lin, Xueqin" To: "Sun, GuinanX" , "dts@dpdk.org" CC: "Sun, GuinanX" Thread-Topic: [dts] [PATCH v3 1/2] test_plans: add cloud_filter_with_l4_port_test_plan.rst Thread-Index: AQHWdQ/Ri/01A5G8XEq4RC9bK1GhZ6k9UHng Date: Tue, 18 Aug 2020 05:07:15 +0000 Message-ID: References: <20200817055452.68792-1-guinanx.sun@intel.com> <20200818030736.72683-1-guinanx.sun@intel.com> In-Reply-To: <20200818030736.72683-1-guinanx.sun@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d8c3d345-9c57-4455-e3b6-08d8433492d0 x-ms-traffictypediagnostic: BL0PR11MB3473: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: z8YHQoTMNZQ1wveZ0p7M51sNFoMyScJAlyH48ULZSJSZL+KVgpTADa/QvAyZ1iX02jW2ZrmWyuUPbpjJyOBEVDTgc1Ufh/13yuVsvSyoHQ0jfLnxDvVhPW8zG4NiX52uWBB7+zwya83nlP14Q6P59Z5dWFbwQAvCNzaCcdAoK6KEe/KOFGKsB6JrYR/Ds6FT0pqjZFo21QcbqIVuHps3hW1Av38mTV1gUgPxQ8i2QrFOJodVSrz5tWTDQX93VUP9o+0sP6vGWPBaKCe/XxbDxRbWkaIs1xAFGRb0u+ras8q2ySeiroiJdkdlM6ITNDakl9VgKddG8lVuFYgvuJrY9d/ughXRFIKSNdFvwR6X6398JtFOCd0c2oBU+/vTba5N/S6NK77LMRn6v5Y5OSGIxtk6p6zuiyOA6X+i6ap/U8+uAsvWl1cMBoowY/nwl9s1/oTMK/5gSon5tpAPWUKrIA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3364.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(396003)(376002)(136003)(39860400002)(19627235002)(53546011)(66446008)(26005)(19273905006)(107886003)(66556008)(66476007)(76116006)(966005)(6506007)(64756008)(83380400001)(66946007)(9686003)(71200400001)(86362001)(186003)(55016002)(316002)(8936002)(4326008)(52536014)(478600001)(7696005)(2906002)(33656002)(30864003)(110136005)(5660300002)(579004)(563064011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: O78TCyyB3GsMszDyJXZpZdWGW2UMao0DLC8G1LHXc8M0ByZz4YeaVWadgH7RWFAjWj5RDN38RG29KRWQ0HTzyCuzETzTJkeDXiA1W5wi8K2V2OkLjfotFAogPVNmyRSye9LCWriGOC4whmvAkJWK0PUBKdS3cZkDKZ+v1yEpQQ8O3mvVsLFZcYtEZkXuM+h9KSbI0EBnGvSJSI3o1VNK5J1tFaM1QmBVzLXn5kH2/Fy5Audz0xwiOwAW+7HnVcTZMmGUblb0YV/7f+ItIHs5xOL9KBYKoPVOkOIapdcTKhlYbW0xIksrxFU8qeS7MfpHZk7hxYDpBRFAGwApxxHaQihNci81FX/rgG/ODgMYToSPHZceyS6nDo1QWhSIqt8475S5jrSi9TCmg14gSh19uWyiee9TfWY3dg+6WbEyUinflgaj8VeyXSCK5wiLTghH2kskpszJmF6sycH5jlv1h/EjIZzu4+a1oicAbfEqBBvMqtudZyKCU+kGFvVgDDPc2qEsbqy944NufG74fkpZ3r5c9ES01i1IIN/iq5XKwweOQTX2LwVAuJFfHtdVejmaOVfwDrS3CBa9TL20Zkugh1kiq7pWYqZG2pPYPoyQnjq3uQeTyOrs6J2Jemt2CUlld6wgzKGmjtUKhUxJ90eP0Q== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3364.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8c3d345-9c57-4455-e3b6-08d8433492d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2020 05:07:15.1849 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QTFw0IueDUamNyrGzGChNvqFfDNyuLrfeVeoTUOSVqRak4mpG6G+LwGRmbczUKODEkzv5yhxlAS7NKt3ok6eRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3473 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH v3 1/2] test_plans: add cloud_filter_with_l4_port_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" Acked-by: Xueqin Lin > -----Original Message----- > From: dts On Behalf Of Guinan Sun > Sent: Tuesday, August 18, 2020 11:08 AM > To: dts@dpdk.org > Cc: Sun, GuinanX > Subject: [dts] [PATCH v3 1/2] test_plans: add > cloud_filter_with_l4_port_test_plan.rst >=20 > Enables the cloud filter for IPv4_UDP/IPv4_TCP/IPv4_SCTP with SRC port on= ly > or DST port only. > This supports different filter types for the same packet type. > E.g. one IPv4_UDP rules with SRC port only and another IPv4_UDP rule with > DST port only. >=20 > Signed-off-by: Guinan Sun > --- > .../cloud_filter_with_l4_port_test_plan.rst | 520 ++++++++++++++++++ > 1 file changed, 520 insertions(+) > create mode 100644 test_plans/cloud_filter_with_l4_port_test_plan.rst >=20 > diff --git a/test_plans/cloud_filter_with_l4_port_test_plan.rst > b/test_plans/cloud_filter_with_l4_port_test_plan.rst > new file mode 100644 > index 0000000..50987f3 > --- /dev/null > +++ b/test_plans/cloud_filter_with_l4_port_test_plan.rst > @@ -0,0 +1,520 @@ > +.. Copyright (c) <2020>, 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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Cloud filter with l4 port test plan > +=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 > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + Fortville > + > +2. software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. bind the pf to dpdk driver:: > + > + ./usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000:81:00.0 > + > +4.Launch the testpmd:: > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rxq=3D= 16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > +Test Case 1: ipv4-udp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a source port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 2: ipv4-udp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 3: ipv4-tcp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / tcp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. testpmd> flow create 0 ingress pattern eth / ipv4 / tcp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 4: ipv4-tcp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / tcp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 5: ipv4-sctp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / sctp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a source port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / sctp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 6: ipv4-sctp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv4 / sctp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / sctp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 7: ipv6-udp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / udp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a source port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv6 / udp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 8: ipv6-udp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / udp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv6 / udp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/UDP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 9: ipv6-tcp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / tcp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. testpmd> flow create 0 ingress pattern eth / ipv6 / tcp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 10: ipv6-tcp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / tcp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv6 / tcp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/TCP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 11: ipv6-sctp_sport only > +=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 > + > + 1. validate a source port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / sctp src > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a source port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv6 / sctp src is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(sport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(sport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(sport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 12: ipv6-sctp_dport only > +=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 > + > + 1. validate a destination port rule:: > + testpmd> flow validate 0 ingress pattern eth / ipv6 / sctp dst > + is 156 / end actions pf / queue index 1 / end > + > + Verify the command can validate:: > + Flow rule validated > + > + 2. create a destination port rule:: > + testpmd> flow create 0 ingress pattern eth / ipv6 / sctp dst is > + 156 / end actions pf / queue index 1 / end > + > + testpmd> flow list 0 > + > + Verify there is one rule. > + > + send matched packets:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(dport=3D156)/Raw('x' * 80) > + > + Verify packets will be received in queue 1. > + > + send no matched packet:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(dport=3D111)/Raw('x' * 80) > + > + Verify packets will not be received in queue 1. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IPv6()/SCTP(dport=3D156)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 13: multi-rule > +=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=3D=3D=3D > + > + 1. create multi-rule with different input set rules:: > + creat rules:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src = is 11 / end > actions pf / queue index 1 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp src = is 22 / end > actions pf / queue index 2 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / sctp src= is 33 / end > actions pf / queue index 3 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst = is 44 / end > actions pf / queue index 4 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp dst = is 55 / end > actions pf / queue index 5 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / sctp > + dst is 66 / end actions pf / queue index 6 / end > + > + send packets:: > + p =3D Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(sport=3D11)/= Raw('x' * 80) > + p =3D Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(sport=3D22)/= Raw('x' * 80) > + p =3D Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(sport=3D33)= /Raw('x' * 80) > + p =3D Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(dport=3D44)/= Raw('x' * 80) > + p =3D Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(dport=3D55)/= Raw('x' * 80) > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/SCTP(dport=3D66)/Raw('x' * 80) > + > + Verify each packet can match the right queue. > + > + 2. destroy the rule:: > + testpmd> flow destroy 0 rule 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/UDP(sport=3D11)/Raw('x' * 80) > + > + packets should be in queue 0. > + > + 3. flush the rule:: > + testpmd> flow flush 0 > + > + send packets match rule 0:: > + p =3D > + Ether(dst=3D"3C:FD:FE:CF:31:D8")/IP()/TCP(sport=3D22)/Raw('x' * 80) > + > + packets should be in queue 0. > + > +Test Case 3: NEGATIVE_TEST > +=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 > + > +1. rules can not create > + > + 1) unsupported rules:: > + create rules:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src > + is 156 dst is 156 / end actions pf / queue index 1 / end > + > + Verify rules can not create. > + > + 2) conflicted rules:: > + create one rule:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src > + is 156 / end actions pf / queue index 1 / end > + > + create conflicted rules:: > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src > + is 156 / end actions pf / queue index 2 / end > + > + Verify rules can not create. > \ No newline at end of file > -- > 2.17.1