test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH 1/4] conf/power_pstate: change core
@ 2021-04-07  8:18 Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 2/4] tests/power_bidirection_channel: change core masks Reshma Pattan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Reshma Pattan @ 2021-04-07  8:18 UTC (permalink / raw)
  To: dts; +Cc: Reshma Pattan

Now with dpdk 20.11, vm_power_manager only grants access
to the cores listed in its coremask, so change core number
to be the one from vm_power_mgr core mask.

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>
---
 conf/power_pstate.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/power_pstate.cfg b/conf/power_pstate.cfg
index 269dcc2b..228e0829 100644
--- a/conf/power_pstate.cfg
+++ b/conf/power_pstate.cfg
@@ -1,2 +1,2 @@
 [suite]
-check_core = 20
\ No newline at end of file
+check_core = 4
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 2/4] tests/power_bidirection_channel: change core masks
  2021-04-07  8:18 [dts] [PATCH 1/4] conf/power_pstate: change core Reshma Pattan
@ 2021-04-07  8:18 ` Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 3/4] tests/power_pbf: change core mask Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask Reshma Pattan
  2 siblings, 0 replies; 7+ messages in thread
From: Reshma Pattan @ 2021-04-07  8:18 UTC (permalink / raw)
  To: dts; +Cc: Reshma Pattan

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 --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',
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 3/4] tests/power_pbf: change core mask
  2021-04-07  8:18 [dts] [PATCH 1/4] conf/power_pstate: change core Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 2/4] tests/power_bidirection_channel: change core masks Reshma Pattan
@ 2021-04-07  8:18 ` Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask Reshma Pattan
  2 siblings, 0 replies; 7+ messages in thread
From: Reshma Pattan @ 2021-04-07  8:18 UTC (permalink / raw)
  To: dts; +Cc: Reshma Pattan

Change the vm_power_manager core mask to accommodate
maximum cores to allow the access to any core
information requested by guest_cli application.

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>
---
 test_plans/power_pbf_test_plan.rst | 6 +++---
 tests/TestSuite_power_pbf.py       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test_plans/power_pbf_test_plan.rst b/test_plans/power_pbf_test_plan.rst
index a8046244..6a38fc61 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-4 -n 4 --file-prefix=power --no-pci
+    ./examples/vm_power_manager/build/vm_power_mgr -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-4 -n 4 --file-prefix=power --no-pci
+    ./examples/vm_power_manager/build/vm_power_mgr -l 1-46 -n 4 --file-prefix=power --no-pci
 
 Step 3. Prepare different command in JSON format::
 
@@ -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-4 -n 4 --file-prefix=power --no-pci
+ ./examples/vm_power_manager/build/vm_power_mgr -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/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py
index 6109a3bf..c3e2075c 100644
--- a/tests/TestSuite_power_pbf.py
+++ b/tests/TestSuite_power_pbf.py
@@ -166,7 +166,7 @@ class TestPowerPbf(TestCase):
         if self.is_mgr_on:
             return
         bin_file = os.sep.join([self.target_dir, ''])
-        config = "1S/4C/1T"
+        config = "2S/23C/1T"
         option = '-v -c {0} -n {1} --file-prefix=vmpower --no-pci'.format(
             self.get_cores_mask(config),
             self.memory_channels)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask
  2021-04-07  8:18 [dts] [PATCH 1/4] conf/power_pstate: change core Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 2/4] tests/power_bidirection_channel: change core masks Reshma Pattan
  2021-04-07  8:18 ` [dts] [PATCH 3/4] tests/power_pbf: change core mask Reshma Pattan
@ 2021-04-07  8:18 ` Reshma Pattan
  2021-04-08  8:55   ` Tu, Lijuan
  2 siblings, 1 reply; 7+ messages in thread
From: Reshma Pattan @ 2021-04-07  8:18 UTC (permalink / raw)
  To: dts; +Cc: Reshma Pattan

Change the vm_power_manager core mask and guest_vm_power_manager
core mask.

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>
---
 test_plans/vm_pw_mgmt_policy_test_plan.rst | 4 ++--
 tests/TestSuite_vm_pw_mgmt_policy.py       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst b/test_plans/vm_pw_mgmt_policy_test_plan.rst
index cfbfe962..98894ff5 100644
--- a/test_plans/vm_pw_mgmt_policy_test_plan.rst
+++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst
@@ -172,7 +172,7 @@ Set up testing environment
     export RTE_TARGET=x86_64-native-linuxapp-gcc
     make -C examples/vm_power_manager
 
-   ./examples/vm_power_manager/build/vm_power_mgr -c 0x7 -n 4
+   ./examples/vm_power_manager/build/vm_power_mgr -c 0xffff -n 4
 
     vmpower> add_vm <vm_name>
     vmpower> add_channels <vm_name> all
@@ -195,7 +195,7 @@ Set up testing environment
     make -C examples/vm_power_manager/guest_cli
 
    ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr \
-   -c 0x1f -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
+   -c 0xff -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
    --policy=<policy name> --vcpu-list=<vcpus list> --busy-hours=<time stage>
 
     options description::
diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py b/tests/TestSuite_vm_pw_mgmt_policy.py
index 9abcafd2..ac746180 100644
--- a/tests/TestSuite_vm_pw_mgmt_policy.py
+++ b/tests/TestSuite_vm_pw_mgmt_policy.py
@@ -348,7 +348,7 @@ class TestVmPwMgmtPolicy(TestCase):
             '-v '
             '-c {core_mask} '
             '-n {mem_channel} ').format(**{
-                'core_mask': self.get_cores_mask("1S/3C/1T"),
+                'core_mask': '0xffff',
                 'mem_channel': self.dut.get_memory_channels(), })
         prompt = 'vmpower>'
         cmd = [' '.join([self.vm_power_mgr, eal_option]), prompt, 30]
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask
  2021-04-07  8:18 ` [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask Reshma Pattan
@ 2021-04-08  8:55   ` Tu, Lijuan
  2021-04-08  9:14     ` Pattan, Reshma
  0 siblings, 1 reply; 7+ messages in thread
From: Tu, Lijuan @ 2021-04-08  8:55 UTC (permalink / raw)
  To: Pattan, Reshma, dts; +Cc: Pattan, Reshma



> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Reshma Pattan
> Sent: 2021年4月7日 16:18
> To: dts@dpdk.org
> Cc: Pattan, Reshma <reshma.pattan@intel.com>
> Subject: [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change
> core_mask
> 
> Change the vm_power_manager core mask and guest_vm_power_manager
> core mask.
> 
> 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>
> ---
>  test_plans/vm_pw_mgmt_policy_test_plan.rst | 4 ++--
>  tests/TestSuite_vm_pw_mgmt_policy.py       | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst
> b/test_plans/vm_pw_mgmt_policy_test_plan.rst
> index cfbfe962..98894ff5 100644
> --- a/test_plans/vm_pw_mgmt_policy_test_plan.rst
> +++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst
> @@ -172,7 +172,7 @@ Set up testing environment
>      export RTE_TARGET=x86_64-native-linuxapp-gcc
>      make -C examples/vm_power_manager
> 
> -   ./examples/vm_power_manager/build/vm_power_mgr -c 0x7 -n 4
> +   ./examples/vm_power_manager/build/vm_power_mgr -c 0xffff -n 4
> 
>      vmpower> add_vm <vm_name>
>      vmpower> add_channels <vm_name> all @@ -195,7 +195,7 @@ Set up
> testing environment
>      make -C examples/vm_power_manager/guest_cli
> 
>     ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr \
> -   -c 0x1f -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
> +   -c 0xff -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
>     --policy=<policy name> --vcpu-list=<vcpus list> --busy-hours=<time stage>
> 
>      options description::
> diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py
> b/tests/TestSuite_vm_pw_mgmt_policy.py
> index 9abcafd2..ac746180 100644
> --- a/tests/TestSuite_vm_pw_mgmt_policy.py
> +++ b/tests/TestSuite_vm_pw_mgmt_policy.py
> @@ -348,7 +348,7 @@ class TestVmPwMgmtPolicy(TestCase):
>              '-v '
>              '-c {core_mask} '
>              '-n {mem_channel} ').format(**{
> -                'core_mask': self.get_cores_mask("1S/3C/1T"),
> +                'core_mask': '0xffff',

Some server may not have so many cores, prefer to get_cores_mask("all") if need many cores.

>                  'mem_channel': self.dut.get_memory_channels(), })
>          prompt = 'vmpower>'
>          cmd = [' '.join([self.vm_power_mgr, eal_option]), prompt, 30]
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask
  2021-04-08  8:55   ` Tu, Lijuan
@ 2021-04-08  9:14     ` Pattan, Reshma
  2021-04-12  5:16       ` Tu, Lijuan
  0 siblings, 1 reply; 7+ messages in thread
From: Pattan, Reshma @ 2021-04-08  9:14 UTC (permalink / raw)
  To: Tu, Lijuan, dts



> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> 
> > Cc: Pattan, Reshma <reshma.pattan@intel.com>
> > -                'core_mask': self.get_cores_mask("1S/3C/1T"),
> > +                'core_mask': '0xffff',
> 
> Some server may not have so many cores, prefer to get_cores_mask("all") if
> need many cores.

AFAIK, get_cores_mask("all") will return all cores except the core0. I actually need the core0 too.
Is there any API that I can use which returns core 0 too, if not I might need to have this explicit core mask.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask
  2021-04-08  9:14     ` Pattan, Reshma
@ 2021-04-12  5:16       ` Tu, Lijuan
  0 siblings, 0 replies; 7+ messages in thread
From: Tu, Lijuan @ 2021-04-12  5:16 UTC (permalink / raw)
  To: Pattan, Reshma, dts



> -----Original Message-----
> From: Pattan, Reshma <reshma.pattan@intel.com>
> 
> > -----Original Message-----
> > From: Tu, Lijuan <lijuan.tu@intel.com>
> >
> > > Cc: Pattan, Reshma <reshma.pattan@intel.com>
> > > -                'core_mask': self.get_cores_mask("1S/3C/1T"),
> > > +                'core_mask': '0xffff',
> >
> > Some server may not have so many cores, prefer to
> > get_cores_mask("all") if need many cores.
> 
> AFAIK, get_cores_mask("all") will return all cores except the core0. I actually
> need the core0 too.
> Is there any API that I can use which returns core 0 too, if not I might need to
> have this explicit core mask.

Set bypass_core0=False, then DTS will utilize core 0.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-12  5:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07  8:18 [dts] [PATCH 1/4] conf/power_pstate: change core Reshma Pattan
2021-04-07  8:18 ` [dts] [PATCH 2/4] tests/power_bidirection_channel: change core masks Reshma Pattan
2021-04-07  8:18 ` [dts] [PATCH 3/4] tests/power_pbf: change core mask Reshma Pattan
2021-04-07  8:18 ` [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask Reshma Pattan
2021-04-08  8:55   ` Tu, Lijuan
2021-04-08  9:14     ` Pattan, Reshma
2021-04-12  5:16       ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).