power: make ethdev power management thread unsafe
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 9 Jul 2021 16:08:14 +0000 (16:08 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 9 Jul 2021 19:13:13 +0000 (21:13 +0200)
commit209fd585456c2c0fa37b7b75dd38def739c50017
tree3455c7973f70d08ff10a23646d4699c30e494ad2
parent66834f29745a484d6217513e4bdf3270b0430267
power: make ethdev power management thread unsafe

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@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
doc/guides/rel_notes/release_21_08.rst
lib/power/meson.build
lib/power/rte_power_pmd_mgmt.c
lib/power/rte_power_pmd_mgmt.h