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 E41CFA0093; Fri, 22 Apr 2022 07:48:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF0DF410E7; Fri, 22 Apr 2022 07:48:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 34AE340040 for ; Fri, 22 Apr 2022 07:48:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650606536; x=1682142536; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XQCL36Ch15ZVwwxGwJK55cekl89364Ws6BeBNjBWCUA=; b=AKmXNU89yDVKihI7+46GhRTX62CU4mAeHsIhofmTTNPuzJBS9BX7Hrg2 Zzxd4P4B/Bo78pxxqR2WO56xufNBPmhUVdd/RIabzFJMh2OGpFuzbE2g7 EUZ9IL0OTuWb2y/1d1lRzXJoediqaArfHwjuTiN/oygw3GNu5Op7hAWud l71lP/U2UhTIGUEgmgeSEFTgDQDmsOkOgvgMS5BMm2kA5XhGY6ZRNjt7B SKm57XGGpZv2/vem7DOsECONILiVaslFXhpWR0d4BqUVddxg4QTZIvMBu u2h7SEROeHNbJDiqUeu/ARPv+9t6VUD5WlXWPh10lNS/Xl+rhmlFRIqC0 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="264749515" X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="264749515" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 22:48:55 -0700 X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="728357416" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 22:48:53 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 3/6] tests/vswitch_sample_cbdma: fix pcap header issue Date: Fri, 22 Apr 2022 13:48:50 +0800 Message-Id: <20220422054850.1559283-1-weix.ling@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 Fix pcap header issue. Signed-off-by: Wei Ling --- tests/TestSuite_vswitch_sample_cbdma.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py index 503c8ba0..b455790a 100644 --- a/tests/TestSuite_vswitch_sample_cbdma.py +++ b/tests/TestSuite_vswitch_sample_cbdma.py @@ -43,7 +43,6 @@ import framework.utils as utils from framework.packet import Packet from framework.pktgen import PacketGeneratorHelper from framework.pmd_output import PmdOutput -from framework.settings import HEADER_SIZE from framework.test_case import TestCase from framework.virt_common import VM @@ -96,7 +95,6 @@ class TestVswitchSampleCBDMA(TestCase): self.random_string = string.ascii_letters + string.digits self.virtio_ip0 = "1.1.1.2" self.virtio_ip1 = "1.1.1.3" - self.headers_size = HEADER_SIZE["eth"] + HEADER_SIZE["ip"] def set_up(self): """ @@ -350,8 +348,7 @@ class TestVswitchSampleCBDMA(TestCase): rx_port = self.tester.get_local_port(self.dut_ports[0]) tx_port = self.tester.get_local_port(self.dut_ports[0]) for dst_mac in dst_mac_list: - payload_size = frame_size - self.headers_size - pkt = Packet(pkt_type="VLAN_UDP", pkt_len=payload_size) + pkt = Packet(pkt_type="VLAN_UDP", pkt_len=frame_size) pkt.config_layer("ether", {"dst": dst_mac}) pkt.config_layer("vlan", {"vlan": 1000}) pcap = os.path.join( @@ -504,14 +501,13 @@ class TestVswitchSampleCBDMA(TestCase): tx_port = self.tester.get_local_port(self.dut_ports[0]) for dst_mac in dst_mac_list: for frame_size in frame_sizes: - payload_size = frame_size - self.headers_size pkt = Packet() pkt.assign_layers(["ether", "ipv4", "raw"]) pkt.config_layers( [ ("ether", {"dst": "%s" % dst_mac}), ("ipv4", {"src": "1.1.1.1"}), - ("raw", {"payload": ["01"] * int("%d" % payload_size)}), + ("raw", {"payload": ["01"] * int("%d" % frame_size)}), ] ) pcap = os.path.join( -- 2.25.1