From patchwork Thu Mar 3 14:36:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tadhg Kearney X-Patchwork-Id: 108519 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 712C4A0351; Thu, 3 Mar 2022 15:36:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40BF24276B; Thu, 3 Mar 2022 15:36:07 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id ECE4540687 for ; Thu, 3 Mar 2022 15:36:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646318165; x=1677854165; h=from:to:cc:subject:date:message-id; bh=Uc+6uXJuirvE0ELz1tLQWImVcWMQnKe5gWI83WirJSQ=; b=ght0G4P0jR59IHt2ovMbfENAk2ivW+efIScRhAt9cOxYiViqzg6ukxZO IZwOB6r0PMIlVeIs+yTABsc8f1oipDV9APJIm8SSg/FmQNqjYbb1n5YiC S6AOfMkMkjFkPf+KeyIwg1ThRBBuGKEG83DoLBdyylJDw3JPeCv5h3LKP tDNh+agL+XkExWpKlMkp0T2+2vDrsPDlHwSczTQ5/yCqLFj0AQkgSVZaj XiUOR217cDq4THdWtfix09LdHYPlAXg4DMy86aZzaRimLsfsDhRx+Fk0Z b7b9Y84CJnFM7OpRoQ/rSn4jrw5xrPVV74inIfUYj2g/qLY5tbf+n6zby w==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="278371515" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="278371515" MIME-Version: 1.0 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 06:36:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="508611647" Received: from silpixa00401183.ir.intel.com ([10.55.129.105]) by orsmga002.jf.intel.com with ESMTP; 03 Mar 2022 06:36:02 -0800 From: Tadhg Kearney To: dts@dpdk.org Cc: reshma.pattan@intel.com, Tadhg Kearney Subject: [dts][V3] test_plans/*: modify power test plans to adapt meson build Date: Thu, 3 Mar 2022 14:36:00 +0000 Message-Id: <20220303143600.826855-1-tadhg.kearney@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: Tadhg Kearney Acked-by: Reshma Pattan --- .../power_bidirection_channel_test_plan.rst | 16 ++++----- test_plans/power_branch_ratio_test_plan.rst | 6 ++-- test_plans/power_empty_poll_test_plan.rst | 4 +-- test_plans/power_negative_test_plan.rst | 30 ++++++++-------- test_plans/power_pbf_test_plan.rst | 8 ++--- test_plans/power_pstate_test_plan.rst | 4 +-- test_plans/power_telemetry_test_plan.rst | 2 +- test_plans/vm_power_manager_test_plan.rst | 14 ++++---- test_plans/vm_pw_mgmt_policy_test_plan.rst | 36 ++++++++++--------- 9 files changed, 62 insertions(+), 58 deletions(-) diff --git a/test_plans/power_bidirection_channel_test_plan.rst b/test_plans/power_bidirection_channel_test_plan.rst index a6df6597..319c0a75 100644 --- a/test_plans/power_bidirection_channel_test_plan.rst +++ b/test_plans/power_bidirection_channel_test_plan.rst @@ -59,7 +59,7 @@ Step 1. Launch VM using libvirt:: Step 2. Launch VM power manager example on the host to monitor the channel from VM:: - ./examples/vm_power_manager/build/vm_power_mgr -c 0xfffe -n 4 --no-pci + .//examples/dpdk-vm_power_manager -c 0xfffe -n 4 --no-pci vmpower> add_vm [vm name] vmpower> add_channels [vm name] all vmpower> set_channel_status [vm name] all enabled @@ -71,9 +71,9 @@ Step 2. Launch VM power manager example on the host to monitor the channel from vmpower> set_channel_status ubuntu all enabled vmpower> show_vm ubuntu -Step 3. In the VM, launch guest_vm_power_mgr to set and send the power manager policy to the host power example:: +Step 3. In the VM, launch dpdk-guest_cli to set and send the power manager policy to the host power example:: - ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr -c 0xfe -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7 + .//examples/dpdk-guest_cli -c 0xfe -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7 Send command to the core 7 on host APP: vmpower(guest)> set_cpu_freq 7 down @@ -100,14 +100,14 @@ Step 1. Launch VM using libvirt:: Step 2. Launch VM power manager example on the host to monitor the channel from VM:: - ./examples/vm_power_manager/build/vm_power_mgr -c 0xfffe -n 4 --no-pci + .//examples/dpdk-vm_power_manager -c 0xfffe -n 4 --no-pci vmpower> add_vm [vm name] vmpower> add_channels [vm name] all vmpower> set_channel_status [vm name] all enabled vmpower> show_vm [vm name] vmpower> set_query -Step 3. Enable the query permission for target VM from host vm_power_mgr example:: +Step 3. Enable the query permission for target VM from host dpdk-vm_power_manager example:: Command format: set_query if vm name is ubuntu,command as following: @@ -115,7 +115,7 @@ Step 3. Enable the query permission for target VM from host vm_power_mgr example Step 4. Query the CPU frequency for all CPU cores from VM side:: - ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr -c 0xfe -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7 + .//examples/dpdk-guest_cli -c 0xfe -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7 vmpower> query_cpu_freq | all Check vcpu 0~7 frequency info will be returned, for example: @@ -130,7 +130,7 @@ Step 4. Query the CPU frequency for all CPU cores from VM side:: Step 5. Disable query permission from VM, check the host CPU frequency won't be returned:: - at host side, disable query permission by vm_power_mgr example: + at host side, disable query permission by dpdk-vm_power_manager example: vmpower> set_query ubuntu disable at VM side, query CPU frequency again, this action should not be executed successfully, log as following: @@ -164,7 +164,7 @@ Step 5: Query CPU capability for core out of scope, check no CPU info will be re Step 6: Disable query permission from VM, check the host CPU capability won't be returned:: - at host side, disable query permission by vm_power_mgr example: + at host side, disable query permission by dpdk-vm_power_manager example: vmpower> set_query ubuntu disable at VM side, query CPU capability again, this action should not be executed successfully, log as following: diff --git a/test_plans/power_branch_ratio_test_plan.rst b/test_plans/power_branch_ratio_test_plan.rst index daecc133..4bbf95af 100644 --- a/test_plans/power_branch_ratio_test_plan.rst +++ b/test_plans/power_branch_ratio_test_plan.rst @@ -58,17 +58,17 @@ no_turbo_max=$(rdmsr -p 2 0x0CE -f 15:8 -d)00000 Test Case 1 : Set Branch-Ratio Test Rate by User ==================================================================================== 1. Launch VM power manager sample on the host to run branch monitor. -./x86_64-native-linuxapp-gcc/examples/dpdk-vm_power_manager -v -c 0xe -n 1 -m 1024 --no-pci -- --core-branch-ratio=1-3:0.3 +.//examples/dpdk-vm_power_manager -v -c 0xe -n 1 -m 1024 --no-pci -- --core-branch-ratio=1-3:0.3 2. Launch testpmd with fwd io mode:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 1 -m 1024 --file-prefix=vmpower2 -- -i + .//app/dpdk-testpmd -v -c 0x6 -n 1 -m 1024 --file-prefix=vmpower2 -- -i > start 3. Inject packet with packet generator to the NIC, with line rate, check the branch ratio and the related CPU frequency, in this case, the core 2 will be used by testpmd as worker core, branch ratio will be shown as -following in vm_power_mgr's log output:: +following in dpdk-vm_power_manager's log output:: 1: 0.0048 {250065} {20001} 0: 0.0307 {35782} {20000} diff --git a/test_plans/power_empty_poll_test_plan.rst b/test_plans/power_empty_poll_test_plan.rst index 44728308..f18a483a 100644 --- a/test_plans/power_empty_poll_test_plan.rst +++ b/test_plans/power_empty_poll_test_plan.rst @@ -124,7 +124,7 @@ Test Case1 : Basic Training mode test based on one NIC with l3fwd-power ======================================================================= Step 1. Bind One NIC to DPDK driver, launch l3fwd-power with empty-poll enabled - ./l3fwd-power -l 1-2 -n 4 -- -p 0x1 -P --config="(0,0,2)" --empty-poll="1,0,0" -l 10 -m 6 -h 1 + .//examples/dpdk-l3fwd-power -l 1-2 -n 4 -- -p 0x1 -P --config="(0,0,2)" --empty-poll="1,0,0" -l 10 -m 6 -h 1 Step 2. Check the log also when changing the inject packet rate as following: @@ -139,6 +139,6 @@ Test Case2: No-Training mode test based on one NIC with l3fwd-power =================================================================== Step 1. Bind One NIC to DPDK driver, launch l3fwd-power with empty-poll enabled - ./l3fwd-power -l 1-2 -n 4 -- -p 0x1 -P --config="(0,0,2)" --empty-poll="0,350000,500000" -l 10 -m 6 -h 1 + .//examples/dpdk-l3fwd-power -l 1-2 -n 4 -- -p 0x1 -P --config="(0,0,2)" --empty-poll="0,350000,500000" -l 10 -m 6 -h 1 Step 2. Check no training steps are executed in sample's launch log. diff --git a/test_plans/power_negative_test_plan.rst b/test_plans/power_negative_test_plan.rst index bf2cfebf..1ca7e1ef 100644 --- a/test_plans/power_negative_test_plan.rst +++ b/test_plans/power_negative_test_plan.rst @@ -46,18 +46,18 @@ Preparation work Test Case1: Inject Malformed JSON Command file to fifo channel =============================================================== -Step 1. Create powermonitor fold for vm_power_manager sample:: +Step 1. Create powermonitor fold for dpdk-vm_power_manager sample:: mkdir /tmp/powermonitor chmod 777 /tmp/powermonitor Step 2. Luanch VM power manager sample:: - ./x86_64-native-linuxapp-gcc/examples/dpdk-vm_power_manager -l 1-3 -n 4 --file-prefix=test1 --no-pci + .//examples/dpdk-vm_power_manager -l 1-3 -n 4 --file-prefix=test1 --no-pci Step 3. Prepare policy in JSON format then send it to the fifo channel: Prepare different command in JSON format then send it to the fifo channel - Modify "name", "resource_id", "command" to large character string to check if the vm_power_mgr sample will crash + Modify "name", "resource_id", "command" to large character string to check if the dpdk-vm_power_manager sample will crash For example:: {"policy": { @@ -71,20 +71,20 @@ Step 4. Send Json format command to the fifo channel:: cat command.json > /tmp/powermonitor/fifo22 -Check point: no crash at the vm_power_mgr application side. +Check point: no crash at the dpdk-vm_power_manager application side. Potential issue: no warning for the user for the name too long, now is char[32], but no crash as strlcpy is uesed Test Case2: Send invalid command through JSON channel ====================================================== -Step 1. Create powermonitor fold for vm_power_manager sample:: +Step 1. Create powermonitor fold for dpdk-vm_power_manager sample:: mkdir /tmp/powermonitor chmod 777 /tmp/powermonitor Step 2. Luanch VM power manager sample:: - ./x86_64-native-linuxapp-gcc/examples/dpdk-vm_power_manager -l 1-3 -n 4 --file-prefix=test1 --no-pci + .//examples/dpdk-vm_power_manager -l 1-3 -n 4 --file-prefix=test1 --no-pci Step 3. Prepare policy in JSON format then send it to the fifo channel: @@ -118,22 +118,22 @@ Note: For the VM xml file which will be used for creating the VM, it can re-use Step 2. Luanch VM power manager sample on the host to monitor the channel from VM:: - ./x86_64-native-linuxapp-gcc/examples/dpdk-vm_power_manager -l 12-14 -n 4 --no-pci + .//examples/dpdk-vm_power_manager -l 12-14 -n 4 --no-pci > add_vm [vm name] > add_channels [vm name] all > set_channel_status [vm name] all enabled > show_vm [vm name] - Check the invalid input command for vm_power_mgr sample:: + Check the invalid input command for dpdk-vm_power_manager sample:: > add_channels ubuntu 128 > add_channel ubuntu 10000000000000000 -Check point: No crash should be occur at vm_power_mgr sample +Check point: No crash should be occur at dpdk-vm_power_manager sample -Step 3. In the VM, launch guest_vm_power_mgr to set and send the power manager policy to the host power sample:: +Step 3. In the VM, launch dpdk-guest_cli to set and send the power manager policy to the host power sample:: - ./x86_64-native-linuxapp-gcc/examples/dpdk-guest_cli -c 0xff -n 4 -m 1024 --no-pci --file-prefix=yaolei \ + .//examples/dpdk-guest_cli -c 0xff -n 4 -m 1024 --no-pci --file-prefix=yaolei \ -- --vm-name=ubuntu --vcpu-list=0-7 > set_cpu_freq 128 down > set_cpu_freq 1000000000000 down @@ -146,14 +146,14 @@ Step 3. In the VM, launch guest_vm_power_mgr to set and send the power manager p Test Case4: TRAFFIC Policy Test based on JSON configure file with large integer number ======================================================================================== -Step 1. Generate 1 VF under vfio-pci driver, launch vm_power_mgr sample with PF, for example:: +Step 1. Generate 1 VF under vfio-pci driver, launch dpdk-vm_power_manager sample with PF, for example:: echo 1 > /sys/bus/pci/drivers/vfio-pci/0000\:82\:00.0/max_vfs - ./x86_64-native-linuxapp-gcc/examples/dpdk-vm_power_manager -l 1-4 -n 4 --socket-mem=1024,1024 --file-prefix=test1 -a 82:00.0 -- -p 0x01 + .//examples/dpdk-vm_power_manager -l 1-4 -n 4 --socket-mem=1024,1024 --file-prefix=test1 -a 82:00.0 -- -p 0x01 Step 2. Launch testpmd with VF:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --socket-mem=1024,1024 --file-prefix=test2 -a 0000:82:02.0 -- -i + .//app/dpdk-testpmd -l 5-6 -n 4 --socket-mem=1024,1024 --file-prefix=test2 -a 0000:82:02.0 -- -i > set fwd macswap > start @@ -172,4 +172,4 @@ Step 4. Send Json format command to the fifo channel:: cat traffic.json > /tmp/powermonitor/fifo6 -Check point: No crash should be occur at vm_power_mgr sample +Check point: No crash should be occur at dpdk-vm_power_manager sample diff --git a/test_plans/power_pbf_test_plan.rst b/test_plans/power_pbf_test_plan.rst index 6a38fc61..ad8ea1f2 100644 --- a/test_plans/power_pbf_test_plan.rst +++ b/test_plans/power_pbf_test_plan.rst @@ -59,7 +59,7 @@ Step 1. Create powermonitor fold for:: Step 2. Compile DPDK with Power Lib debug info on, then Luanch VM power manager sample:: - ./examples/vm_power_manager/build/vm_power_mgr -l 1-46 -n 4 --file-prefix=power --no-pci + .//examples/dpdk-vm_power_manager -l 1-46 -n 4 --file-prefix=power --no-pci Check two different base_max frequency will be shown in log, for example on Intel 6230N Processor: The log will be like as following @@ -87,7 +87,7 @@ Step 1. Create powermonitor fold for:: Step 2. Compile DPDK with Power Lib debug info on, then aunch VM power manager sample:: - ./examples/vm_power_manager/build/vm_power_mgr -l 1-46 -n 4 --file-prefix=power --no-pci + .//examples/dpdk-vm_power_manager -l 1-46 -n 4 --file-prefix=power --no-pci Step 3. Prepare different command in JSON format:: @@ -102,7 +102,7 @@ Step 3. Prepare different command in JSON format:: Step 4: Send different command to power sample, then check the frequency:: Command Steps: ENABLE_TURBO-> SCALE_MAX-> SCALE_DOWN-> SCALE_MIN - Send action JSON file to vm_power_mgr's fifo channel, each core will have it's own channel: + Send action JSON file to dpdk-vm_power_manager's fifo channel, each core will have it's own channel: cat command.json >/tmp/powermonitor/fifo{core_number} Check the CPU frequency is changed accordingly in previous list by following method: @@ -129,7 +129,7 @@ Step 1. Create powermonitor fold for:: Step 2. Compile DPDK with Power Lib debug info on, then launch VM power manager sample:: - ./examples/vm_power_manager/build/vm_power_mgr -l 1-46 -n 4 --file-prefix=power --no-pci + .//examples/dpdk-vm_power_manager -l 1-46 -n 4 --file-prefix=power --no-pci Step 3. Prepare Several command in JSON format then send it to the fifo channel for the high priority core:: diff --git a/test_plans/power_pstate_test_plan.rst b/test_plans/power_pstate_test_plan.rst index f2a5e199..7bdd43b6 100644 --- a/test_plans/power_pstate_test_plan.rst +++ b/test_plans/power_pstate_test_plan.rst @@ -53,7 +53,7 @@ no_turbo_max = [rdmsr -p 1 0x0CE -f 15:8 -d]00000 Note: For Intel Processor, If "Hyper Threading" enabled in BIOS, need change frequency on both HT core at the same time to let the frequency take effect. -From DPDK 19.08, vm_power_manager will set fifo channel for each core. +From DPDK 19.08, dpdk-vm_power_manager will set fifo channel for each core. Before DPDK 19.08, all core will share 1 fifo channel Test Case1 : Test Pstate lib basic action based on directly power command @@ -64,7 +64,7 @@ Step 1. Create powermonitor fold for:: Step 2. Luanch VM power manager sample:: - ./examples/vm_power_manager/build/vm_power_mgr -l 1-4 -n 4 --file-prefix=power --no-pci + .//examples/dpdk-vm_power_manager -l 1-4 -n 4 --file-prefix=power --no-pci Step 3. Prepare different command in JSON format then send it to the fifo channel:: diff --git a/test_plans/power_telemetry_test_plan.rst b/test_plans/power_telemetry_test_plan.rst index fd27f8a1..0afb0f77 100644 --- a/test_plans/power_telemetry_test_plan.rst +++ b/test_plans/power_telemetry_test_plan.rst @@ -63,7 +63,7 @@ Test Case 1 : Check all 3 type of power related info reported by Telemetry Syste ================================================================================= 1. Launch l3fwd-power sample with telemetry enabled, bind one NIC to DPDK driver, launch l3fwd-power:: - ./l3fwd-power -l 1-2 -n 4 --telemetry -- -p 0x1 -P --config="(0,0,2)" --telemetry + .//examples/dpdk-l3fwd-power -l 1-2 -n 4 --telemetry -- -p 0x1 -P --config="(0,0,2)" --telemetry 2. Get the telemetry info using dpdk-telemetry-client.py script, then choose mode 3 ``Send for global Metrics``:: diff --git a/test_plans/vm_power_manager_test_plan.rst b/test_plans/vm_power_manager_test_plan.rst index cc78998b..f85d2ef9 100644 --- a/test_plans/vm_power_manager_test_plan.rst +++ b/test_plans/vm_power_manager_test_plan.rst @@ -121,15 +121,15 @@ Test Case 1: VM Power Management Channel
-3. Run power-manager in Host:: +3. Run dpdk-guest_cli in Host:: - x86_64-native-linuxapp-gcc/examples/dpdk-guest_cli -c 0x3 -n 4 + .//examples/dpdk-guest_cli -c 0x3 -n 4 -4. Startup VM and run guest_vm_power_mgr:: +4. Startup VM and run dpdk-guest_cli:: - x86_64-native-linuxapp-gcc/examples/dpdk-guest_cli -c 0x1f -n 4 -- -i + .//examples/dpdk-guest_cli -c 0x1f -n 4 -- -i -5. Add vm in host and check vm_power_mgr can get frequency normally:: +5. Add vm in host and check dpdk-vm_power_manager can get frequency normally:: vmpower> add_vm vmpower> add_channels all @@ -153,9 +153,9 @@ Test Case 1: VM Power Management Channel [3]: Physical CPU Mask 0x10 [4]: Physical CPU Mask 0x20 -7. Run vm_power_mgr in vm:: +7. Run dpdk-guest_cli in vm:: - x86_64-native-linuxapp-gcc/examples/dpdk-guest_cli -c 0x1f -n 4 + .//examples/dpdk-guest_cli -c 0x1f -n 4 Check monitor channel for all cores has been connected. diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst b/test_plans/vm_pw_mgmt_policy_test_plan.rst index 98894ff5..4237583f 100644 --- a/test_plans/vm_pw_mgmt_policy_test_plan.rst +++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst @@ -168,11 +168,13 @@ Set up testing environment #. Compile and run power-manager in host, core number should >= 3, add vm in host. - export RTE_SDK=`pwd` - export RTE_TARGET=x86_64-native-linuxapp-gcc - make -C examples/vm_power_manager + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static + ninja -C - ./examples/vm_power_manager/build/vm_power_mgr -c 0xffff -n 4 + meson configure -Dexamples=vm_power_manager + ninja -C + + .//examples/dpdk-vm_power_manager -c 0xffff -n 4 vmpower> add_vm vmpower> add_channels all @@ -181,20 +183,22 @@ Set up testing environment #. Run testpmd on vm0 when do traffic policy testing, other test cases ignore this step. - ./testpmd -c 0x3 -n 1 -v -m 1024 --file-prefix=vmpower1 -- -i --port-topology=loop + .//app/dpdk-testpmd -c 0x3 -n 1 -v -m 1024 --file-prefix=vmpower1 -- -i --port-topology=loop testpmd> set fwd mac testpmd> set promisc all on testpmd> port start all testpmd> start -#. Compile and run guest_vm_power_mgr on VM. +#. Compile and run dpdk-guest_cli on VM. + + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static + ninja -C - export RTE_SDK=`pwd` - export RTE_TARGET=x86_64-native-linuxapp-gcc - make -C examples/vm_power_manager/guest_cli + meson configure -Dexamples=vm_power_manager/guest_cli + ninja -C - ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr \ + .//examples/dpdk-guest_cli \ -c 0xff -n 4 --file-prefix=vmpower2 -- -i --vm-name= \ --policy= --vcpu-list= --busy-hours=