[dpdk-dev] [PATCH v7 4/7] power: remove thread safety from PMD power API's
David Hunt
david.hunt at intel.com
Wed Jul 7 14:02:08 CEST 2021
On 7/7/2021 11:48 AM, Anatoly Burakov wrote:
> Currently, we expect that only one callback can be active at any given
> moment, for a particular queue configuration, which is relatively easy
> to implement in a thread-safe way. However, we're about to add support
> for multiple queues per lcore, which will greatly increase the
> possibility of various race conditions.
>
> We could have used something like an RCU for this use case, but absent
> of a pressing need for thread safety we'll go the easy way and just
> mandate that the API's are to be called when all affected ports are
> stopped, and document this limitation. This greatly simplifies the
> `rte_power_monitor`-related code.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
> v2:
> - Add check for stopped queue
> - Clarified doc message
> - Added release notes
>
Tested-by: David Hunt <david.hunt at intel.com>
More information about the dev
mailing list