From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72905A0C41; Wed, 17 Nov 2021 09:09:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59F964068C; Wed, 17 Nov 2021 09:09:43 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4756740040 for ; Wed, 17 Nov 2021 09:09:40 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10170"; a="214622665" X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="214622665" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 00:09:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="549014721" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP; 17 Nov 2021 00:09:35 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 17 Nov 2021 00:09:34 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 17 Nov 2021 00:09:34 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 17 Nov 2021 00:09:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KEiqEcYzaC2jEBUsCh6fNaCNS+7VRHVIt+rVppT1qMsf497gfuAixrHSPISlFOP8Y6StOYwZq23rbxTAeqALRkuDNoS/ot2OXJwKZOPhOHmgkBbCjlD1+mdY6PgPvwLm7N0ennV+2F5v56JCcbYeG8Mp/459HLnks9XQsn1DaG3eB1U1tXvp7TEPYBKE0AbabPGspTT4xZVK/DF3pBC1E2E50acqN7JGbzslo+TyFYPEcvvVFTP4XjHJWDIlUAIqCetk0vF77KTo2rRvFBQPcPR7/Z7zkViXUuOMDaLhCT9Uok6fVwIptFJBd16uqBnB4HIqxRq/AZM9mKlJJCwUQA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1pJC4oZx2gHhNm1BgfD6L6boPS7icEixzV2tYZ92EWw=; b=ZAEmzobp7bqhZXCt7wrSdItco0XW9L6UHWK4zaK8alfmDkSLb6JpuJi7nBdWBirULSuwiPV7QiZwXW5YJg2c0iVVZM3MXHcCgDDrqy3HrCC09p+Ou/VnM4zF2roEnLYoWZBJG7BQlyFAD6YZl74Uzga3sskMGeDmJ1aA0QYXnYIiQZ8uyo5U07/Dt2wM9xaxFm0vo2OayyaBcIdTRVbxejGn8MMVcv2k1a4Mwb3nrrPWiG6XqLonWq4viricBQcyAXKveYRBgkyArysxHx07utd5JfnFV6ckjwu6v4nKB7k5DGl7GeQmN3ydomXDSr4bbHR4jEpmnd9vCU8BIGt2iQ== 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=1pJC4oZx2gHhNm1BgfD6L6boPS7icEixzV2tYZ92EWw=; b=DXs+LXDYjJ+uuMlTlmmy5qXmcrs6VOEfB7iYQYWMVzwSlSeVsB4aQty4xokBms/wwXgDq9QT5XSpo00rroa1w1skhIYKMSyZhcVnAumfrps9TF2ENMmZ8aOCluBVUSBKVq/f5FI0sRogVOipwK71IM0qcjjrnFxX6NpSuwE/hL4= Received: from CO1PR11MB5058.namprd11.prod.outlook.com (2603:10b6:303:99::17) by CO1PR11MB4804.namprd11.prod.outlook.com (2603:10b6:303:6f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.18; Wed, 17 Nov 2021 08:09:33 +0000 Received: from CO1PR11MB5058.namprd11.prod.outlook.com ([fe80::49d5:fe9f:6dd9:8f95]) by CO1PR11MB5058.namprd11.prod.outlook.com ([fe80::49d5:fe9f:6dd9:8f95%8]) with mapi id 15.20.4690.027; Wed, 17 Nov 2021 08:09:32 +0000 From: "Peng, Yuan" To: "Jiang, YuX" , "dts@dpdk.org" Subject: RE: [dts][PATCH V2 3/3] tests/generic_flow_api: add case test_fdir_for_match_report Thread-Topic: [dts][PATCH V2 3/3] tests/generic_flow_api: add case test_fdir_for_match_report Thread-Index: AQHX0e/TjAQR18oVM066VEMosMswq6wHcOxg Date: Wed, 17 Nov 2021 08:09:32 +0000 Message-ID: References: <1636080565-26720-1-git-send-email-yux.jiang@intel.com> <1636080565-26720-4-git-send-email-yux.jiang@intel.com> In-Reply-To: <1636080565-26720-4-git-send-email-yux.jiang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7626f812-8988-4813-cf36-08d9a9a1966e x-ms-traffictypediagnostic: CO1PR11MB4804: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1388; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: L8lBPNYGfbZFcmHzvkC0BaCaaiWwAg9GI3Z5eqeUVPLVPCgxAZQeF4yTGBo4Nr8Tq91G7UAAMNdtiiPh4J5JLoBxqvxVvQBwiKnM2Sy2iERmT9CJYnxamg8jXwoPvCg+rVLaQbyFUcGCiOCcq9Q4aSGJzs+n6BSvoSOyIxB8HeClkH541k0dWP1U9Wy0Zucvkv+w4xFS6JZeEiLblcbuK190WjSOceTOa+SRsnRvQyTjDL6SfXilc/QKsBtNI7Jk3o31ODbeIns2rOpnqPwKlFLC5ZWcQ9/DLc3odZnWPlJWMjgBefafxxAhfnzmfxrUb5IanJL3XPHJmzdGmYNaVGbTXIiTVIEaPYSxGQAuS0UJaA/qBVlfJWu2u9XyxYyUd8Ku3SwnmUF2wm+vqfG8uz+ztIptoI6Ekrx8amQVx6qooos1VkGqg9XlNR7NE3MdBncEeGjfVUlcbmTPtyk+FYpOiojXxxsO/1ejQNDczd7NMotUjPI6hzkA5AnfEM+0Cswv5m/qVr9SQ0HoLeFGRceQOFwQX7b4cEsWsYjdd7RwA+UFPzeFmwfmFRwRr/yTXFrdyvuVqswlvy80hzWU3X3ucf9tazclRqDvdFprCU+jdUntGjjT4//dylt5wDlMamfYDOo1mIFuijbxxchEhoWGzOcdgBNy7EyxOcri4ehUfjKLp1MsKmVdGljMG2lFbqX6szOSjwVenK0Dsu83meAynEazixisTiAltg8rsqM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5058.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(7696005)(71200400001)(186003)(66446008)(5660300002)(2906002)(26005)(66556008)(66946007)(8676002)(64756008)(110136005)(55016002)(83380400001)(52536014)(33656002)(316002)(6506007)(8936002)(86362001)(66476007)(76116006)(53546011)(82960400001)(122000001)(9686003)(38070700005)(508600001)(41533002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3VwdqY09ny9YOrwYjvTuWqiTRkPtZgT8J1x3oAlahINMXFDOhU/x/yFHTwAZ?= =?us-ascii?Q?+YOGjx3QlRvQ3fDnxF0lTDGPb6j8gFATFIbykKXQxqxzd9MqyoNqZRPLqX4R?= =?us-ascii?Q?gKR0N1LTZMx6GFGvaLvOw2h9irlfVYooQuX+HaCOFeqjhFQKEZ/P4VlAffB3?= =?us-ascii?Q?QfofyVGpW06biRfHa4Tfuq3HyHS5+GaIY3V3wj/hFH6mvZqNfLUCi79sxyqT?= =?us-ascii?Q?FttS/sjPpIEa6sQfCch/8QNTy/6nK5UUcW3n0xqIYIYRR1sfRF+VVpvKZrvY?= =?us-ascii?Q?DnP74/4rpU7WV/ZUR7HFN2E1G0qHr7XRAc3KK55n147c3c5lp+RW+ld1g864?= =?us-ascii?Q?RcrWVfnJ/pvzmGgJdEjNiwNqMf7kV5L68M0NG7/wkxU+ZLu1qDB1WCJAwJRC?= =?us-ascii?Q?KFJBuKaAZRzYs35nfpKDidr0VKrxJgYybSX/7/B5QyKcQV1Ngcwx4M0FoUse?= =?us-ascii?Q?Ld4geVAluOOv3revp0zak+x/uD7SkJEHso43ImG/h8PMnz1c4YeWiurKOBbv?= =?us-ascii?Q?Pxksx7VxY4wgX2EXs3oRiTps2AhGU5WyyyhnfosPxL7vFwG8bSfRkHrK2dtV?= =?us-ascii?Q?6avomRS0PSpEQxW+jt2hNS6aD4ONsRoXE5+wLq7JPKRH09cDeq1nbZluQTLs?= =?us-ascii?Q?vLv4s9KN/zVRs+C5n+6OxUdx7S/RIlM7MtBEBtN36G6fVLwbFcu7a7sNsg/8?= =?us-ascii?Q?ec7nfwxTttZ91xjcZ7KpDj3Vau79mK9bRpsl3SGnptNOi1+BpgtdWLLOfKxO?= =?us-ascii?Q?gIyZBZdBC3vgF/idgzC3pbiK6EBkqxIVDaIGepCi3k18lBlfIoIujreXXFPt?= =?us-ascii?Q?ou+eKybecDttGTvsBQM2nb82g9aU0UZqor55h8eJF7nQc9jQrYUTrOVdfq0j?= =?us-ascii?Q?kCirYP6iq3cZcDuRI7ncdnfmLHB4S6v0EPPu3XIPl/vkr0f9PeiKOnqYRtQJ?= =?us-ascii?Q?EZ1rwI4alBSbP4+Kvqmjeg/d/vV0d8wd8HMBovL2tfbC7gPSFMRoXpr2JPX7?= =?us-ascii?Q?1wIrKNJd2KkDt1t/BPAahBvTjn/eRhku6L5tdj9jpbFUHYMVByPNKpl00//x?= =?us-ascii?Q?pvtKHRem8u04keU4Wk6XwPeg8SUV66ZCES9GZrls9KPvrhi/jY1/rm/0e9Kq?= =?us-ascii?Q?mQx9BYUiM+tBNrA+FUNhKizFFE2vZY/hifNmDNiGNuPYmgejBFGZOds4pa7O?= =?us-ascii?Q?FHGVEbVGgqUo0gSeKErZu4WTyfSEqJVF0dARw06aA8O9pX87SrdxorRIZeBQ?= =?us-ascii?Q?kcdheOgc96E11TYZ3z+0GGYDZ7F8RzPNjXSOb0jvB8PpthLe/9ggNLZ+88LJ?= =?us-ascii?Q?N6IY0fo+FtcHLV6iIGkYDhyt3WtsuyjKK9vyQNRtReFGlVqwVjmqc+8DIiL1?= =?us-ascii?Q?w0ZdkdfxdrcWubgBXmhCOyQiDl5AVvaWKq0A/uFOEjARxBkJ4hnJu8QHJLOW?= =?us-ascii?Q?5e4pmYwmhT26jJ27WTJzCOfnaVUVQyzMzt+rCAsvWsmyeLB36L0rsHY3P4oh?= =?us-ascii?Q?eGN/Sfml5+0W9urn3kdK+fz08rYcPUaws1vmn3bKQpvXrkqMHE7TJEhVyOlj?= =?us-ascii?Q?SoTqfix2b4OqDOyU3rpiTfIduc2G2R14SNj68oxBYfzwyY2YXDFs2dY1BW87?= =?us-ascii?Q?opK3aQCH3/TXdO7ByT1uOGo=3D?= 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: CO1PR11MB5058.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7626f812-8988-4813-cf36-08d9a9a1966e X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2021 08:09:32.6676 (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: vow6rU1QYRtlgLAH6lXewGI247+DklqeAmTnL92Uai1DN6TXFzxDvtbS2T3rr2vEbHXCdxiwQZ69B1zy2CLBFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4804 X-OriginatorOrg: intel.com X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 Acked-by Peng, Yuan -----Original Message----- From: Jiang, YuX =20 Sent: Friday, November 5, 2021 10:49 AM To: Peng, Yuan ; dts@dpdk.org Cc: Jiang, YuX Subject: [dts][PATCH V2 3/3] tests/generic_flow_api: add case test_fdir_for= _match_report add case test_fdir_for_match_report Signed-off-by: Yu Jiang --- conf/test_case_supportlist.json | 15 +++++ tests/TestSuite_generic_flow_api.py | 111 ++++++++++++++++++++++++++++++++= +++- 2 files changed, 124 insertions(+), 2 deletions(-) diff --git a/conf/test_case_supportlist.json b/conf/test_case_supportlist.j= son index e3eefd4..4ad90b2 100644 --- a/conf/test_case_supportlist.json +++ b/conf/test_case_supportlist.json @@ -791,6 +791,21 @@ "Comments": "This case only support on twinville, sagepond and= sageville" } ], + "fdir_for_match_report": [ + { + "OS": [ + "ALL" + ], + "NIC": [ + "niantic" + ], + "Target": [ + "ALL" + ], + "Bug ID": "", + "Comments": "This case only support on niantic" + } + ], "fdir_for_mac_vlan": [ { "OS": [ diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_= flow_api.py index e6b04ab..08ca032 100644 --- a/tests/TestSuite_generic_flow_api.py +++ b/tests/TestSuite_generic_flow_api.py @@ -158,9 +158,10 @@ class TestGeneric_flow_api(TestCase): """ return 1024 * queue_num + 512 =20 - def verify_result(self, pf_vf, expect_rxpkts, expect_queue, verify_mac= ): + def verify_result(self, pf_vf, expect_rxpkts, expect_queue, verify_mac= , check_fdir=3D''): """ verify the packet to the expected queue or be dropped + : check_fdir=3D[exist|non-exist] """ # self.tester.scapy_execute() # time.sleep(2) @@ -217,12 +218,39 @@ class TestGeneric_flow_api(TestCase): queue_index =3D len(m) - 1 curr_queue =3D int(m[queue_index][len("port 0/queue"):]) self.verify(int(expect_queue) =3D=3D curr_queue, "the actual q= ueue doesn't equal to the expected queue.") - + if check_fdir =3D=3D 'exist': + self.verify("RTE_MBUF_F_RX_FDIR" in out_pf, 'FDIR information = should be printed.') + elif check_fdir =3D=3D 'non-exist': + self.verify("FDIR" not in out_pf, 'FDIR information should=20 + not be printed.') self.dut.send_expect("start", "testpmd> ") =20 if self.vf_flag =3D=3D 1: self.session_secondary.send_expect("start", "testpmd> ") self.session_third.send_expect("start", "testpmd> ") + return out_pf + + def launch_start_testpmd(self, queue=3D'', pkt_filter_mode=3D'', repor= t_hash=3D'', disable_rss=3DFalse, fwd=3D'', verbose=3D''): + """ + Launch and start testpmd + """ + param =3D '' + eal_param =3D '' + if queue: + param +=3D '--rxq=3D{} --txq=3D{} '.format(queue, queue) + if pkt_filter_mode: + param +=3D '--pkt-filter-mode=3D{} '.format(pkt_filter_mode) + if disable_rss: + param +=3D '--disable-rss ' + if report_hash: + param +=3D '--pkt-filter-report-hash=3D{} '.format(report_hash= ) + self.pmdout.start_testpmd("{}".format(self.cores), param=3Dparam, = eal_param=3Deal_param) + if fwd: + self.pmdout.execute_cmd('set fwd rxonly', ) + if verbose: + self.pmdout.execute_cmd('set verbose 1') + self.pmdout.execute_cmd('start') + self.pmdout.execute_cmd('show port info all') + self.pmdout.wait_link_status_up(self.dut_ports[0]) =20 def compare_memory_rules(self, expectedRules): """ @@ -2664,6 +2692,85 @@ class TestGeneric_flow_api(TestCase): else: self.verify(False, "%s not support this test" % self.nic) =20 + def test_fdir_for_match_report(self): + """ + Test case: IXGBE fdir for Control levels of FDir match reporting + only supported by ixgbe + """ + fdir_scanner =3D re.compile("FDIR matched hash=3D(0x\w+) ID=3D(0x\= w+)") + pkt0 =3D 'Ether(dst=3D"{}")/IP(src=3D"192.168.0.1", dst=3D"192.168= .0.2")/Raw("x" * 20)'.format(self.pf_mac) + pkt1 =3D 'Ether(dst=3D"{}")/IP(src=3D"192.168.1.1", dst=3D"192.168= .1.2")/Raw("x" * 20)'.format(self.pf_mac) + rule0 =3D "flow create 0 ingress pattern eth / ipv4 src is 192.168= .0.1 dst is 192.168.0.2 / end actions queue index 1 / mark id 1 / end" + rule1 =3D "flow create 0 ingress pattern eth / ipv4 src is 192.168= .1.1 dst is 192.168.1.2 / end actions queue index 2 / mark id 2 / end" + + self.logger.info("Sub-case1: ``--pkt-filter-report-hash=3Dnone`` m= ode") + pkt_filter_report_hash =3D "none" + self.launch_start_testpmd(queue=3DMAX_QUEUE + 1, pkt_filter_mode= =3D'perfect', report_hash=3Dpkt_filter_report_hash, + disable_rss=3DTrue, fwd=3D'rxonly',=20 + verbose=3D'1') + + # Send the matched packet with Scapy on the traffic generator and = check that no FDir information is printed + self.sendpkt(pktstr=3Dpkt0) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0",= =20 + verify_mac=3Dself.pf_mac, check_fdir=3D"non-exist") + + # Add flow filter rule, and send the matched packet again. + # No FDir information is printed, but it can be seen that the pack= et went to queue 1 + self.pmdout.execute_cmd(rule0) + self.sendpkt(pktstr=3Dpkt0) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1", = verify_mac=3Dself.pf_mac, check_fdir=3D"non-exist") + self.pmdout.quit() + + self.logger.info("Sub-case2: ``--pkt-filter-report-hash=3Dmatch`` = mode") + pkt_filter_report_hash =3D "match" + self.launch_start_testpmd(queue=3DMAX_QUEUE + 1, pkt_filter_mode= =3D'perfect', report_hash=3Dpkt_filter_report_hash, + disable_rss=3DTrue, fwd=3D'rxonly',=20 + verbose=3D'1') + + # Send the matched packet with Scapy on the traffic generator and = check that no FDir information is printed + self.sendpkt(pktstr=3Dpkt0) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0",= =20 + verify_mac=3Dself.pf_mac, check_fdir=3D"non-exist") + + # Add flow filter rule, and send the matched packet again. + # the match is indicated (``RTE_MBUF_F_FDIR``), and its details (h= ash, id) printed + self.pmdout.execute_cmd(rule0) + self.sendpkt(pktstr=3Dpkt0) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1",= =20 + verify_mac=3Dself.pf_mac, check_fdir=3D"exist") + + # Add flow filter rule by using different scr,dst, and send the ma= tched pkt1 packet again. + # the match is indicated (``RTE_MBUF_F_FDIR``), and its details (h= ash, id) printed + self.pmdout.execute_cmd(rule1) + self.sendpkt(pktstr=3Dpkt1) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2",= =20 + verify_mac=3Dself.pf_mac, check_fdir=3D"exist") + + # Remove rule1 and send the matched pkt0 packet again. Check that = no FDir information is printed + self.pmdout.execute_cmd('flow destroy 0 rule 0') + self.sendpkt(pktstr=3Dpkt0) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0",= =20 + verify_mac=3Dself.pf_mac, check_fdir=3D"non-exist") + + # Remove rule2, and send the match pkt1 packet again. Check that n= o FDir information is printed + self.pmdout.execute_cmd('flow destroy 0 rule 1') + self.sendpkt(pktstr=3Dpkt1) + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0", = verify_mac=3Dself.pf_mac, check_fdir=3D"non-exist") + self.pmdout.quit() + + self.logger.info("Sub-case3: ``--pkt-filter-report-hash=3Dalways``= mode") + pkt_filter_report_hash =3D "always" + self.launch_start_testpmd(queue=3DMAX_QUEUE + 1, pkt_filter_mode= =3D'perfect', report_hash=3Dpkt_filter_report_hash, + disable_rss=3DTrue, fwd=3D'rxonly',=20 + verbose=3D'1') + + # Send matched pkt0 packet with Scapy on the traffic generator and= check the output (FDIR id=3D0x0) + self.sendpkt(pktstr=3Dpkt0) + out1 =3D self.verify_result("pf", expect_rxpkts=3D"1",=20 + expect_queue=3D"0", verify_mac=3Dself.pf_mac, check_fdir=3D"exist") + + # Add flow filter rule, and send the matched pkt0 packet again. + # the filter ID is different, and the packet goes to queue 1Add fl= ow filter rule, and send the matched packet again. + self.pmdout.execute_cmd(rule0) + self.sendpkt(pktstr=3Dpkt0) + out2 =3D self.verify_result("pf", expect_rxpkts=3D"1",=20 + expect_queue=3D"1", verify_mac=3Dself.pf_mac, check_fdir=3D"exist") + + # check fdir id is different + self.logger.info("FDIR ID1=3D" + fdir_scanner.search(out1).group(0= ) + "; FDIR ID2=3D" + fdir_scanner.search(out2).group(0)) + self.verify(fdir_scanner.search(out1).group(0) !=3D fdir_scanner.s= earch(out2).group(0), + 'Sub-case3.3: FDIR ID should be different') + def tear_down(self): """ Run after each test case. -- 2.7.4