[dpdk-dev,v2,2/2] ethdev: pre-emptively document rte_eth_dev_reset error code

Message ID 20171024110312.24029-2-luca.boccassi@gmail.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Luca Boccassi Oct. 24, 2017, 11:03 a.m. UTC
  From: Luca Boccassi <bluca@debian.org>

When VF reset will be supported by drivers, the API will most likely
have to return -EAGAIN to avoid blocking when the VF cannot be reset
because the PF is down.
Document it immediately even if it's not yet supported, so that users
and developers can already take into account about this use case, and
thus avoid an API-incompatible change later on.

This is based on real-world production usage and customer escalations,
using earlier patches from Intel.

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 lib/librte_ether/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Thomas Monjalon Oct. 24, 2017, 12:29 p.m. UTC | #1
24/10/2017 13:03, luca.boccassi@gmail.com:
> From: Luca Boccassi <bluca@debian.org>
> 
> When VF reset will be supported by drivers, the API will most likely
> have to return -EAGAIN to avoid blocking when the VF cannot be reset
> because the PF is down.
> Document it immediately even if it's not yet supported, so that users
> and developers can already take into account about this use case, and
> thus avoid an API-incompatible change later on.
> 
> This is based on real-world production usage and customer escalations,
> using earlier patches from Intel.
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>

Suggested title: "ethdev: document new error code for reset"

Acked-by: Thomas Monjalon <thomas@monjalon.net>
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 697f6b2e0..2a0129a2a 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2277,6 +2277,7 @@  void rte_eth_dev_close(uint16_t port_id);
  *   - (-EPERM) if not ran from the primary process.
  *   - (-EIO) if re-initialisation failed.
  *   - (-ENOMEM) if the reset failed due to OOM.
+ *   - (-EAGAIN) if the reset temporarily failed and should be retried later.
  */
 int rte_eth_dev_reset(uint16_t port_id);