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 EEE33A0547; Thu, 28 Oct 2021 11:33:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0CF94067B; Thu, 28 Oct 2021 11:33:06 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id E7FCD4003F for ; Thu, 28 Oct 2021 11:33:04 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="229117804" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="229117804" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 02:33:04 -0700 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="636149293" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 02:33:02 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Fri, 29 Oct 2021 02:02:39 +0800 Message-Id: <20211028180239.4645-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] iavf_flexible_descriptor:sync plan and case to adapt dpdk code changed 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 Sender: "dts" according to dpdk commit daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f code changed. fix code to adapt dpdk changed,and add check function after modify code in case. Signed-off-by: Zhimin Huang --- .../iavf_flexible_descriptor_test_plan.rst | 2 +- tests/TestSuite_iavf_flexible_descriptor.py | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/test_plans/iavf_flexible_descriptor_test_plan.rst b/test_plans/iavf_flexible_descriptor_test_plan.rst index d03fbe41..9cf0d713 100644 --- a/test_plans/iavf_flexible_descriptor_test_plan.rst +++ b/test_plans/iavf_flexible_descriptor_test_plan.rst @@ -106,7 +106,7 @@ The default DPDK don't support dump flexible descriptor fields, so need to patch (int)mb->nb_segs); ol_flags = mb->ol_flags; + rte_pmd_ifd_dump_proto_xtr_metadata(mb); - if (ol_flags & PKT_RX_RSS_HASH) { + if (ol_flags & RTE_MBUF_F_RX_RSS_HASH) { MKDUMPSTR(print_buf, buf_size, cur_len, " - RSS hash=0x%x", diff --git a/tests/TestSuite_iavf_flexible_descriptor.py b/tests/TestSuite_iavf_flexible_descriptor.py index 721dbb53..2da892c1 100644 --- a/tests/TestSuite_iavf_flexible_descriptor.py +++ b/tests/TestSuite_iavf_flexible_descriptor.py @@ -51,11 +51,32 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): "cp ./app/test-pmd/util.c .", r"""sed -i "/if dpdk_conf.has('RTE_NET_IXGBE')/i\if dpdk_conf.has('RTE_NET_ICE')\n\tdeps += ['net_ice', 'net_iavf']\nendif" app/test-pmd/meson.build""", "sed -i '/#include /a\#include ' app/test-pmd/util.c", - "sed -i '/if (ol_flags & PKT_RX_RSS_HASH)/i\ rte_pmd_ifd_dump_proto_xtr_metadata(mb);' app/test-pmd/util.c", + "sed -i '/if (ol_flags & RTE_MBUF_F_RX_RSS_HASH)/i\ rte_pmd_ifd_dump_proto_xtr_metadata(mb);' app/test-pmd/util.c", ] [self.dut.send_expect(cmd, "#", 15, alt_session=True) for cmd in cmds] + check_point = { + "app/test-pmd/meson.build": [ + "deps += ['net_ice', 'net_iavf']", + "if dpdk_conf.has('RTE_NET_ICE')" + ], + "app/test-pmd/util.c": [ + "#include ", + "rte_pmd_ifd_dump_proto_xtr_metadata(mb);" + ] + } + for path, cmds in check_point.items(): + for cmd in cmds: + self.check_modify_dpdk_code(cmd, path) self.dut.build_install_dpdk(self.dut.target) + def check_modify_dpdk_code(self, cmd, path): + """ + check dpdk code modify successful + """ + check_cmd = """grep "{}" {}""".format(cmd, path) + out = self.dut.send_expect(check_cmd, "# ", 15, alt_session=True, trim_whitespace=False) + self.verify(out, "The dpdk code not changed") + def restore_compilation(self): """ Resume editing operation. -- 2.17.1