MLX5 PMD access ring library private data

Stephen Hemminger stephen at networkplumber.org
Thu Aug 17 16:06:58 CEST 2023


On Thu, 17 Aug 2023 05:06:20 +0000
Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com> wrote:

> Hi Matan, Viacheslav,
> 	Tyler pointed out that the function __mlx5_hws_cnt_pool_enqueue_revert is accessing the ring private structure members (prod.head and prod.tail) directly. Even though ' struct rte_ring' is a public structure (mainly because the library provides inline functions), the structure members are considered private to the ring library. So, this needs to be corrected.
> 
> It looks like the function __mlx5_hws_cnt_pool_enqueue_revert is trying to revert things that were enqueued. It is not clear to me why this functionality is required. Can you provide the use case for this? We can discuss possible solutions.

How can reverting be thread safe? Consumer could have already looked at them?


More information about the dev mailing list