From mboxrd@z Thu Jan 1 00:00:00 1970 From: luca.boccassi@gmail.com Subject: [PATCH 2/2] ethdev: pre-emptively document rte_eth_dev_reset error code Date: Thu, 19 Oct 2017 14:48:27 +0100 Message-ID: <20171019134827.22740-2-luca.boccassi@gmail.com> References: <20171019134827.22740-1-luca.boccassi@gmail.com> Cc: wenzhuo.lu@intel.com, wei.dai@intel.com, remy.horton@intel.com, Luca Boccassi To: dev@dpdk.org Return-path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id F32DA9B6B for ; Thu, 19 Oct 2017 15:48:52 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id m72so16199448wmc.1 for ; Thu, 19 Oct 2017 06:48:52 -0700 (PDT) In-Reply-To: <20171019134827.22740-1-luca.boccassi@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Luca Boccassi 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 --- lib/librte_ether/rte_ethdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 9cdb9724a..126f42d3c 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -2270,6 +2270,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 PF is not up and the reset cannot proceed yet. */ int rte_eth_dev_reset(uint16_t port_id); -- 2.11.0