[PATCH] test/bitops: check worker lcore availability

Morten Brørup mb at smartsharesystems.com
Fri Oct 11 17:27:02 CEST 2024


> From: David Marchand [mailto:david.marchand at redhat.com]
> Sent: Friday, 11 October 2024 17.26
> 
> Coverity is not able to understand that having 2 lcores means that
> rte_get_next_lcore(-1, 0, 1) can't return RTE_MAX_LCORE.
> Add an assert.
> 
> Coverity issue: 445382, 445383, 445384, 445387, 445389, 445391
> Fixes: 35326b61aecb ("bitops: add atomic bit operations in new API")
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> Note:
> - a better fix would be to check lcore id validity in the EAL launch
> API,
>   but it requires inspecting all functions and it could result in some
>   API change, so sending this as a simple fix for now,
> 
> ---

Reviewed-by: Morten Brørup <mb at smartsharesystems.com>



More information about the dev mailing list