[dpdk-dev] [PATCH 1/2] eal: add internal locks for timer lib into EAL

Carrillo, Erik G erik.g.carrillo at intel.com
Thu Jun 27 20:41:41 CEST 2019


Hi Anatoly,

> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Tuesday, June 25, 2019 11:12 AM
> To: dev at dpdk.org
> Cc: Carrillo, Erik G <erik.g.carrillo at intel.com>
> Subject: [PATCH 1/2] eal: add internal locks for timer lib into EAL
> 
> Currently, timer library has a memory leak because there is no way to
> concurrently initialize/deinitialize shared memory because of race conditions
> [1].
> 
> Add a spinlock to the shared mem config to have a way to exclusively
> initialize/deinitialize the timer library without any races.
> 
> [1] See the following email thread:
> https://mails.dpdk.org/archives/dev/2019-May/131498.html
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

<... snipped ...>

> --- a/lib/librte_eal/common/include/rte_eal_memconfig.h
> +++ b/lib/librte_eal/common/include/rte_eal_memconfig.h
> @@ -109,6 +109,24 @@ rte_mcfg_mempool_write_lock(void);
>  void
>  rte_mcfg_mempool_write_unlock(void);
> 
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Lock the internal EAL Timer Library lock for exclusive access.
> + */
> +void __rte_experimental

Depending on the decision made for the following thread, the "__rte_experimental" tag location may move:
https://mails.dpdk.org/archives/dev/2019-June/136050.html

> +rte_mcfg_timer_lock(void);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Unlock the internal EAL Timer Library lock for exclusive access.
> + */
> +void __rte_experimental
> +rte_mcfg_timer_unlock(void);
> +
>  #ifdef __cplusplus
>  }
>  #endif

<... snipped ...>

Other than that:

Acked-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>



More information about the dev mailing list