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 02404A0501; Tue, 24 May 2022 10:19:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F050040A87; Tue, 24 May 2022 10:19:22 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 58DCD400D6 for ; Tue, 24 May 2022 10:19:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653380361; x=1684916361; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=srrJW7sB9JW4XcAxdfkYupdQeGOmJoHIiWFBslrdQP0=; b=SSZzehl6QKu6lQp2nsHOYwJWRstbACEaq7k9JtViYAD8xXitjS0phE+7 uHXwARLXpWbIcn8MlPYyAkWH6tqCVR+2ryhrlTfsEgRt5qerylhrzS+jp 0RSgsJwk5av+5YIMYqVu1bNoPf89RCDJX4CV8ePL33dK+3p7Ajs9X10xO y/7EkQATykRQyLFiYj7ug8jffGFYQBNi+q9nm9WUJE8Lv8owpLHaxvziv kI7OM5dOQra73jSmx/Ow6Pgrf84BGiYPHpjQ+rYlO6llsqOYuNKACkEx3 pnXn6/jWUlFkQZWPHE1idVAT4mxugvj+UoPuzF+TTA2Lp03hdeDBJL5V/ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="255531519" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="255531519" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 01:19:20 -0700 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="745126361" Received: from unknown (HELO daily-regression-131.intel.com) ([10.239.251.131]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 01:19:19 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V3 1/5] tests/rte_flow_common:modify check mismatch pkts test Date: Tue, 24 May 2022 16:19:10 +0800 Message-Id: <20220524081914.44538-2-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220524081914.44538-1-zhiminx.huang@intel.com> References: <20220524081914.44538-1-zhiminx.huang@intel.com> 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. 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.25.1