[v2] net/ixgbe: do not return internal code in rte_eth_dev_reset
Checks
Commit Message
In case of a temporary failure the ixgbe driver can return the internal
error IXGBE_ERR_RESET_FAILED to the application. Instead, return
-EAGAIN as per the public API specification.
Fixes: cddaf87a1ecb ("lib: fix unused values")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v2: added fixes and cc: stable
move change to eth_ixgbevf_dev_init from the base code
drivers/net/ixgbe/ixgbe_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: Monday, September 3, 2018 10:18 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Luca
> Boccassi <bluca@debian.org>; stable@dpdk.org
> Subject: [PATCH v2] net/ixgbe: do not return internal code in
> rte_eth_dev_reset
Change title to "net/ixgbe: do not return internal code" to avoid check-git-log error.
>
> In case of a temporary failure the ixgbe driver can return the internal error
> IXGBE_ERR_RESET_FAILED to the application. Instead, return -EAGAIN as per
> the public API specification.
>
> Fixes: cddaf87a1ecb ("lib: fix unused values")
> Cc: stable@dpdk.org
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks!
Qi
@@ -1619,7 +1619,12 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
*/
if ((diag != IXGBE_SUCCESS) && (diag != IXGBE_ERR_INVALID_MAC_ADDR)) {
PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
- return diag;
+ /*
+ * This error code will be propagated to the app by
+ * rte_eth_dev_reset, so use a public error code rather than
+ * the internal-only IXGBE_ERR_RESET_FAILED
+ */
+ return -EAGAIN;
}
/* negotiate mailbox API version to use with the PF. */