From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset Date: Tue, 21 Aug 2018 12:06:49 +0100 Message-ID: <20180821110649.26711-1-bluca@debian.org> Cc: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com To: dev@dpdk.org Return-path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 877602BF1 for ; Tue, 21 Aug 2018 13:06:57 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id m27-v6so9255238wrf.3 for ; Tue, 21 Aug 2018 04:06:57 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. Signed-off-by: Luca Boccassi --- drivers/net/ixgbe/base/ixgbe_vf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c index 5b25a6b4d4..62f2bf2e7d 100644 --- a/drivers/net/ixgbe/base/ixgbe_vf.c +++ b/drivers/net/ixgbe/base/ixgbe_vf.c @@ -203,8 +203,13 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw) usec_delay(5); } + /* + * 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 + */ if (!timeout) - return IXGBE_ERR_RESET_FAILED; + return -EAGAIN; /* Reset VF registers to initial values */ ixgbe_virt_clr_reg(hw); -- 2.18.0