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 01249A04FF; Tue, 24 May 2022 05:01:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED216427F8; Tue, 24 May 2022 05:00:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 1F47442684 for ; Tue, 24 May 2022 05:00:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653361258; x=1684897258; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wiRIKs1Cz9cZhwCaFwGgYcT6oVSVqHfpejm0mW5HB9A=; b=CU3R15Ka817o1Y0NWwqXVPDJQYplSzfFrr6LkcNJsOu0Qad8DT51Bcyt 5uLzu54SIyRSaZ40h2tSruWP6PHxhrtzHptmGeCDici8YD1Ujn7N001lM jH7Y7+Gh2WRltavDQ9kjPFoqBl0CxafaaQ9CyTlG3lp9v6kLOwBVlLR8I kaPii6eBoeHunSdBaIu8P3E3BSC3QaG+J5e4gs8yJmBqJvVn5unCsweUy 11/ItiTPrb3YssiVR59V5L6valQcAPjjDPjS0/YXXY0r3nkcRfs7xa0nT 4Sg0tiTYuBgCIGjwu5tRe63Ejom7kW8kjKhszeMwBfR+GnQJAx/e8LdQ5 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="272234473" X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="272234473" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 20:00:53 -0700 X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="600996638" Received: from unknown (HELO daily-regression-131.intel.com) ([10.239.251.131]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 20:00:52 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V2 1/5] tests/rte_flow_common:modify check mismatch pkts test Date: Tue, 24 May 2022 11:00:44 +0800 Message-Id: <20220524030048.34627-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 For ipfragment test,the mismatch pkt no need to send with fragment. so modify rte_flow_common to adapt test steps changed. V2: fix format issue. Signed-off-by: Zhimin Huang --- tests/rte_flow_common.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py index 45446521..25266588 100644 --- a/tests/rte_flow_common.py +++ b/tests/rte_flow_common.py @@ -1389,14 +1389,17 @@ class FdirProcessing(object): self.verify = self.test_case.verify self.ipfrag_flag = ipfrag_flag - def send_pkt_get_output(self, pkts, port_id=0, count=1, interval=0, drop=False): + def send_pkt_get_output( + self, pkts, port_id=0, count=1, interval=0, drop=False, **kwargs + ): tx_port = self.tester_ifaces[0] if port_id == 0 else self.tester_ifaces[1] self.logger.info("----------send packet-------------") self.logger.info("{}".format(pkts)) + mismatch_flag = kwargs.get("mismatch") if drop: self.pmd_output.execute_cmd("clear port stats all") time.sleep(1) - if self.ipfrag_flag == True: + if self.ipfrag_flag == True and not mismatch_flag: send_ipfragment_pkt(self.test_case, pkts, tx_port) else: self.pkt.update_pkt(pkts) @@ -1410,7 +1413,7 @@ class FdirProcessing(object): self.pmd_output.execute_cmd("start") return out else: - if self.ipfrag_flag == True: + if self.ipfrag_flag == True and not mismatch_flag: count = 2 send_ipfragment_pkt(self.test_case, pkts, tx_port) else: @@ -1623,11 +1626,14 @@ class FdirProcessing(object): # send and check unmatched packets out2 = self.send_pkt_get_output( - pkts=tv["scapy_str"]["unmatched"], port_id=port_id, drop=drop + pkts=tv["scapy_str"]["unmatched"], + port_id=port_id, + drop=drop, + mismatch=True, ) check_mark( out2, - pkt_num=len(tv["scapy_str"]["unmatched"]) * 2 + pkt_num=len(tv["scapy_str"]["unmatched"]) if self.ipfrag_flag else len(tv["scapy_str"]["unmatched"]), check_param=tv["check_param"], -- 2.17.1