diff mbox series

examples/vm_power_manager: remove vm channel number check

Message ID 20210421104534.17768-1-reshma.pattan@intel.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series examples/vm_power_manager: remove vm channel number check | expand

Checks

Context Check Description
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-testing fail Testing issues
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

Pattan, Reshma April 21, 2021, 10:45 a.m. UTC
VM channel number should not be validated against the
host vm_power_manager coremask core indexes, as VM
cores need not to be same as host cores.
So remove this check, to allow all the vm channels
to be added successfully.

Fixes: b49c677a0d24 ("examples/vm_power: respect core mask")
Cc: david.hunt@intel.com
Cc: stable@dpdk.org

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 examples/vm_power_manager/channel_manager.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

David Hunt April 23, 2021, 8:56 a.m. UTC | #1
On 21/4/2021 11:45 AM, Reshma Pattan wrote:
> VM channel number should not be validated against the
> host vm_power_manager coremask core indexes, as VM
> cores need not to be same as host cores.
> So remove this check, to allow all the vm channels
> to be added successfully.
>
> Fixes: b49c677a0d24 ("examples/vm_power: respect core mask")
> Cc: david.hunt@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---
>   examples/vm_power_manager/channel_manager.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
> index 458e37167..fe9156785 100644
> --- a/examples/vm_power_manager/channel_manager.c
> +++ b/examples/vm_power_manager/channel_manager.c
> @@ -454,9 +454,6 @@ add_all_channels(const char *vm_name)
>   					CHANNEL_MGR_SOCKET_PATH, dir->d_name);
>   			continue;
>   		}
> -		if (rte_lcore_index(channel_num) == -1)
> -			continue;
> -
>   		/* if channel has not been added previously */
>   		if (channel_exists(vm_info, channel_num))
>   			continue;
> @@ -514,9 +511,6 @@ add_channels(const char *vm_name, unsigned *channel_list,
>   	}
>   
>   	for (i = 0; i < len_channel_list; i++) {
> -		if (rte_lcore_index(i) == -1)
> -			continue;
> -
>   		if (channel_list[i] >= RTE_MAX_LCORE) {
>   			RTE_LOG(INFO, CHANNEL_MANAGER, "Channel(%u) is out of range "
>   							"0...%d\n", channel_list[i],


Thanks, Reshma.

The rte_lcore_index() call was incorrectly comparing virtual core_id 
against the list of physical core_ids.

Reviewed-by: David Hunt <david.hunt@intel.com>
Thomas Monjalon May 5, 2021, 9:41 p.m. UTC | #2
23/04/2021 10:56, David Hunt:
> 
> On 21/4/2021 11:45 AM, Reshma Pattan wrote:
> > VM channel number should not be validated against the
> > host vm_power_manager coremask core indexes, as VM
> > cores need not to be same as host cores.
> > So remove this check, to allow all the vm channels
> > to be added successfully.
> >
> > Fixes: b49c677a0d24 ("examples/vm_power: respect core mask")
> > Cc: david.hunt@intel.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> 
> Thanks, Reshma.
> 
> The rte_lcore_index() call was incorrectly comparing virtual core_id 
> against the list of physical core_ids.
> 
> Reviewed-by: David Hunt <david.hunt@intel.com>

Applied, thanks
diff mbox series

Patch

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 458e37167..fe9156785 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -454,9 +454,6 @@  add_all_channels(const char *vm_name)
 					CHANNEL_MGR_SOCKET_PATH, dir->d_name);
 			continue;
 		}
-		if (rte_lcore_index(channel_num) == -1)
-			continue;
-
 		/* if channel has not been added previously */
 		if (channel_exists(vm_info, channel_num))
 			continue;
@@ -514,9 +511,6 @@  add_channels(const char *vm_name, unsigned *channel_list,
 	}
 
 	for (i = 0; i < len_channel_list; i++) {
-		if (rte_lcore_index(i) == -1)
-			continue;
-
 		if (channel_list[i] >= RTE_MAX_LCORE) {
 			RTE_LOG(INFO, CHANNEL_MANAGER, "Channel(%u) is out of range "
 							"0...%d\n", channel_list[i],