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 E2DADA034D; Mon, 17 Aug 2020 08:11:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE30D1C11B; Mon, 17 Aug 2020 08:11:37 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B3E871C11A for ; Mon, 17 Aug 2020 08:11:35 +0200 (CEST) IronPort-SDR: /IxNCRwCoXTG18DszNcdPKwuhdPzhq6ld7RrVIdX1Ym/DtHNtf9WhmnkxccBm0rNipkA8xzNJV pzmEEJKI5ARw== X-IronPort-AV: E=McAfee;i="6000,8403,9715"; a="152289561" X-IronPort-AV: E=Sophos;i="5.76,322,1592895600"; d="scan'208";a="152289561" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2020 23:11:34 -0700 IronPort-SDR: fnyMGOinm8ebInQHcUXG3pYVKgXoXXwVUzym20LHZficJvU+kZRc/4BaP+aUBsRf0J5ALMmaCo GhsSnzqY2fPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,322,1592895600"; d="scan'208";a="336183595" Received: from fmsmsx603-2.cps.intel.com (HELO fmsmsx603.amr.corp.intel.com) ([10.18.84.213]) by orsmga007.jf.intel.com with ESMTP; 16 Aug 2020 23:11:34 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 16 Aug 2020 23:11:33 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 16 Aug 2020 23:11:33 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 16 Aug 2020 23:11:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SqHrrh+4MZmmpjPNIzfTxrCRxiP83TUTLqr7PsaxBKlTFwVBHpmaaBY1sqHj387g8GxEMdnFXgsjyC6xySxo7a0aiyDLW33CVRfwsi888+5MYCy4hsVnBsZENLv7UbStkyNbUJ/xrLA5Vu7uf8cXWHj5aZ2WTOg2NsESt+f12M3M8M6BTm517Hae4zA25ts0Cq9eorDFaQ+pfTo3n5tYmeqVkoouVU2ReS7D0NR7h8SxEWnv7W6z+oUlHALVyVXw1QdrCvHsyF8cGytTyCQSRrWV0OV7U+szNpxjtOdjsjmbdIX+WGFCo1ytCwxvaQ8cPLfmw9QBl7nBaMrlCz6gdw== 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=hfHwWIxwGO1w6z90eODtaf33b6V0VqDJvGcylAeW3u8=; b=oHMGRPGmFk5vLVcr3fJmr/8xXQWurdQEtzwBz572TnOUlAK4RZ9dlbMEqWw2UFoj+ziE5GIKRxcHTXPkVjrNhH5dVs6VJjo2Pj/xORr46mAJpmEzKQQY6viabaKr38QZR3JCOAv0a/8U5Pp6rthU9Gnp3mWOEaix8PO37yFfeD/pkJYUMa0G4UEdP8fxivu1jNCbONLIbk5Cc/D69HHXAF3nW8JgF1x666Rbp5ybdmVWaCjDtKKKdp0+/YKg9xsumYA9kTNHVvXsjf6tTNZ2o65U8K6dZDiRZdOl0AE3SYtiNIl/SxxPTc45gIpZiHKyKWqPnmlxDrd89AC2DIpczA== 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=hfHwWIxwGO1w6z90eODtaf33b6V0VqDJvGcylAeW3u8=; b=GdjIIeljli4kWQpoy5U5bt/K/0SPZfUS/cJ+qSUoJGwKIT5sG6oIrNn+zhfsbSfekpyDrQP99U0lvAsJDxeZnZ4HW0rScH9BWcs7Bf/U3bC3BzKSTDBFT5LlVottJorCAnUZ389DATidc68BUXVORbsXridD6xcU5RdIwMN24wI= Received: from BL0PR11MB3364.namprd11.prod.outlook.com (2603:10b6:208:69::21) by MN2PR11MB4464.namprd11.prod.outlook.com (2603:10b6:208:188::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.22; Mon, 17 Aug 2020 06:11:26 +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.027; Mon, 17 Aug 2020 06:11:26 +0000 From: "Lin, Xueqin" To: "Sun, GuinanX" , "dts@dpdk.org" CC: "Sun, GuinanX" Thread-Topic: [dts] [PATCH v1 1/2] test_plans: add cloud_filter_with_l4_port_test_plan.rst Thread-Index: AQHWdFxbT0gU4HqyaECmDQQCd64AMak70WXQ Date: Mon, 17 Aug 2020 06:11:25 +0000 Message-ID: References: <20200817055452.68792-1-guinanx.sun@intel.com> In-Reply-To: <20200817055452.68792-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.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ada19209-0fdd-46d7-591d-08d842745f9e x-ms-traffictypediagnostic: MN2PR11MB4464: 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:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VE7R95lOYQmdvXzjoBBbAtCRMhZjLQTZt2TEpkeIGq/Nvqv5UJSS/C3vsmhvElXPnQoQPRHvdT+iRgPqIiQK7Bn4JhgVwljkhOhJJdpnhWru7lkW9B0Zhd0n6vIwmNJ5maJi9CkSTK7K2IwWnvogcuWas3twflpIfxItNKB52rOe7WNNfJhuDFNi5mmsv+aIc9tklROdXa4RxC9CTk7Z5vZOd9poQAKBJXKKO1vqxM8R5gbUNh0sJj8xforjXfPVcxUkYNqJkza/bORMnLjdPffJCL92LJDAqxVkxDkvfyBq2YLJfGBFDmEx/vqnOH3Q927syJtMOqRdNxjBdT6XoxIKJ9hD/FPei0PmDCOYMA9Sule9G12nmDczTS2DuYSV7rdHFl6/yu8BqlEwV465/K+0xHyzBhgi6WTIK7Q2gZeE0YgXN3ILcG6Wn4o25rvmzaVPqWkjGDXJsVJmme06bQ== 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)(396003)(346002)(366004)(39860400002)(376002)(136003)(55016002)(33656002)(9686003)(30864003)(107886003)(4326008)(66556008)(66476007)(64756008)(66446008)(2906002)(76116006)(66946007)(110136005)(5660300002)(186003)(6506007)(53546011)(316002)(52536014)(478600001)(8936002)(86362001)(966005)(19273905006)(7696005)(19627235002)(83380400001)(71200400001)(26005)(579004)(559001)(563064011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: RY/ItBDNFz2rr1MMnv+pB3KgbfFZOlH2dGXatDVYHEbu0QMOk96VGeQbC61avc+WnM8Qd2DuoLLKR8I2GH4ggSMehC9NtzG0yUVFCn6nepnA7Cl8luxJBCiommJ2h7qf8TVzX5Xd9eAaORuU7Cd0AaFtfw3PngOIfxSy3m/mnW8DVsf+g1M9VFTjqKc98RXB1OdYqdB9pN127rKWsromwcMjUSmZIA3eEi+hjhiTwx/biXJmut1zVELofIUq/oMAcEEzxUK6nuafSpFmK+kvy3l8UGHEO9/9lzfJn9UaXog3MVPeMwcQHkx4VAZtBMmL7bwIGMOC4BbrcXc/4kFw86LBd8k4PkNYjjFTaVCFd+c869h5t6u2L+Bm14uNIC5LD3N18ul11Hsl5MCvjjtpkby9qRFV5MY0USopSLt7vQkyVUchnQTwrewc+w/z86mCV5vvUrK8JA8BpFFkge2TvvLeWUrY2fvtyc8vXGDgWpOo0Xm1lNUHFJlgOhSxve7RvDpmCWl38D354TBNdl7D4pMp+06Rq2pcVeIUYnR3z/cYPeTKQbPi6DLYknRHXgZ3W6pjo/o9HUHdVEbEYrQksCR6BvrrIk2dVZ+CPSSaTUf3LCSoDviXjfFdS6SbaSjGTctCvazfGO+O1gWjEVmkHA== 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: ada19209-0fdd-46d7-591d-08d842745f9e X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Aug 2020 06:11:25.9028 (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: jAfcdAdck2AlkTKH4xrh7aDuT2YYxePQPEleSBdGG8NhGtA0f4PTW2g/HxC09Xl+MBaW53DBe5W+78aw5uChPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4464 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH v1 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: Monday, August 17, 2020 1:55 PM > To: dts@dpdk.org > Cc: Sun, GuinanX > Subject: [dts] [PATCH v1 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 | 631 ++++++++++++++++++ > 1 file changed, 631 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..9143dae > --- /dev/null > +++ b/test_plans/cloud_filter_with_l4_port_test_plan.rst > @@ -0,0 +1,631 @@ > +.. 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 > + > +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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 3. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 3. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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 > + > + 3. 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 are 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. > + > + 4. 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. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > + 2. 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. > + > + 3. 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. > + > + 4. 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 > + Prerequisites > + > + 1. bind the port to dpdk driver in DUT:: > + > + modprobe vfio-pci > + usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000:81:00.0 > + > + 2. Launch the testpmd:: > + > + ./testpmd -l 0-3 -n 4 -w 81:00.0 --file-prefix=3Dtest -- -i --rx= q=3D16 --txq=3D16 -- > disable-rss > + testpmd> set fwd rxonly > + testpmd> set promisc all off > + testpmd> set verbose 1 > + testpmd> start > + > +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