> From: Konstantin Ananyev [mailto:konstantin.anan...@huawei.com]
> Sent: Wednesday, 30 October 2024 22.23
> 
> From: Eimear Morrissey <eimear.morris...@huawei.com>
> 
> The current rte_ring_dump function uses the generic rte_ring_headtail
> structure to access head/tail positions. This is incorrect for the RTS
> case where the head is stored in a different offset in the union of
> structs. Switching to a separate function for each sync type allows
> to dump correct head/tail values and extra metadata.
> 
> Signed-off-by: Eimear Morrissey <eimear.morris...@huawei.com>
> ---
> +static const char *
> +ring_get_sync_type(const enum rte_ring_sync_type st)
> +{
> +     switch (st) {
> +     case RTE_RING_SYNC_ST:
> +             return "single thread";
> +     case RTE_RING_SYNC_MT:
> +             return "multi thread";
> +     case RTE_RING_SYNC_MT_RTS:
> +             return "multi thread - RTS";
> +     case RTE_RING_SYNC_MT_HTS:
> +             return "multi thread - HTS";
> +     default:
> +             return "unknown";
> +     }

I would prefer "ST", "MT" "MT_RTS" and "MT_HTS" instead of the "human readable" 
strings.

With or without suggested change,
Acked-by: Morten Brørup <m...@smartsharesystems.com>

Reply via email to