diff mbox series

[2/4] tests/power_bidirection_channel: change core masks

Message ID 20210407081807.29110-2-reshma.pattan@intel.com (mailing list archive)
State New
Headers show
Series [1/4] conf/power_pstate: change core | expand

Commit Message

Pattan, Reshma April 7, 2021, 8:18 a.m. UTC
Change the vm_power_manager and gues_cli app
core masks. Now with dpdk 20.11 the cores used for guest_cli
should be enabled in vm_power_manager core mask.
Otherwise vm_power_manager will not grant the access to
fetch the information for those cores missing in the coremask.

Relevant DPDK patch
https://patchwork.dpdk.org/project/dpdk/patch/20210115125250.22416-1-david.hunt@intel.com/

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 .../power_bidirection_channel_test_plan.rst   | 20 +++++++++----------
 tests/TestSuite_power_bidirection_channel.py  |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/test_plans/power_bidirection_channel_test_plan.rst b/test_plans/power_bidirection_channel_test_plan.rst
index e26a6033..a6df6597 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 -l 12-14 -n 4 --no-pci
+    ./examples/vm_power_manager/build/vm_power_mgr -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
@@ -73,7 +73,7 @@  Step 2. Launch VM power manager example on the host to monitor the channel from
 
 Step 3. In the VM, launch guest_vm_power_mgr 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 0xff -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7
+   ./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
 
     Send command to the core 7 on host APP:
     vmpower(guest)> set_cpu_freq 7 down
@@ -86,8 +86,8 @@  Step 3. In the VM, launch guest_vm_power_mgr to set and send the power manager p
 
 Step 4. Set frequency on core which is out of the VM's core scope::
 
-    For example, the vcpu range is 0-7, we set command to vcpu number 9 as following:
-    vmpower(guest)> set_cpu_freq 9 down
+    For example, the vcpu range is 0-7, we set command to vcpu number 8 as following:
+    vmpower(guest)> set_cpu_freq 8 down
     GUEST_CHANNEL: Channel is not connected
     Error sending message: Unknown error -1
 
@@ -100,7 +100,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 -l 12-14 -n 4 --no-pci
+    ./examples/vm_power_manager/build/vm_power_mgr -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
@@ -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 0xff -n 4 -m 1024 --no-pci --file-prefix=vm_power -- --vm-name=ubuntu --vcpu-list=0-7
+   ./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
     vmpower> query_cpu_freq <core_num> | all
 
     Check vcpu 0~7 frequency info will be returned, for example:
@@ -158,16 +158,16 @@  Step4: Query all the valid CPU core capability of host, check all cores' informa
 
 Step 5: Query CPU capability for core out of scope, check no CPU info will be return::
 
-    For example, the valid vcpu range is 0~7, query cpu capability of core 9 should return error as following:
-    vmpower(guest)> query_cpu_caps 9
+    For example, the valid vcpu range is 0~7, query cpu capability of core 8 should return error as following:
+    vmpower(guest)> query_cpu_caps 8
     Invalid parameter provided.
 
 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:
     vmpower> set_query ubuntu disable
-
+    
     at VM side, query CPU capability again, this action should not be executed successfully, log as following:
     vmpower(guest)> query_cpu_caps all
     GUEST_CLI: Error receiving message.
-    Error during capabilities reception.
\ No newline at end of file
+    Error during capabilities reception.
diff --git a/tests/TestSuite_power_bidirection_channel.py b/tests/TestSuite_power_bidirection_channel.py
index 05e135af..1aa02976 100644
--- a/tests/TestSuite_power_bidirection_channel.py
+++ b/tests/TestSuite_power_bidirection_channel.py
@@ -269,7 +269,7 @@  class TestPowerBidirectionChannel(TestCase):
             '-c {core_mask} '
             '-n {mem_channel} '
             '--no-pci ').format(**{
-                'core_mask': self.get_cores_mask("1S/3C/1T"),
+                'core_mask': self.get_cores_mask("1S/12C/1T"),
                 'mem_channel': self.dut.get_memory_channels(), })
         prompt = 'vmpower>'
         cmd = [' '.join([self.vm_power_mgr, option]), prompt, 30]
@@ -320,7 +320,7 @@  class TestPowerBidirectionChannel(TestCase):
             '-- '
             '--vm-name={vm_name} '
             '--vcpu-list={vpus} ').format(**{
-                'core_mask': '0xff',
+                'core_mask': '0xfe',
                 'memory_channel': self.vm_dut.get_memory_channels(),
                 'memory_size': 1024,
                 'file_prefix': 'vmpower1',