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 1B368A034C; Tue, 18 Aug 2020 04:09:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D117B1C022; Tue, 18 Aug 2020 04:09:00 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 368A81DB9 for ; Tue, 18 Aug 2020 04:08:59 +0200 (CEST) IronPort-SDR: T+8qfeN0dHRuoeXn787TPLNOdymw2nTuXNi/0+eYXgKB86z0VGV76ThmbUGm5JbK8PmYTcUgRs heOFgD+3BvRg== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="155910563" X-IronPort-AV: E=Sophos;i="5.76,325,1592895600"; d="scan'208";a="155910563" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 19:08:58 -0700 IronPort-SDR: pPPzfWdvOcyodFUCJo8UMF9Nf7KDN1YI16KdpGtTUUlVhbELcoezgjN1HDkGWL8kT7R/ZC1TEX 4u2hozAFVoyA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,325,1592895600"; d="scan'208";a="296678898" Received: from fmsmsx601-2.cps.intel.com (HELO fmsmsx601.amr.corp.intel.com) ([10.18.84.211]) by orsmga006.jf.intel.com with ESMTP; 17 Aug 2020 19:08:58 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 19:08:57 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 19:08:57 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Aug 2020 19:08:57 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Aug 2020 19:08:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jotzrqs0LvqF/S0LFIdbtAciVEFN1hhd3IHaJm0l1OiOHq1IR1kDQVPM3rq6NSaN3aoyxY20n6VgHP5qngYdASKGaRw3PikWCSQVLuy89BT8FnaDSShcTIIdPsiHXeU5QKj+jqu5O9BbTPJ6I49Zs8FflvZMfFRyktHUGGUjBDmfs2RSknCFsJ7C0YBFeZDYhPrlZHfiqpMdc3WXIj/2JxAdPmIVm8qBjCap6x5qi79KyNwTzeqtt3wxiwUoXdcgLhKvpZSzaOI2ttVLSdMSvJJXMdpcA7iHzClKCYvavLmgDGr01+SB+IeB7RDvwzDbnmcFtojWvMkMZkU8Xfak1w== 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=PBn+Pno0K/U13bC3rrVIrE00a7sFVOeiTq5eP4fMuws=; b=Ys4RXRwBs2T96BmeNZdB2HHBWwcflztuk17RQhO9YVQcQORfy5RfmXbFdsSnAjCN24bX17Dc2HdlepYByJfCrDvR0be3b4wss/2DKZLWHhA5mNlFR6I3dFjSB4F8hTq8T+6Z3ue9aKfEv6ZM/nmCFRfvdzP9MCU35/i0acLsrziuavo0GKNmZXIKYxmec/GgG3wfY4t+f0xJ/dgsBgxb3/LD2QDKoG/MyfpD0GoANeNWfMEvdHE18XVaUekuliJWMVraC9WxRpi2wj413yWXAclwznco14arBKHcjuvoOg4a8n34tG1kYilZQ25mbLyVomv7H+WluVraRV3LRT/eJg== 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=PBn+Pno0K/U13bC3rrVIrE00a7sFVOeiTq5eP4fMuws=; b=adYt9Js+0YRuN5CODLBzGYFfdBoS9dZVgEBt/Z5rTBqb9TEhHuszNGHev7uvyltazqmS3i4j8EKKCbv4Tlc17YVUriMPrW/Qk3GWIz5qVWa3BbAGYY0wh4q/L50XgsAr/3r4IY8VSyuH5ZNzuXXIi8Ug9gEhF3ctCPty+WlAU30= 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; Tue, 18 Aug 2020 02:08:55 +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 02:08:55 +0000 From: "Lin, Xueqin" To: "Sun, GuinanX" , "dts@dpdk.org" CC: "Sun, GuinanX" Thread-Topic: [dts] [PATCH v2 1/2] test_plans: add cloud_filter_with_l4_port_test_plan.rst Thread-Index: AQHWdHJYk+rHlZYZdEGMy/B2Fczfoak9Hezg Date: Tue, 18 Aug 2020 02:08:55 +0000 Message-ID: References: <20200817055452.68792-1-guinanx.sun@intel.com> <20200817083411.71430-1-guinanx.sun@intel.com> In-Reply-To: <20200817083411.71430-1-guinanx.sun@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGM5MzFmOWItNzE3Zi00ZGZlLWIxZTQtYWFhZjA3NGFkZTVlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTWpEWVNIYlhVVGVvMGpWXC94c0NyMVZhZ1B4Tmg4bDAyOThmYTZPN1FXazZIRWN3dTdJa2lIVm5RMGNMNGtKa1gifQ== x-ctpclassification: CTP_NT 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: 26f946d8-d616-40ce-b0b4-08d8431ba90f 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: rv2OH/U+qjq5gonFWGzuvvTg/Oe1jD7ETuS9TCd3JCBijkxNdmG9G2ovVQlYryv1JXK2zC6c0WQbmLKIJeA76nwfFjdQOD3fqh2vwXLZk+k1oPmFcwol74SOX/8/eYTOLSsovP9nxrIrHey/JNsxqvciXawpgUAKJj3Txq3s6lYDIztiJ78k+dNN/oTkt/M8J0Vp1rxXKGBUC6X0ZFphpIKirul/Je3eb902TpiPLc0Sp/eH6qEartso6SWyRInGv9jPNZx/Bhy3rKgo0c3R3hZsBAmlFjKYk6EgEkFyI/QxfrnEgEEoMKY/AGez5oF8i5gXphH43EfXZ5VUw321foMCazAd3Z7MVjBwElN447uzhcLV0xzDGc86MFe4CkDyrk1nuy4uItS17td+ZNwXBD7GJMgK7lFPVZXSkQjajINF7EqGQVqJ6j+6Rij49vh4RH6mpH8zXeFID4hRHQ8aOA== 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)(136003)(346002)(39860400002)(376002)(366004)(9686003)(30864003)(4326008)(33656002)(478600001)(55016002)(53546011)(107886003)(6506007)(52536014)(64756008)(66946007)(66476007)(66556008)(76116006)(66446008)(19273905006)(8936002)(5660300002)(86362001)(2906002)(83380400001)(316002)(186003)(110136005)(26005)(71200400001)(19627235002)(7696005)(966005)(579004)(563064011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: JSqnZGPldYUlTiWpGPiOJ4AFxOagOyYwFdxPWB2s0igUoo2LB+jgfD44ekqbyD2xJUMlhqjULrpMpnYiWZk/+CS3drPlreYXN/e0Dd2MWFD0AxD4oPTln8+AldcspbiACRzRalTV9+FkjRzyfPUEZBQxhpyVgQckFX/eFCs5mq6l7KwITZ6PgTgeNfnawrXfI/iz7kOaB1MTX5bccRiyO5jO59tIhj3EiZnGtcf7K7Sk5d8Z2FHsjAAsqfQuK1a2wr93fmBt+TDggYfBLkMGjgcs6Yn7cGO1KJwm6Yujwh01Nlgog1Up0ZvVtG/rB6J8u82GtD1fxflOgziN+yFYzOWV8N90ZuSyv8EqhGmM/TgsVlv/PUVcNvdt+PcylQNVaMcg/G26XYX9Zefw+Y9L4Vssy7Kr4+DfJVzma7qU/y30pth1sbbTCQxT+0Au320un/9ZfTdK0JFnGKgU6N027ZeTCKyVrEK9l2sSTgFPIslA8yYSIlfMzNtf5WfvfLpK33YRFb9BZyacnFI88aRnwfoOzboFD2SVecYDGVZykMnRQZp5QAlGpkvL74DsU2JKa7KVsQ33QXNiPZV7GIRn6nwte/FqPufng8W219LkV/voAU0VnRDOmvcCtD8ujlwIhRX3ASOq7p7dsCP8rglp7w== 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: 26f946d8-d616-40ce-b0b4-08d8431ba90f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2020 02:08:55.1381 (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: 6DwTlKEtx0wY/5F7tWuY/dm9bpq37SANic5sw4Djn/oVcv8JRGLTchLqL9aK5b1mIH5XDIQv3q0R5q7zvsVZJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4464 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH v2 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" Verify there are one rule. there are ->there is Best regards, Xueqin > -----Original Message----- > From: dts On Behalf Of Guinan Sun > Sent: Monday, August 17, 2020 4:34 PM > To: dts@dpdk.org > Cc: Sun, GuinanX > Subject: [dts] [PATCH v2 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 > only 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..beef55c > --- /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 are one rule. there are ->there is=20 > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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 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. > + > + 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