doc: announce change in power API
PATCH 1/1 doc: announce change in power API
From: Marcin Hajkowski <[email protected]>
Function rte_power_set_env will no longer return success on attempt to set env in initialized state.
--- doc/guides/rel_notes/deprecation.rst | 5 +++++ 1 file changed, 5 insertions(+)
doc/guides/rel_notes/deprecation.rst +5 -0
@@ -75,3 +75,8 @@ Deprecation Notices * crypto/aesni_mb: the minimum supported intel-ipsec-mb library version will be changed from 0.49.0 to 0.52.0. + +* power: ``rte_power_set_env`` function will no longer return 0 on attempt + to set new power environment if power environment was already initialized. + Instead, the function will return -1 unless the environment is unset first + (using ``rte_power_unset_env``).
Signature · 13 lines
2.17.2 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Hajkowski <[email protected]>:
Quoted 8 lines
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>---
For further patches, please remove the legal disclaimer at the bottom.
Quoted 7 lines · Hajkowski
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>---
Quoted 8 lines
Quoted 6 lines
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>Acked-by David Hunt <[email protected]>
Any other comment about this deprecation notice?
Quoted 11 lines · Thomas Monjalon
Quoted 8 lines
Quoted 6 lines
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>Acked-by David Hunt <[email protected]>Any other comment about this deprecation notice?
Seems ok to me, though the actual text is maybe a little unclear. It implies that the function will always return -1 unless the variable is unset when the function terminates (which seems to imply a failure case). What I presume is meant is that we have three possibilities:
* The variable is set by the function -> return 0
* The varaible is already set, so no action needed -> return -1 (and set rte_errno to EEXIST or EALREADY??)
* Setting the variable failed -> return -1 (and set rte_errno to ??)
Is my understanding correct? Can the deprecation notice be improved to make it clear that only the middle case is the one being changed, e.g. by adding "in this case" to the second sentence. It might also be worthwhile calling out what the errno value will be to identify this failure vs regular failures.
/Bruce
PS: For this case, is there a reason to make it an error? Would a +1 value not also do, so anything non-zero implies no work done, and anything >=0 means that the value is set? Call set on something already set doesn't really seem like an error case to me.
Bruce Richardson
Acked-byQuoted 28 lines · Bruce Richardson
Quoted 11 lines · Thomas Monjalon
Quoted 8 lines
Quoted 6 lines
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>Acked-by David Hunt <[email protected]>Any other comment about this deprecation notice?
Seems ok to me, though the actual text is maybe a little unclear. It implies that the function will always return -1 unless the variable is unset when the function terminates (which seems to imply a failure case). What I presume is meant is that we have three possibilities:
* The variable is set by the function -> return 0
* The varaible is already set, so no action needed -> return -1 (and setrte_errnoto EEXIST or EALREADY??)
* Setting the variable failed -> return -1 (and setrte_errnoto ??)Is my understanding correct? Can the deprecation notice be improved to make it clear that only the middle case is the one being changed, e.g. by adding "in this case" to the second sentence. It might also be worthwhile calling out what the errno value will be to identify this failure vs regular failures.
Quoted 6 lines
/Bruce
PS: For this case, is there a reason to make it an error? Would a +1 value not also do, so anything non-zero implies no work done, and anything >=0 means that the value is set? Call set on something already set doesn't really seem like an error case to me.
Sorry, forgot to put:
For changing the ABI itself, no issues, so with the small rewording asked for, please add my ack.
Quoted 7 lines · Hajkowski
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>---
Signature · 2 lines
Thanks, Anatoly
PATCH v2 1/1 doc: announce change in power API
In reply to HajkowskiFrom: Marcin Hajkowski <[email protected]>
Function rte_power_set_env will no longer return success on attempt to set env in initialized state.
--- doc/guides/rel_notes/deprecation.rst | 5 +++++ 1 file changed, 5 insertions(+)
doc/guides/rel_notes/deprecation.rst +5 -0
@@ -82,3 +82,8 @@ Deprecation Notices * cryptodev: the ``uint8_t *data`` member of ``key`` structure in the xforms structure (``rte_crypto_cipher_xform``, ``rte_crypto_auth_xform``, and ``rte_crypto_aead_xform``) will be changed to ``const uint8_t *data``. + +* power: ``rte_power_set_env`` function will no longer return 0 on attempt + to set new power environment if power environment was already initialized. + In this case the function will return -1 unless the environment is unset first + (using ``rte_power_unset_env``). Other function usage scenarios will not change.
Signature · 1 line
2.17.2
Thomas Monjalon
Applied13/05/2019 15:52, Hajkowski:
Quoted 10 lines
From: Marcin Hajkowski <[email protected]>
Function
rte_power_set_envwill no longer return success on attempt to set env in initialized state.Signed-off-by Marcin Hajkowski <[email protected]>Reviewed-by Rami Rosen <[email protected]>Acked-by David Hunt <[email protected]>Acked-by Anatoly Burakov <[email protected]>Acked-by Bruce Richardson <[email protected]>
Applied, thanks