From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C2751201 for ; Wed, 23 Jan 2019 05:28:39 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2019 20:28:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,509,1539673200"; d="scan'208";a="128124953" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 22 Jan 2019 20:28:37 -0800 From: "zhao,meijuan" To: dts@dpdk.org Cc: "zhao,meijuan" Date: Wed, 23 Jan 2019 12:32:17 +0800 Message-Id: <1548217937-22095-1-git-send-email-meijuanx.zhao@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/vf daemon : add fake mac in different dpdk file X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2019 04:28:40 -0000 due to dpdk move macswap workload, so we need to add fack mac in different dpdk file, you refer to dpdk commit a825afdbb Signed-off-by: zhao,meijuan --- tests/TestSuite_vf_daemon.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py index 42a14e5..2a8baf8 100644 --- a/tests/TestSuite_vf_daemon.py +++ b/tests/TestSuite_vf_daemon.py @@ -486,13 +486,12 @@ class Testvf_daemon(TestCase): """ fake_mac = '00:11:22:33:44:55' time.sleep(5) - self.vm0_dut.send_expect("sed -i -e '/uint64_t ol_flags = 0;/a " +\ - "\struct ether_addr fake_mac = {.addr_bytes = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};'" +\ - " app/test-pmd/macswap.c", "# ", 30) - self.vm0_dut.send_expect("sed -i -e '/ether_addr_copy(&addr, ð_hdr->s_addr);/d' " +\ - " app/test-pmd/macswap.c", "# ", 30) - self.vm0_dut.send_expect("sed -i -e '/ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);/a " +\ - "\ether_addr_copy(&fake_mac, ð_hdr->s_addr);' app/test-pmd/macswap.c", "# ", 30) + self.vm0_dut.send_expect("sed -i -e '/int r;/a " +\ + "\ struct ether_addr fake_mac = {.addr_bytes = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};'" +\ + " app/test-pmd/macswap_sse.h", "# ", 30) + line_num = self.vm0_dut.send_expect("sed -n '/_mm_storeu_si128/=' app/test-pmd/macswap_sse.h |sed -n 5p", "# ",30) + self.vm0_dut.send_expect("sed -i -e '%sa\ether_addr_copy(&fake_mac, ð_hdr[0]->s_addr);'" % str(line_num)+\ + " app/test-pmd/macswap_sse.h", "# ", 30) time.sleep(3) self.vm0_dut.build_install_dpdk(self.target) @@ -527,11 +526,9 @@ class Testvf_daemon(TestCase): self.vm0_testpmd.quit() self.dut_testpmd.quit() self.vm0_dut.send_expect("sed -i '/struct ether_addr fake_mac = {.addr_bytes = " +\ - "{0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};/d' app/test-pmd/macswap.c", "# ", 30) - self.vm0_dut.send_expect("sed -i '/ether_addr_copy(&fake_mac, ð_hdr->s_addr);/d' " +\ - "app/test-pmd/macswap.c", "# ", 30) - self.vm0_dut.send_expect("sed -i '/ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);/a " +\ - "\ether_addr_copy(&addr, ð_hdr->s_addr);' app/test-pmd/macswap.c", "# ", 30) + "{0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};/d' app/test-pmd/macswap_sse.h", "# ", 30) + self.vm0_dut.send_expect("sed -i '%sd'" % line_num +\ + " app/test-pmd/macswap_sse.h", "# ", 30) self.vm0_dut.build_install_dpdk(self.target) -- 2.17.2