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 16DBFA0521; Mon, 3 Aug 2020 10:31:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5C1D2C12; Mon, 3 Aug 2020 10:31:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8F5272BE1 for ; Mon, 3 Aug 2020 10:31:56 +0200 (CEST) IronPort-SDR: bQWgFhQdGEqn2ZmQydoVBTdfMRb9kObswDCZQ9x+2ffFFbPEWe/PA1iUla+accOTOILsxG/INh bhMmi0h0Y7Eg== X-IronPort-AV: E=McAfee;i="6000,8403,9701"; a="140014685" X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="140014685" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 01:31:55 -0700 IronPort-SDR: Gz11581Sh96EjpUCexdD6urONEBA7hXQDb8C6ESmrlrdSt8t55+ZUvdKyba4LDtXv9YrwhEYlQ EFVg/fvjuu8w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="291972246" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP; 03 Aug 2020 01:31:55 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 3 Aug 2020 01:31:54 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx602.amr.corp.intel.com (10.22.229.15) 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, 3 Aug 2020 01:31:54 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.51) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 3 Aug 2020 01:31:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BcvKYonMp2cMb1w7DpdMF/0FEQi5F4YkAKBFCtkLKuX6XErQisOTS95ZkY8tqhTAUmB8iXkJDpbN961B40Q3hmHyCRpjA4wiBZ1kpK1n9pvXpw9FHGPctSMUWjkyxQOhav8+27U6b13FAiv+AHNLcV0s4BSinrrcDk3YmRH+G5aJJX4Z8FWEb+ifJSdj48pkAaA3SbL0LzFso7CJpmzLtsVTi59o2hgjDlvuv4U8iJpQpwXQp9DNXTeBLn5Z1VcAxrXHo0G6pPWzOjrn/oCaW+cy6LI+abLlE/L4phi1oPfdA/YYteD4HBSouYv+XD8eZyl0jfkxl9hoNVeIcb5vRQ== 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=rjC/Ne4ibjGwEcHMi2ursCsKPYATjXRl0nyAMgOy4MM=; b=Uzz00dhlEc2xdCrygZM/qHYiO/sp01kXvW6H/0QA3BHgqYqXvi1T3RC+2IJK4UG2nF7sxh0HcCqsEH782DPoiGi27ZjMizxjwLlGuVC/K91kbT1kHnkf6BSe1BcBJk92syh42Z4JFTAbmF6FXqj8R2ndOA34uYpVUtVxbSxQZspWR+Hu7zMWCdCUaNn52fDHNFWGKwOC/EDut8cPVzsjHlHSA4+yTLuKuRDutWQds5GkeCcL9/k4gY28xlwUSgYqXESymQc/se7VqLdNQRRki9X2YQScQscVoC8V/lW2dNQurjaLnU6qFBzmeR0WUEVlHDvwgb/6TvjRqoaTkchhwA== 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=rjC/Ne4ibjGwEcHMi2ursCsKPYATjXRl0nyAMgOy4MM=; b=wFA2PePuLKNi2v0xX3DCRi/b8GFpSSCnlM4LUD2p4bqxz3ax173gmqfxxfKy9tT0s7tGND1PZ5JZgUlUMTG6jJCJvK/ozLVYUsYPFzdueRzZg/B3J5FEenjOncUEvvrNiJAjehYWg1dopmkWL+PdYVQrgel4ArByG4kUgBJZQFY= Received: from BY5PR11MB3893.namprd11.prod.outlook.com (2603:10b6:a03:183::26) by BYAPR11MB2536.namprd11.prod.outlook.com (2603:10b6:a02:c4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.21; Mon, 3 Aug 2020 08:31:51 +0000 Received: from BY5PR11MB3893.namprd11.prod.outlook.com ([fe80::c85c:ec78:c650:6ac9]) by BY5PR11MB3893.namprd11.prod.outlook.com ([fe80::c85c:ec78:c650:6ac9%3]) with mapi id 15.20.3239.021; Mon, 3 Aug 2020 08:31:51 +0000 From: "Peng, Yuan" To: "Chen, BoX C" , "dts@dpdk.org" CC: "Chen, BoX C" Thread-Topic: [dts] [PATCH V2] tests/iavf_fdir: Adaptive-dpdk-RSS-algorithm-update Thread-Index: AQHWZYM4Vy0MAir49kefUX6vDKFbv6kmFesA Date: Mon, 3 Aug 2020 08:31:51 +0000 Message-ID: References: <20200729082224.16609-1-box.c.chen@intel.com> In-Reply-To: <20200729082224.16609-1-box.c.chen@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-product: dlpe-windows dlp-reaction: no-action 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.198.147.207] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0ae4475d-7991-4e6c-0da0-08d83787abf8 x-ms-traffictypediagnostic: BYAPR11MB2536: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:359; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: f9fRUN8qi9EGLsbBEJ+WV7C9A66nbqTKHn16HJlX9KKou9RSeBEPyxWG7zpKI+x5LOypvz48qRVMFEDAzdnviDa7r/Fq/TdyZCHCh52fOwvNYQCPtv0FKZcJVYgh3YV1JW0PfNHWfvDs8tQ5p19sMXzahVvxRpHnX2LXhWiHLbteqotjDdYiWHhpuhN4H4e0l3GDWGP7ZDfu2VpYjLKWzcmOssdXKCVOWsBKlWAwwNWSSyMYiEwq5lXjnY+XS3vBBQMsLOP4MaR/4mCgQ7vfEvbOQypaGipkOYToxOmX+4RC5bh6NHJuEZQCMSDb8NRdDT5RJks1CfP1aKJ2MTpECQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3893.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(366004)(136003)(346002)(39860400002)(396003)(71200400001)(110136005)(66446008)(186003)(76116006)(66476007)(64756008)(66946007)(30864003)(107886003)(8676002)(316002)(15650500001)(8936002)(66556008)(4326008)(33656002)(26005)(6506007)(2906002)(5660300002)(83380400001)(55016002)(478600001)(9686003)(7696005)(53546011)(52536014)(86362001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: x9Y6cMmxEDR8yN93Vyhv21tbLBORzDP7XJcq2/jYvkFJkOtWlptR4JSThLsqpkgAEHc0EqMC3v9UWodVFyHjHW269yUf9T/chgOsgkmd00os/51f9/AAqHKKR1PXUT6zLW7aG2L1ydKz/ictVXGCBvqz06SvNxDnkH0TIyxIuIMEdKOVU/aw9lVktYVzrUrZXfI8e24QfpNkDQ5B+scbLTFp/EJBqWKFI1itaVEsJMmtaWvtyrjJoaftKgNdCZTFTA0eJ55CrywCd4rdULcaf/PQvWvIY7MOoEI6aGTk38gs1nwX2YD4G2e3Z30X2FCHisB6+uWy0nigGeCG4051H9ns0lSyeJmiZJvxElDGgkrhAss0hayscFb+r5bEAoW++rm56dyW2EjvrmT4Kmw2Z+KZN965vBhsJx8U3y5V2D8F2f4VUrcUVOuG3CNKrha7rwzbON2fNB7Bvw36jD/AunyNPOUVgjqjJr8YVfS5z+HP6ZnMbZYuNhWorjelLHZjjZrOpYgApcG/KRoFz5eLEd2xdLdcXV7AV4rOBI/fNq2qawO3wXUZRW56SMNpd46vl8m9VCKeOrqJQqt1k9gA27X405NfRm61z+Sq8BisuATkCH6Id0zVph6hnVC9aUQxWTNK4gCsXsqCIsLbklRxow== 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: BY5PR11MB3893.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ae4475d-7991-4e6c-0da0-08d83787abf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2020 08:31:51.5839 (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: yvBBEjhEQQbra5KsULWpvpGcgQh9OG/KcugD5qyDJU8mqjEB/VIRBskFkvPF3rY5unuwmZZr9cZ3CQlLQFUiDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2536 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V2] tests/iavf_fdir: Adaptive-dpdk-RSS-algorithm-update 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 Peng, Yuan -----Original Message----- From: dts On Behalf Of ChenBo Sent: Wednesday, July 29, 2020 4:22 PM To: dts@dpdk.org Cc: Chen, BoX C Subject: [dts] [PATCH V2] tests/iavf_fdir: Adaptive-dpdk-RSS-algorithm-upda= te According to DPDK-22058, adaptive dpdk RSS algorithm update merge comment Signed-off-by: ChenBo --- tests/TestSuite_iavf_fdir.py | 111 +++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 49 deletions(-) diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py in= dex f2004c6..2e02006 100644 --- a/tests/TestSuite_iavf_fdir.py +++ b/tests/TestSuite_iavf_fdir.py @@ -750,9 +750,9 @@ tv_mac_ipv6_pay_mark =3D { =20 tv_mac_ipv6_udp_queue_index =3D { "name": "test_mac_ipv6_udp_queue_index", - "rule": "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:222= 2:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 = dst is 23 / end actions queue index 1 / end", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is=20 + CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is=20 + 1 / udp src is 22 dst is 23 / end actions queue index 2 / end", "scapy_str": MAC_IPV6_UDP, - "check_param": {"port_id": 0, "queue": 1} + "check_param": {"port_id": 0, "queue": 2} } =20 tv_mac_ipv6_udp_queue_group =3D { @@ -792,9 +792,9 @@ tv_mac_ipv6_udp_mark =3D { =20 tv_mac_ipv6_tcp_queue_index =3D { "name": "test_mac_ipv6_tcp_queue_index", - "rule": "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:222= 2:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 = dst is 23 / end actions queue index 1 / mark / end", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is=20 + CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is=20 + 1 / tcp src is 22 dst is 23 / end actions queue index 2 / mark / end", "scapy_str": MAC_IPV6_TCP, - "check_param": {"port_id": 0, "queue": 1, "mark_id": 0} + "check_param": {"port_id": 0, "queue": 2, "mark_id": 0} } =20 tv_mac_ipv6_tcp_queue_group =3D { @@ -1298,9 +1298,6 @@ class TestIAVFFdir(TestCase): self.pkt =3D Packet() self.pmd_output =3D PmdOutput(self.dut) =20 - self.re_load_ice_driver() - self.setup_2pf_4vf_env() - self.src_file_dir =3D 'dep/' self.dut_file_dir =3D '/tmp/' self.cvlq_num =3D CVL_TXQ_RXQ_NUMBER @@ -1390,8 +1387,8 @@ class T= estIAVFFdir(TestCase): self.dut.send_expect("rmmod ice", "# ", 40) ice_driver_file_location =3D self.suite_config["ice_driver_file_lo= cation"] self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ") - self.dut.send_expect("ifconfig %s up" % self.dut_ports[0], "# ", 1= 5) - self.dut.send_expect("ifconfig %s up" % self.dut_ports[1], "# ", 1= 5) + self.dut.send_expect("ifconfig %s up" % self.pf0_intf, "# ", 15) + self.dut.send_expect("ifconfig %s up" % self.pf1_intf, "# ",=20 + 15) =20 def config_testpmd(self): self.pmd_output.execute_cmd("set fwd rxonly") @@ -2135,8 +2132,8 @= @ class TestIAVFFdir(TestCase): =20 rules =3D [ "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 = dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 = end / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.22 = dst is 192.168.0.23 / udp src is 22 dst is 23 / end actions queue index 5 /= mark / end", - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.22 = dst is 192.168.0.23 / udp src is 22 dst is 23 / end actions queue index 5 /= mark id 1 / end", + "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.22 = dst is 192.168.0.23 / udp src is 22 dst is 23 / end actions queue index 6 /= mark / end", + "flow create 0 ingress pattern eth / ipv4 src is=20 + 192.168.0.22 dst is 192.168.0.23 / udp src is 22 dst is 23 / end=20 + actions queue index 6 / mark id 1 / end", "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.22 = dst is 192.168.0.23 tos is 4 / tcp src is 22 dst is 23 / end actions drop /= end"] pkts =3D { "matched": [ @@ -2200,14 +2197,14 @@ class TestIAVFFdir(TestCase): out_vf00 =3D self.send_pkts_getouput(pkts["matched"][0]) rfc.check_iavf_fdir_mark(out_vf00, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": [2, 3]}, stats=3DTrue) out_vf01 =3D self.send_pkts_getouput(pkts["matched"][1]) - rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1, check_param=3D{"po= rt_id": 1, "queue": 5, "mark_id": 0}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "queue": 6, "mark_id": 0}, stats=3DTrue) =20 self.send_packets(pkts["matched"][2], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) out_pkt =3D self.session_secondary.send_expect("stop", "testpmd> "= ) out_vf10 =3D out_info + out_pkt self.session_secondary.send_expect("start", "testpmd> ") - rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": 5, "mark_id": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "queue": 6, "mark_id": 1}, stats=3DTrue) =20 self.send_packets(pkts["matched"][3], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) @@ -2220,14 +2217,14 @@ class TestIAVFFdir(TestCase): out_vf00 =3D self.send_pkts_getouput(pkts["mismatched"][0]) rfc.check_iavf_fdir_mark(out_vf00, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": [2, 3]}, stats=3DFalse) out_vf01 =3D self.send_pkts_getouput(pkts["mismatched"][1]) - rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1, check_param=3D{"po= rt_id": 1, "queue": 5, "mark_id": 0}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "queue": 6, "mark_id": 0}, stats=3DFalse) =20 self.send_packets(pkts["mismatched"][2], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) out_pkt =3D self.session_secondary.send_expect("stop", "testpmd> "= ) out_vf10 =3D out_info + out_pkt self.session_secondary.send_expect("start", "testpmd> ") - rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": 5, "mark_id": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "queue": 6, "mark_id": 1}, stats=3DFalse) =20 self.send_packets(pkts["mismatched"][3], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) @@ -2261,14 +2258,14 @@ class TestIAVFFdir(TestCase): out_vf00 =3D self.send_pkts_getouput(pkts["matched"][0]) rfc.check_iavf_fdir_mark(out_vf00, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": [2, 3]}, stats=3DFalse) out_vf01 =3D self.send_pkts_getouput(pkts["matched"][1]) - rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1, check_param=3D{"po= rt_id": 1, "queue": 5, "mark_id": 0}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out_vf01, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "queue": 6, "mark_id": 0}, stats=3DFalse) =20 self.send_packets(pkts["matched"][2], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) out_pkt =3D self.session_secondary.send_expect("stop", "testpmd> "= ) out_vf10 =3D out_info + out_pkt self.session_secondary.send_expect("start", "testpmd> ") - rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1, check_param=3D{"po= rt_id": 0, "queue": 5, "mark_id": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out_vf10, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "queue": 6, "mark_id": 1}, stats=3DFalse) =20 self.send_packets(pkts["matched"][3], pf_id=3D1) out_info =3D self.session_secondary.get_session_before(timeout=3D2= ) @@ -2609,19 +2606,27 @@ class TestIAVFFdir(TestCase): profile 0 and profile 1 are default profile for specific packet. design case with 2*100G card, so only 110 profiles can be used for= vf. """ + nex_cnt =3D 0 self.destroy_env() self.setup_npf_nvf_env(pf_num=3D1,vf_num=3D16) - self.dut.send_expect('ip link set %s vf 10 mac 00:11:22:33:44:55' = % self.pf0_intf, '#') + + if len(self.dut_ports) =3D=3D 4: + nex_cnt =3D 94 // 8 + elif len(self.dut_ports) =3D=3D 2: + nex_cnt =3D 110 // 8 + else: + self.verify(False, 'The number of ports is not supported') + + self.dut.send_expect("ip link set {} vf {} mac=20 + 00:11:22:33:44:55".format(self.pf0_intf, nex_cnt), '#') command =3D "./%s/app/testpmd -c f -n 6 -- -i %s" % (self.dut.targ= et, "--rxq=3D4 --txq=3D4") self.dut.send_expect(command, "testpmd> ", 360) self.config_testpmd() - for port_id in range(11): + + for port_id in range(nex_cnt): rules =3D [ - "flow create %d ingress pattern eth / ipv4 proto is 255 / = end actions queue index 1 / mark / end" % port_id, "flow create %d ingress pattern eth / ipv4 src is 192.168.= 0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end" % port_id, "flow create %d ingress pattern eth / ipv4 src is 192.168.= 0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end" % port_id, "flow create %d ingress pattern eth / ipv4 src is 192.168.= 0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue ind= ex 1 / mark / end" % port_id, - "flow create %d ingress pattern eth / ipv6 proto is 0 / en= d actions mark / rss / end" % port_id, "flow create %d ingress pattern eth / ipv6 dst is CDCD:910= A:2222:5498:8475:1111:3900:2020 src is 2001::2 / udp src is 22 dst is 23 / = end actions queue index 1 / mark / end" % port_id, "flow create %d ingress pattern eth / ipv6 dst is CDCD:910= A:2222:5498:8475:1111:3900:2020 src is 2001::2 / tcp src is 22 dst is 23 / = end actions queue index 1 / mark / end" % port_id, "flow create %d ingress pattern eth / ipv6 dst is CDCD:910= A:2222:5498:8475:1111:3900:2020 src is 2001::2 / sctp src is 22 dst is 23 /= end actions queue index 1 / mark / end" % port_id, @@ -2629,17 +2634,25 @@= class TestIAVFFdir(TestCase): "flow create %d ingress pattern eth / ipv4 / udp / pfcp s_= field is 0 / end actions queue index 2 / end" % port_id] self.create_fdir_rule(rules, check_stats=3DTrue) =20 - rule =3D "flow create 11 ingress pattern eth / ipv4 src is 192.168= .0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue ind= ex 1 / mark / end" + rules =3D [ + "flow create {} ingress pattern eth / ipv4 src is 192.168.0.20= dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 = / mark / end".format(nex_cnt), + "flow create {} ingress pattern eth / ipv4 src is 192.168.0.20= dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 = / mark / end".format(nex_cnt), + "flow create {} ingress pattern eth / ipv4 src is 192.168.0.20= dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 1= / mark / end".format(nex_cnt), + "flow create {} ingress pattern eth / ipv6 dst is CDCD:910A:22= 22:5498:8475:1111:3900:2020 src is 2001::2 / udp src is 22 dst is 23 / end = actions queue index 1 / mark / end".format(nex_cnt), + "flow create {} ingress pattern eth / ipv6 dst is CDCD:910A:22= 22:5498:8475:1111:3900:2020 src is 2001::2 / tcp src is 22 dst is 23 / end = actions queue index 1 / mark / end".format(nex_cnt), + "flow create {} ingress pattern eth / ipv6 dst is CDCD:910A:22= 22:5498:8475:1111:3900:2020 src is 2001::2 / sctp src is 22 dst is 23 / end= actions queue index 1 / mark / end".format(nex_cnt)] + self.create_fdir_rule(rules, check_stats=3DTrue) + + rule =3D "flow create {} ingress pattern eth type is 0x8863 / end= =20 + actions queue index 1 / mark id 1 / end".format(nex_cnt) self.create_fdir_rule(rule, check_stats=3DFalse) - self.check_fdir_rule(port_id=3D11, stats=3DFalse) pkt =3D 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",= dst=3D"192.168.0.21")/UDP(sport=3D22, dport=3D23)/ Raw("x" * 80)' out =3D self.send_pkts_getouput(pkts=3Dpkt) - rfc.check_iavf_fdir_mark(out, pkt_num=3D1, check_param=3D{"port_id= ": 10, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out, pkt_num=3D1,=20 + check_param=3D{"port_id": nex_cnt, "mark_id": 0, "queue": 1},=20 + stats=3DTrue) =20 - self.dut.send_expect("flow flush 10", "testpmd> ") - self.check_fdir_rule(port_id=3D10, stats=3DFalse) + self.dut.send_expect("flow flush {}".format(nex_cnt), "testpmd> ") + self.check_fdir_rule(port_id=3D(nex_cnt), stats=3DFalse) out =3D self.send_pkts_getouput(pkts=3Dpkt) - rfc.check_iavf_fdir_mark(out, pkt_num=3D1, check_param=3D{"port_id= ": 10, "mark_id": 0, "queue": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out, pkt_num=3D1,=20 + check_param=3D{"port_id": nex_cnt, "mark_id": 0, "queue": 1},=20 + stats=3DFalse) =20 self.create_fdir_rule(rule, check_stats=3DFalse) =20 @@ -2665,10 +2678,10 @@ class TestIAVFFdir(TestCase): add/delete rules 14336 times on 1 vf """ rules =3D [ - "flow create 0 ingress pattern eth / ipv4 proto is 255 / end a= ctions queue index 1 / mark / end", + "flow create 0 ingress pattern eth / ipv4 src is=20 + 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end=20 + actions queue index 6 / mark / end", "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 = dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 = end / mark id 1 / end"] pkts =3D [ - 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst= =3D"192.168.0.21", proto=3D255)/Raw("x" * 80)', + =20 + 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.168.= 0.2 + 1")/UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst= =3D"192.168.0.21")/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)'] self.dut.kill_all() src_file =3D 'add_delete_rules_1vf' @@ -2690,7 +2703,7 @@ class TestIAVFFdir(TestCase): self.check_fdir_rule(port_id=3D0, stats=3DFalse) self.create_fdir_rule(rules, check_stats=3DTrue) out_0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) - rfc.check_iavf_fdir_mark(out_0, pkt_num=3D1, check_param=3D{"port_= id": 0, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out_0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DTrue) out_1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) rfc.check_iavf_fdir_mark(out_1, pkt_num=3D1, check_param=3D{"port_= id": 0, "mark_id": 1, "queue": [2, 3]}, stats=3DTrue) =20 @@ -2841,16 +2854,16 @@ class TestIAVFFdir(TestCase): relaunch testpmd, create same rules, can take effect. """ rules =3D [ - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end"] + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 6 / mark / end", + "flow create 1 ingress pattern eth / ipv4 src is=20 + 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end=20 + actions queue index 6 / mark / end"] pkts =3D [ 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.0",dst= =3D"192.1.0.0", tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', 'Ether(dst=3D"00:11:22:33:44:66")/IP(src=3D"192.168.0.0",dst= =3D"192.1.0.0", tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)'] rule_li =3D self.create_fdir_rule(rules, check_stats=3DTrue) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) # reset vf self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop 0", "testpmd> ") @@ -2863,22 +2876= ,22 @@ class TestIAVFFdir(TestCase): out0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "passthru": 1}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) # delete the rules self.dut.send_expect("flow destroy 0 rule 0", "Invalid flow destro= y") self.destroy_fdir_rule(rule_id=3D'0', port_id=3D1) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DFalse) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DFalse) # relaunch testpmd, and create the rules, check matched packets. self.dut.send_expect("quit", "# ") self.launch_testpmd() self.create_fdir_rule(rules, check_stats=3DTrue) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) =20 def test_stress_pf_reset_vf_add_new_rule(self): """ @@ -2939,17 +2952,17 @@ class TestIAVFFdir(TestCase): """ self.session_secondary =3D self.dut.new_session() rules =3D [ - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 1 / mark / end"] + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 d= st is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue inde= x 6 / mark / end", + "flow create 1 ingress pattern eth / ipv4 src is=20 + 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end=20 + actions queue index 6 / mark / end"] pkts =3D [ 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.0",dst= =3D"192.1.0.0", tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', 'Ether(dst=3D"00:11:22:33:44:66")/IP(src=3D"192.168.0.0",dst= =3D"192.1.0.0", tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', 'Ether(dst=3D"00:11:22:33:44:56")/IP(src=3D"192.168.0.0",dst= =3D"192.1.0.0", tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw("x" * 80)'] self.create_fdir_rule(rules, check_stats=3DTrue) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[0]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) =20 self.session_secondary.send_expect("ip link set %s vf 0 mac 00:11:= 22:33:44:56" % self.pf0_intf, "# ") out =3D self.dut.session.get_session_before(timeout=3D2) @@ -2962,23 +2975,23 @@ class TestIAVFFdir(TestCase): out0 =3D self.send_pkts_getouput(pkts=3Dpkts[2]) rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "passthru": 1}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) # delete the rules self.dut.send_expect("flow destroy 0 rule 0", "Invalid flow destro= y") self.destroy_fdir_rule(rule_id=3D'0', port_id=3D1) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[2]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DFalse) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DFalse) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DFalse) =20 # relaunch testpmd, and create the rules, check matched packets. self.dut.send_expect("quit", "# ") self.launch_testpmd() self.create_fdir_rule(rules, check_stats=3DTrue) out0 =3D self.send_pkts_getouput(pkts=3Dpkts[2]) - rfc.check_iavf_fdir_mark(out0, pkt_num=3D1, check_param=3D{"port_i= d": 0, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out0, pkt_num=3D1,=20 + check_param=3D{"port_id": 0, "mark_id": 0, "queue": 6}, stats=3DTrue) out1 =3D self.send_pkts_getouput(pkts=3Dpkts[1]) - rfc.check_iavf_fdir_mark(out1, pkt_num=3D1, check_param=3D{"port_i= d": 1, "mark_id": 0, "queue": 1}, stats=3DTrue) + rfc.check_iavf_fdir_mark(out1, pkt_num=3D1,=20 + check_param=3D{"port_id": 1, "mark_id": 0, "queue": 6}, stats=3DTrue) self.dut.send_expect("quit", "# ") self.session_secondary.send_expect("ip link set %s vf 0 mac 00:11:= 22:33:44:55" % self.pf0_intf, "# ") self.dut.close_session(self.session_secondary) @@ -3356,8 +3369,8 @@ class TestIAVFFdir(TestCase): =20 def tear_down(self): # destroy all flow rule on port 0 - self.destroy_env() self.dut.kill_all() # Wait for NIC to clean up resources time.sleep(1) + self.destroy_env() if getattr(self, 'session_secondary', None): self.dut.close_session(self.session_secondary) if getattr(self, 'session_third', None): -- 2.17.1