[PATCH v2] service: extend service function call statistics
David Marchand
david.marchand at redhat.com
Wed Oct 2 20:26:08 CEST 2024
Hello Mattias,
On Mon, Sep 9, 2024 at 9:28 PM Mattias Rönnblom
<mattias.ronnblom at ericsson.com> wrote:
> @@ -46,9 +49,21 @@ testsuite_teardown(void)
> static int32_t dummy_cb(void *args)
> {
> RTE_SET_USED(args);
> - service_tick++;
> +
> + service_calls++;
> +
> + switch (rte_rand_max(3)) {
> + case 0:
> + return 0;
> + case 1:
> + service_idle_calls++;
> + return -EAGAIN;
> + default:
> + service_error_calls++;
> + return -ENOENT;
> + }
> +
> rte_delay_ms(SERVICE_DELAY);
> - return 0;
> }
>
> static int32_t dummy_mt_unsafe_cb(void *args)
Coverity flagged this patch with issue #445158.
rte_delay_ms() is now unreachable.
I suppose this delay is not that important for the unit test and we
can remove it, but as I am not sure I'll let you have a look and send
a fix.
Thanks.
--
David Marchand
More information about the dev
mailing list