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 E2796A04FF; Tue, 24 May 2022 04:12:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8EDE4067C; Tue, 24 May 2022 04:12:59 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B58394014F for ; Tue, 24 May 2022 04:12:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653358378; x=1684894378; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Al+Wqa/OA9kBnLFlHtV15ycYf6+z+D/Zc/k9o73bSXU=; b=d829hpHKtULM2IpkAOIYfxYbxHWel5xdh+mCAMq+CmtxSeX7siSmWtW0 na94kT7uq2vzsMWtb2vRIjYtx+xzugTAP6Ks7MzN2Bo8t8Lt3ghPzy0tv CUtRvWsk8IhL62/tQslPbsH9hK1CEt0OLR/UcllmORZscvWOyFs2BhxYU DOImbxabeCcm58A/fYk/us3PbZSxacEZtP5C5SotV5D+u65WZfrA2vVHu /I+wQhtpd6ptj/3CUj5A7GxwHKdm82wbgNPEjv+thp8pq2Kw7yTzs1MMI rjyEeSS4ntS/rK9E54dpnNuFagJ/hbkmX07PXvC2OwqDSap1/+pxCNARG w==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="273133538" X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="273133538" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 19:12:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="600981813" 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 19:12:36 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test Date: Tue, 24 May 2022 10:12:28 +0800 Message-Id: <20220524021232.32762-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. Signed-off-by: Zhimin Huang --- tests/rte_flow_common.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py index 45446521..dfd56d2a 100644 --- a/tests/rte_flow_common.py +++ b/tests/rte_flow_common.py @@ -1389,14 +1389,15 @@ 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 +1411,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 +1624,11 @@ 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