From patchwork Tue Aug 23 05:59:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 115349 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6185DA04FD; Tue, 23 Aug 2022 08:01:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B901406A2; Tue, 23 Aug 2022 08:01:05 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 826AE400D6 for ; Tue, 23 Aug 2022 08:01:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661234463; x=1692770463; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=w0vn8rgtkK1oOUTFRdA0NTgTeUbdcKbcgSJCpS2jmq8=; b=DsRUUI/fxTaaXnMQ2cSD57vI4mfrsEYg4YajbQibvly2is0f2o1I50gI uM51SMv9eSse3oSlEejjHJgODMTHoxZ49cgscFarhqzarlL1TS6aqoqhR DDyyTwwEWBZi+QvPv0XJacXi1EOHhnEAvYdBzLacPtgCKt2dGJEM7LIh5 Azsf4pw15HfhSyW5zWeL0tf/qyowInYD0ENhOaD074KTxaaIXEJLsbq/j jQfixAnA8yvNpsST+Wes9lW5+dJ3i+/1lvAt0Ac1Mm9NGOlndBxnkWpdB 6Axo+6L7iU9+RWH/WFuK3yGkEe88GOtYC30fCKVGSQywd8k+Q2KgDh6tT Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10447"; a="273985472" X-IronPort-AV: E=Sophos;i="5.93,256,1654585200"; d="scan'208";a="273985472" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 23:01:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,256,1654585200"; d="scan'208";a="560034847" Received: from unknown (HELO DPDK-XUKE-LAB.sh.intel.com) ([10.67.116.226]) by orsmga003.jf.intel.com with ESMTP; 22 Aug 2022 23:01:00 -0700 From: Ke Xu To: dts@dpdk.org Cc: qi.fu@intel.com, ke1.xu@intel.com Subject: [dts][PATCH V1 0/2] tests/tso: modify get_chksum_value_and_verify to fix a checksum-verify error and improve the performance Date: Tue, 23 Aug 2022 05:59:37 +0000 Message-Id: <20220823055939.4186198-1-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Function get_chksum_value_and_verify in test suite TSO case test_tso_tunneling cannot verify checksum error. Duplicated call to packet.read_pcapfile will change the packet sequence stored in packet.pktgen.pkts, leading to a wrongly organized packet sequence writen to file, and fails the following checksum verifying. The wrongly used methods also lead to a low effeciency. Duplicated call to packet.read_pcapfile will lengthen the packet sequence stored in packet.pktgen.pkts. Duplicated call to packet.save_pcapfile is also time consuming. There is also a misuse of show method that *.show() will print a packet info, but will not return a string. The *.show will return a method object, and the following str(out) will turn the method object into a string, so here when use out = x.show, checksum looking up in str(out) it is equivalent to that in repr(x). In the first commit, the checksum verifying problem is fixed. In the second commit, this function is improved that the case running time is decresed by 2 minutes. Ke Xu (2): tests/tso: modify get_chksum_value_and_verify to fix a checksum-verify error tests/tso: modify get_chksum_value_and_verify to improve the performance tests/TestSuite_tso.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-)