From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14EF8A04B7; Wed, 14 Oct 2020 15:33:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D6251DE53; Wed, 14 Oct 2020 15:29:34 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 4CBCC1DDD4 for ; Wed, 14 Oct 2020 15:29:22 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.137]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id EF1B920080; Wed, 14 Oct 2020 13:29:20 +0000 (UTC) Received: from us4-mdac16-33.at1.mdlocal (unknown [10.110.49.217]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id ED3496009B; Wed, 14 Oct 2020 13:29:20 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.49.103]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 81CCF220075; Wed, 14 Oct 2020 13:29:20 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 42E83980090; Wed, 14 Oct 2020 13:29:20 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 14 Oct 2020 14:29:15 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 14 Oct 2020 14:29:15 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09EDTF1U009235; Wed, 14 Oct 2020 14:29:15 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 982451613A9; Wed, 14 Oct 2020 14:29:15 +0100 (BST) From: Andrew Rybchenko To: Gaetan Rivet CC: , Ivan Ilchenko Date: Wed, 14 Oct 2020 14:29:05 +0100 Message-ID: <1602682146-4722-11-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602682146-4722-1-git-send-email-arybchenko@solarflare.com> References: <1602682146-4722-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25724.003 X-TM-AS-Result: No-3.265200-8.000000-10 X-TMASE-MatchedRID: Y4ICLEyyxIvRlxaUc/KTYX4neC0h7SAD3V4UShoTXacd0WOKRkwsh2hk SwpykoqVx/C5Mf1iTDw+ikRlw7XhPCHhSBQfglfsA9lly13c/gExXH/dlhvLv1IxScKXZnK0g7l N9LOvFDuuOtzV1CQbqrlxRECWghM+HxPMjOKY7A8LbigRnpKlKZvjAepGmdoOkPgjrRFGkyPM+9 aV5RHc55jyROJKvfE9Pr7ekwNTheDgk5SW3bNpIdOOGfL2azvqgAPCi7P++EXyJoj4yMzjay+Ds OUcVO6j5APDq2B3cAxn2JWP8qFf9FKehBzm9vnO5B2Qzud0EsLj5cAllduzaw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-3.265200-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25724.003 X-MDID: 1602682161-dfXjrslETUoE X-PPE-DISP: 1602682161;dfXjrslETUoE Subject: [dpdk-dev] [PATCH 10/11] net/failsafe: check eth dev stop status 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: Ivan Ilchenko rte_eth_dev_stop() return value was changed from void to int, so this patch modify usage of this function across net/failsafe according to new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- drivers/net/failsafe/failsafe_ether.c | 4 +++- drivers/net/failsafe/failsafe_ops.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c index f18935a7e2..f259755806 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -282,7 +282,9 @@ fs_dev_remove(struct sub_device *sdev) switch (sdev->state) { case DEV_STARTED: failsafe_rx_intr_uninstall_subdevice(sdev); - rte_eth_dev_stop(PORT_ID(sdev)); + ret = rte_eth_dev_stop(PORT_ID(sdev)); + if (ret < 0) + ERROR("Failed to stop device %u", PORT_ID(sdev)); sdev->state = DEV_ACTIVE; /* fallthrough */ case DEV_ACTIVE: diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 0ce7dfc8a6..4fbb7e1da0 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -147,7 +147,9 @@ fs_dev_start(struct rte_eth_dev *dev) if (ret) { if (!fs_err(sdev, ret)) continue; - rte_eth_dev_stop(PORT_ID(sdev)); + if (rte_eth_dev_stop(PORT_ID(sdev)) < 0) + ERROR("Failed to stop device %u", + PORT_ID(sdev)); fs_unlock(dev, 0); return ret; } -- 2.17.1