From patchwork Sat Apr 2 08:46:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingya Han X-Patchwork-Id: 109101 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 E31DDA0501; Sat, 2 Apr 2022 10:46:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B674D4067E; Sat, 2 Apr 2022 10:46:12 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 4414B40143 for ; Sat, 2 Apr 2022 10:46:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648889171; x=1680425171; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EL1vdLN7TSgXG+P3swbfJJWWAEPMKxA9v5loK8hRcvg=; b=YqTaFo0JfklUH5G9QxftJpdOo1Vjw+N3aFrzD13hw6yPQtZVjCEWq94I aYQoG6pnOrErneEp7ud17M8KbJ3Iv0XbOzGabMldOury7Hq67djdyMiG6 3lx/tQTaowhIcdqF1Vp91W/HMu9Grm9CZvSrix1P05QW+Qir4aVh7Oq8m iYJa+HaMN4d58Mmg0pJ+sHsrMQWk29PQkIWdc9hOzUW94gp7c+BzVrNw0 pqLNdHp/W2W2APJeIemTGbzDn/rX7sZY1ynfk2g7GFVqMDmf/6LXm/Ye8 kpOcPJMtHxJhTo5woy0aaZcZFs5XV3wm7Q2yAz7yzcwgZZMfk7j0xjcoN g==; X-IronPort-AV: E=McAfee;i="6200,9189,10304"; a="259116897" X-IronPort-AV: E=Sophos;i="5.90,229,1643702400"; d="scan'208";a="259116897" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2022 01:46:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,229,1643702400"; d="scan'208";a="721138803" Received: from dpdk-lijuan-icelake2.sh.intel.com ([10.67.118.205]) by orsmga005.jf.intel.com with ESMTP; 02 Apr 2022 01:46:09 -0700 From: hanyingya To: dts@dpdk.org Cc: hanyingya Subject: [dts][PATCH V1]tests/efd: removed changing source code before meson build Date: Sat, 2 Apr 2022 08:46:06 +0000 Message-Id: <20220402084606.3777328-1-yingyax.han@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 Signed-off-by: hanyingya Acked-by: Lijuan Tu --- test_plans/efd_test_plan.rst | 3 ++- tests/TestSuite_efd.py | 15 ++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/test_plans/efd_test_plan.rst b/test_plans/efd_test_plan.rst index 3f2ef3a3..bb4043ad 100644 --- a/test_plans/efd_test_plan.rst +++ b/test_plans/efd_test_plan.rst @@ -138,7 +138,8 @@ This case will measure the performance based on flow numbers. Test Case: Load balancer performance based on value bits ----------------------------------------------------------------------- Modify different value size which must be between 1 and 32, and it need -set the '#define RTE_EFD_VALUE_NUM_BITS (value size)' in lib/librte_efd/rte_efd.h and rebuild dpdk. +to be configured with the ``-Dc_args=-DRTE_EFD_VALUE_NUM_BITS`` option +at compile time. This case will measure the performance based on value bits. diff --git a/tests/TestSuite_efd.py b/tests/TestSuite_efd.py index 282ce27e..107a8d55 100644 --- a/tests/TestSuite_efd.py +++ b/tests/TestSuite_efd.py @@ -159,23 +159,16 @@ class TestEFD(TestCase): # perf of different value bit lengths for val_bitnum in val_bitnums: # change value length and rebuild dpdk - self.dut.send_expect( - "sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (%d)/' lib/librte_efd/rte_efd.h" - % val_bitnum, - "#", - ) - self.dut.build_install_dpdk(self.target) + extra_options = "-Dc_args=-DRTE_EFD_VALUE_NUM_BITS=%d" % val_bitnum + self.dut.build_install_dpdk(self.target, extra_options=extra_options) self.build_server_node_efd() pps = self._efd_perf_evaluate(2, flow_num) self.result_table_add([val_bitnum, 2, "2M", pps]) self.result_table_print() - self.dut.send_expect( - "sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (8)/' lib/librte_efd/rte_efd.h", - "#", - ) - self.dut.build_install_dpdk(self.target) + extra_options = "-Dc_args=-DRTE_EFD_VALUE_NUM_BITS=8" + self.dut.build_install_dpdk(self.target, extra_options=extra_options) self.build_server_node_efd() def _efd_perf_evaluate(self, node_num, flow_num):