examples/vm_power_manager: remove vm channel number check
PATCH 1/1 examples/vm_power_manager: remove vm channel number check
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.
--- examples/vm_power_manager/channel_manager.c | 6 ------ 1 file changed, 6 deletions(-)
examples/vm_power_manager/channel_manager.c +0 -6
@@ -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],
Signature · 1 line
2.17.1
Quoted 30 lines · Reshma Pattan
VM channel number should not be validated against the host
vm_power_managercoremask 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.Signed-off-by Reshma Pattan <[email protected]>--- examples/vm_power_manager/channel_manager.c | 6 ------ 1 file changed, 6 deletions(-)examples/vm_power_manager/channel_manager.c +0
-3@@ -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 ;
examples/vm_power_manager/channel_manager.c add_channels(const char *vm_name, unsigned *channel_list, · line 516
Quoted 9 lines
examples/vm_power_manager/channel_manager.c +0
-3@@ -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.
Thomas Monjalon
Applied23/04/2021 10:56, David Hunt:
Quoted 12 lines · Reshma Pattan
Quoted 10 lines
VM channel number should not be validated against the host
vm_power_managercoremask 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.
Quoted 8 lines
Quoted 1 line
Signed-off-by Reshma Pattan <[email protected]>Thanks, Reshma.
The
rte_lcore_index()call was incorrectly comparing virtualcore_idagainst the list of physicalcore_ids.Reviewed-by David Hunt <[email protected]>
Applied, thanks