On Wed, Apr 13, 2022 at 9:43 AM Tyler Retzlaff
<[email protected]> wrote:
>
> Implement functions for getting/setting thread affinity.
> Threads can be pinned to specific cores by setting their
> affinity attribute.
>
> note: rte_convert_cpuset_to_affinity has a limitation that all cpus of
> the set belong to the same processor group.
>
> Signed-off-by: Narcisa Vasile <[email protected]>
> Signed-off-by: Tyler Retzlaff <[email protected]>
[snip]
> diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c
> index d730bb4..032b09f 100644
> --- a/lib/eal/windows/rte_thread.c
> +++ b/lib/eal/windows/rte_thread.c
> @@ -6,7 +6,8 @@
> #include <rte_common.h>
> #include <rte_errno.h>
> #include <rte_thread.h>
> -#include <rte_windows.h>
> +
> +#include "eal_windows.h"
>
> struct eal_tls_key {
> DWORD thread_index;
> @@ -146,3 +147,131 @@ struct eal_tls_key {
> }
> return output;
> }
> +
> +static int
> +rte_convert_cpuset_to_affinity(const rte_cpuset_t *cpuset,
> + PGROUP_AFFINITY affinity)
This is Windows only, static code.
Please don't use rte_ prefix.
For static code, I see no need for a prefix at all.
--
David Marchand