From patchwork Thu Oct 19 13:48:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Boccassi X-Patchwork-Id: 30593 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B24FC1B21F; Thu, 19 Oct 2017 15:48:54 +0200 (CEST) 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kSwz1+s2JEyidLR7w4IDKPqcbfU7YZwE2frK8m7pbJ4=; b=pRx0NUvateN9UOlqMubcyWBZKS1XrNGqdW8UMpkikZ3OuqObfgmJ69pt1CMHGN6Qzu F9js3KngRaiiXjHk+lHxT7b/Z43KoJimCRLOCW59sfRmjvHG+5KZZe6Yzi6DqnO6gIma MaPJHyAj9fZ7S+Wy29uXNoMkOdNJ6eHAS4UrMhCjxmiuuDn9P31FN3UyPfFf7Fe2RDgm 1JToY/phvEJOC/3jsXIiSip3xIv85rx12MObPBGzZhcaqLCVoU8MOT0EnE8/5EexemSQ L7EBLKDOQXalKmhsIdYNFhQsWigIYXyY+BhiIaoI8Kjb9vNfq0ovs8KJgXpsyRPRL84/ mhvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kSwz1+s2JEyidLR7w4IDKPqcbfU7YZwE2frK8m7pbJ4=; b=nJcwM/v4W/IakTxHb5QEes0pg4NQ1DMyqtOvMfh8lVNXL4fyXOnfG0QJ1zFJVhAjD1 l9CC1h/9NErQHMxdCmXc4MxSTIXcNOzJq4j2tJPGGvcwlDTpKRGAN2R4G1zEdzWxGpRU /7z3fMwyguDJdpMLYNANPzNBr85MEwSl/5Kgar6MoT7bRNYyHEIXFz4Wlhq4/gh5Iv1O JrEYxRebwdIDf4jKuBuRAoxXuCeRbbALU2Ct6iVVxErftbnZcDLhApDA4uoA3l9EkbdW Ao7WTbKwJ7zJT9soPDGxbp3KgxDbRYVKTpbZ6twLjYYHwyMA+RlbDWFnLkcwG4eP/hav uDMg== X-Gm-Message-State: AMCzsaXPL+/ga9o4Jf4GCGay0EvzRqebfy77AZiOgArkSdPpYtbvedRz nwM2yN+zeDWt/M8m3YWTnaQQ5nC3Koc= X-Google-Smtp-Source: ABhQp+Qs78/9VJxF3f9g63zj9xzPjev1n3gX+COanQLXYvOWub3z3YUvsUeAbQJWlzvuGrZ5Zedh9Q== X-Received: by 10.80.130.67 with SMTP id 61mr2509002edf.3.1508420932405; Thu, 19 Oct 2017 06:48:52 -0700 (PDT) Received: from localhost ([213.251.34.151]) by smtp.gmail.com with ESMTPSA id k57sm11967890eda.53.2017.10.19.06.48.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 06:48:51 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, wei.dai@intel.com, remy.horton@intel.com, Luca Boccassi Date: Thu, 19 Oct 2017 14:48:27 +0100 Message-Id: <20171019134827.22740-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171019134827.22740-1-luca.boccassi@gmail.com> References: <20171019134827.22740-1-luca.boccassi@gmail.com> Subject: [dpdk-dev] [PATCH 2/2] ethdev: pre-emptively document rte_eth_dev_reset error code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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);