From mboxrd@z Thu Jan 1 00:00:00 1970 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 B6E531B7B1 for ; Tue, 24 Oct 2017 13:03:24 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id z3so8459981wme.5 for ; Tue, 24 Oct 2017 04:03:24 -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=y8zZ8Xv7eWYkdqyP4P6p6VsQSl601M8cvzyWNann4Io=; b=KuHKp7ETR4r6Gh2xIE8Jece4g4k2KCLkbrKNflJS+ZcWckEtnrHk/zaoCrB0vh8fX/ A+ikFLKB080g/ojb+O/Zs4p+/8BoDpf9H+R/8VKTXsZdpCgKDK1tN6idCfgaa3rHU0AN 0CB6zcl1AHX9ySHM4hLvfcO0iGl0+z7pdFGnKMUB94X28mhdZ2u1MQHGPvhkmGLqf81J zPgalZBWeczqGUtbQbNh0WTNzvKfnJF93MKvagH9Nj4R/EGaTATdAtE3uFZETbF5Gf1N 2PqUWvnrSl/QPFiI/msLX60Niyv1rEMDKuOzm2XQG1n6bWeS2a79wZiEjN+NIh1M9OfI 7x9Q== 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=y8zZ8Xv7eWYkdqyP4P6p6VsQSl601M8cvzyWNann4Io=; b=ucQtJR1dE6hUM4B3qefZ7eUhRnctXcbK9ifQR1VQY5jRbQJ9ls/g3ooEXmqX/TpcVT CEQhAZewa6bfd2k7IMNKGIYKv9G87watbx4on/vLvS+Kui+lJSkry2DpGEXWuTvGSEAd ha7vqTJtz9qHV/Zjw6sJk0Vfx6zdVfa3xWonVrBlGMhB13ie4O+FD81FAo7gdUfzR8tf cXigIt+mT7xcJC6IeHzmGV9ttbn6bTQF9azEvxh2insdMgAsRx7tNzCFLNITfoMrd1YT FEb4I1y5lKaDDZ8Qc2ZsTfj0Y5oznl/eGJbVowL6XpZudTxODlIihKG7lIPYrrVdceK1 OV0w== X-Gm-Message-State: AMCzsaWhTKc31zX1aGSuoMNCdQHidKW0I+08Y2jcdXQEzeC4htCY4n/0 KDfH4dB3ucQjaZBPBohOgda8h9gqbLQ= X-Google-Smtp-Source: ABhQp+RjZG69LFYJ8MkhM7jhTbPqvmo3OtdrAexkbOQBrvKsnAVL0yPqCFfFPp3Q1kj38pYyUj29wQ== X-Received: by 10.80.208.10 with SMTP id j10mr2230094edf.194.1508843003890; Tue, 24 Oct 2017 04:03:23 -0700 (PDT) Received: from localhost ([213.251.34.151]) by smtp.gmail.com with ESMTPSA id b36sm11386edd.67.2017.10.24.04.03.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2017 04:03:23 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, wei.dai@intel.com, remy.horton@intel.com, thomas@monjalon.net, Luca Boccassi Date: Tue, 24 Oct 2017 12:03:12 +0100 Message-Id: <20171024110312.24029-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171024110312.24029-1-luca.boccassi@gmail.com> References: <20171019134827.22740-1-luca.boccassi@gmail.com> <20171024110312.24029-1-luca.boccassi@gmail.com> Subject: [dpdk-dev] [PATCH v2 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: , X-List-Received-Date: Tue, 24 Oct 2017 11:03:25 -0000 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 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); -- 2.11.0