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

Don Wallwork donw at xsightlabs.com
Mon May 16 21:43:23 CEST 2022



On 5/13/2022 5:38 PM, Stephen Hemminger wrote:
> 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
This and your other comment are addressed in the v3 patch.


More information about the dev mailing list