[PATCH v2] eal: allow worker lcore stacks to be allocated from hugepage memory

Stephen Hemminger stephen at networkplumber.org
Fri May 13 23:38:05 CEST 2022


On Fri, 13 May 2022 13:58:22 -0400
Don Wallwork <donw at xsightlabs.com> wrote:

> +static int
> +eal_parse_huge_worker_stack(const char *arg, size_t *huge_worker_stack_size)
> +{
> +	size_t worker_stack_size;
> +	if (arg == NULL) {
> +		*huge_worker_stack_size = USE_OS_STACK_SIZE;
> +		return 0;
> +	}
> +	worker_stack_size = atoi(arg);
> +	if (worker_stack_size == 0)
> +		return -1;
> +

Since worker_stack_size is size_t you are better off using something
like strtoul() and check for more errors from that


More information about the dev mailing list