[1/2] eal: add missing call marking memory config complete

Message ID 1670287169-15325-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series enable lcores test on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Dec. 6, 2022, 12:39 a.m. UTC
  Memory configuration was not being marked as completed add the missing
call to rte_eal_init() for Windows.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/windows/eal.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Stephen Hemminger Dec. 14, 2022, 4:52 p.m. UTC | #1
On Mon,  5 Dec 2022 16:39:28 -0800
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:

> Memory configuration was not being marked as completed add the missing
> call to rte_eal_init() for Windows.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  lib/eal/windows/eal.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
> index adb929a..56fadc7 100644
> --- a/lib/eal/windows/eal.c
> +++ b/lib/eal/windows/eal.c
> @@ -462,6 +462,9 @@ enum rte_proc_type_t
>  	 */
>  	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);
>  	rte_eal_mp_wait_lcore();
> +
> +	eal_mcfg_complete();
> +
>  	return fctret;
>  }
>  

Should this have a Fixes tag?
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
  
David Marchand Dec. 15, 2022, 9:59 a.m. UTC | #2
On Tue, Dec 6, 2022 at 1:39 AM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Memory configuration was not being marked as completed add the missing
> call to rte_eal_init() for Windows.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

The change is ok.

The commitlog misses some context: I guess the point is to let
rte_thread_register work on Windows.
So we can mark this change as:
Fixes: 5c307ba2a5b1 ("eal: register non-EAL threads as lcores")

WDYT?


In any case, this change won't fix anything related to mp.
If mp is supported one day on Windows, other calls to eal_mcfg* would
be required.
  
Tyler Retzlaff Dec. 15, 2022, 6:07 p.m. UTC | #3
On Thu, Dec 15, 2022 at 10:59:07AM +0100, David Marchand wrote:
> On Tue, Dec 6, 2022 at 1:39 AM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > Memory configuration was not being marked as completed add the missing
> > call to rte_eal_init() for Windows.
> >
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> The change is ok.
> 
> The commitlog misses some context: I guess the point is to let
> rte_thread_register work on Windows.

oh i guess i better provide a better message. the reason is i want to
run the test_ctrl_thread() (in test_lcores.c) which is an api available
on windows. maybe when i add the replacement control thread creation it
should be moved to / live in test_threads.c?

it is nice as a side-effect it did pick up that the mcfg hadn't been
marked as done. (though i understand that's not the purpose of the
test).

i'll have another whack at changing the log.

> So we can mark this change as:
> Fixes: 5c307ba2a5b1 ("eal: register non-EAL threads as lcores")
> 
> WDYT?

yep, v2 will fix the message & the Fixes tag.

> 
> 
> In any case, this change won't fix anything related to mp.
> If mp is supported one day on Windows, other calls to eal_mcfg* would
> be required.

agreed.

> 
> -- 
> David Marchand
  

Patch

diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
index adb929a..56fadc7 100644
--- a/lib/eal/windows/eal.c
+++ b/lib/eal/windows/eal.c
@@ -462,6 +462,9 @@  enum rte_proc_type_t
 	 */
 	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);
 	rte_eal_mp_wait_lcore();
+
+	eal_mcfg_complete();
+
 	return fctret;
 }