[PATCH 1/2] mempool: check driver enqueue result in one place

Morten Brørup mb at smartsharesystems.com
Sun Oct 9 15:01:26 CEST 2022


> From: Andrew Rybchenko [mailto:andrew.rybchenko at oktetlabs.ru]
> Sent: Sunday, 9 October 2022 13.12
> 
> Enqueue operation must not fail. Move corresponding debug check
> from one particular case to dequeue operation helper in order
> to do it for all invocations.
> 
> Log critical message with useful information instead of rte_panic().
> 
> Make rte_mempool_do_generic_put() implementation more readable and
> fix incosistency when return value is not checked in one place and
> checked in another.
> 
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> ---

Moving the debug check to cover all invocations is an improvement. Well spotted!

I have considered if panicking would still be appropriate instead of logging, and have come to the conclusion that I agree with that modification too.

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



More information about the dev mailing list