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 A7C68A052B; Wed, 29 Jul 2020 10:01:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9654437B7; Wed, 29 Jul 2020 10:01:10 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BCBEC1023 for ; Wed, 29 Jul 2020 10:01:08 +0200 (CEST) IronPort-SDR: x2X19E8ja3VJ8MtjBG3+y/gnyVIkyCW9chLWxsTGTJrgeG/IdZNjcpNbN5TO7n+RS4u21QSUGd JgdOPAYRI9KA== X-IronPort-AV: E=McAfee;i="6000,8403,9696"; a="169494133" X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="169494133" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 01:01:07 -0700 IronPort-SDR: jLpVN7uW6HErTxFt7ubueXwTYb2a7FM5s++S1CW0svrCs1HRoKIwLFjEQvS45m7+TVSx/FDKVh J70BxH9EfPtw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="490209330" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga006.fm.intel.com with ESMTP; 29 Jul 2020 01:01:07 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) 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; Wed, 29 Jul 2020 01:01:07 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 29 Jul 2020 01:01:07 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jul 2020 01:01:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7RgcACZnXkTuE84FBQ4kg2Qpt1vV7uwpfHgw66MxUB9OsTRwkIe8IV3o1CELXRfTm78jrQQlwPx95pgtuKNuUQNGfzRkpaOTcuqbUKS1g4gQhrtKv/e3ABcUf3KJOXJ5fZitcqs8FkeAH82GBfGXsPuFIhm7F+cLr1fxUv+2Up/4ahYbFj8G28bj6bnu/wZbpLt9rB+jQa2zmsvzczBgY52NFCZySeTdRTQf0HOUGbxslMh4igmAZRyFFK9Tgk8J+Ii5CjphZDl0CluGIcimnqQYMij1ai153U/Q34inZ39SCK7Av58yBGXdJY5BT2gLMvWfa8jcYBlXwo/isuKNw== 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=6LR9sam+rIl2YeN58xrZszvmjQQJUJMYtM+1cY8l9Es=; b=nsL005WhYa2Xxm352uBAVwbrMTCsbDzRFSbPkuivjCpfW9bAVVGxEb5OcxkK7dKb2uqEA5zoC+aBl87U0MLZeZfObTRT7kblOIzxWVBIcjp9GOewrsFrQPDWzZMxW2TQ0TQPN7joL3nROGeMR3FCfE58hq5+sBrcSstgPrNeNgDSohTetskH77bsI6pB0KKhL3obh8UHm8Oc774Y1s3oe9EOdAT88EaYC3Ro+3nRT2ZdQOwsdS3nz2ei5B8/bURTVE4Cm2/3Fdki3BnbNpcqWPTktm4EU/CoM7FGfpCl1Z3piGwMV/9FsHXDreRbOs0QCNQ5SRiw3q5VCEjM2PKNgg== 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=6LR9sam+rIl2YeN58xrZszvmjQQJUJMYtM+1cY8l9Es=; b=g7dMT4MpFD6/w0e+1PuQYMH8rsQi7BKEtYG6szxX69H2g3S0SfDFExeNmM2E4R4FDk0jVv4+1gCsT9Gg8DfUYYbAHiVdGnLcn9Dhk9QlTZ5qLMK6G64WivG24y/3SL56lrRMHfmeanbLnKqboj260mPhxJmHVw1bIsGJxgD4rZQ= Received: from BY5PR11MB3893.namprd11.prod.outlook.com (2603:10b6:a03:183::26) by BYAPR11MB3669.namprd11.prod.outlook.com (2603:10b6:a03:f7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.30; Wed, 29 Jul 2020 08:01:04 +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.3216.034; Wed, 29 Jul 2020 08:01:04 +0000 From: "Peng, Yuan" To: "Chen, BoX C" , "dts@dpdk.org" CC: "Chen, BoX C" Thread-Topic: [dts] [PATCH V1] tests/iavf_fdir: Adaptive dpdk RSS algorithm update Thread-Index: AQHWY+jgJ57ebF50bkSQM4rH//PDkqkeManw Date: Wed, 29 Jul 2020 08:01:04 +0000 Message-ID: References: <20200727073300.9344-1-box.c.chen@intel.com> In-Reply-To: <20200727073300.9344-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.2.0.6 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.209] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a26fba65-d448-4429-0ca0-08d833958ac9 x-ms-traffictypediagnostic: BYAPR11MB3669: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:346; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aY9kLmb/JTPpnThjBQ81FAAbu+VBtsy5l3vQcTve244M7fqj1GqIiTzyIJ0x6Y7T5VXO4zuND6JI/unDW77Ag+uDXitsRfBc4kXjqgHCe8g2q5wxPKPOmoGWMfHt2cmuHXK551Ka/u9qSm5KWS+p/4VWpdvE5tbdd+xlcTUM/OTm4nPk67AgupT0aHE2ZzN6PDBTGEJT8B3zrxq1NfJSrbihXs0R5TOGDG3mtCiV2gSQVQIxmTMBFSfm9XN5Yi8gSkc9xCmU39mNTYeY+HQ7Hf19U4qwNdFt2eEnyM6xBvg2rGctUhM/8uZpiOZ4hduuuFTp16+iEykMBccEVg/uQw== 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)(346002)(136003)(39850400004)(396003)(366004)(8676002)(30864003)(53546011)(6506007)(478600001)(7696005)(83380400001)(33656002)(110136005)(316002)(8936002)(15650500001)(86362001)(66446008)(71200400001)(76116006)(186003)(64756008)(2906002)(26005)(66946007)(9686003)(55016002)(107886003)(4326008)(5660300002)(66556008)(66476007)(52536014)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: wRGekpy6PkazCdhJ9lL6nxDI2Wk/GByiB8i0rAl7pk2tOLsU6lKGaVbM0xbij+E0dp0lbcGmtgPcu3nQ3mlkKQNo6kQHS2E0mtrtoQuWCagEvSkpKpMIPEGTNsO5eGlEx9qagQtJ5JOFKb5ZZFyckGbGVgedxuH6g9GpdXCw9uUfvFL19Drcwi03tvleYCERmTqLyFuE5V6jQeVX5qSWGuyOl1XtJxUCPv/fT82Czm8o7qqAyk/sPIrBkxbYCRZYFggqpxGpOpJOwnUl5VsKz0FXrgJsi4UGEcRQifilRX6Ob1lc/VnwkPAkDLF18KnlVA6X4xZX6NVurACq2kv+dLhwjXUnH4Lg/xFH1FXmhbbdY0CjPfAuby4anbMCMAXf2OSyyNrX0GjhsS9zdc57vdQFHHwV6DjSgEV0kKQ8U2V06le0bMdcylCLuUgXO/ysaUSi9wGpNftwC/8a04YLvBXqQbaSa0gzAS2+8OBjEpIgilKZCEe4a3NMSM6KtAJp 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: a26fba65-d448-4429-0ca0-08d833958ac9 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2020 08:01:04.2561 (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: Bi0T9F/i4AtxQzjMDXQMOotw09ODrOpDW3Ok64iGpIERQvkUh2pJFJrpjkT/zoN/gWj1JfMOvdd02SidgDO0Sg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3669 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V1] 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" Comment inline. -----Original Message----- From: dts On Behalf Of ChenBo Sent: Monday, July 27, 2020 3:33 PM To: dts@dpdk.org Cc: Chen, BoX C Subject: [dts] [PATCH V1] tests/iavf_fdir: Adaptive dpdk RSS algorithm upda= te According to DPDK-22058, adaptive dpdk RSS algorithm update Signed-off-by: ChenBo --- tests/TestSuite_iavf_fdir.py | 112 ++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 49 deletions(-) diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py in= dex f2004c6..c398384 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,26 @@= 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 + 1) [yuan] the port should be nex_cnt self.create_fdir_rule(rule, check_stats=3DFalse) - self.check_fdir_rule(port_id=3D11, stats=3DFalse) + self.check_fdir_rule(port_id=3D(nex_cnt + 1), stats=3DFalse) [yuan] don't need this line. 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 +2679,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 +2704,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 +2855,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 +2877= ,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 +2953,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 +2976,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 +3370,8 @@ class TestIAVFFdir(TestCase): =20 def tear_down(self): # destroy all flow rule on port 0 - self.destroy_env() self.dut.kill_all() + 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