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 E62DEA04DB; Thu, 15 Oct 2020 15:34:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC9071E96C; Thu, 15 Oct 2020 15:31:30 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 2CC661E882 for ; Thu, 15 Oct 2020 15:31:20 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.60]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id AD009600E0; Thu, 15 Oct 2020 13:31:18 +0000 (UTC) Received: from us4-mdac16-6.ut7.mdlocal (unknown [10.7.65.74]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id A9D862009A; Thu, 15 Oct 2020 13:31:18 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.174]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 1EB871C0054; Thu, 15 Oct 2020 13:31:18 +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 A29A11C00A2; Thu, 15 Oct 2020 13:31:17 +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; Thu, 15 Oct 2020 14:31:13 +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; Thu, 15 Oct 2020 14:31:13 +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 09FDVASh025329; Thu, 15 Oct 2020 14:31:12 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id DC98D1613AB; Thu, 15 Oct 2020 14:31:12 +0100 (BST) From: Andrew Rybchenko To: Gaetan Rivet CC: , Ivan Ilchenko Date: Thu, 15 Oct 2020 14:30:44 +0100 Message-ID: <1602768646-13142-11-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602768646-13142-1-git-send-email-arybchenko@solarflare.com> References: <1602682146-4722-1-git-send-email-arybchenko@solarflare.com> <1602768646-13142-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-25726.003 X-TM-AS-Result: No-3.265200-8.000000-10 X-TMASE-MatchedRID: Y4ICLEyyxIvRlxaUc/KTYX4neC0h7SAD3V4UShoTXacd0WOKRkwsh2hk SwpykoqVx/C5Mf1iTDw+ikRlw7XhPCHhSBQfglfsA9lly13c/gExXH/dlhvLv1IxScKXZnK0g7l N9LOvFDuuOtzV1CQbqrlxRECWghM+HxPMjOKY7A8LbigRnpKlKZvjAepGmdoO4XZgwUVcpt//n7 sle0kdnShBB3y5D8tsJeSuilafgQq/1z/Mo+nFOM5Jk3EZ8sl03LJHzayC9jTRlah3Rsjp84i/t pzivH2g5APDq2B3cAxn2JWP8qFf9FKehBzm9vnO5B2Qzud0EsLj5cAllduzaw== 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-25726.003 X-MDID: 1602768678-wfB5ZPqTBC4G X-PPE-DISP: 1602768678;wfB5ZPqTBC4G Subject: [dpdk-dev] [PATCH v2 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..7c6e28dc93 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 sub-device %u", SUB_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..5bcc250b5e 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 (fs_err(sdev, rte_eth_dev_stop(PORT_ID(sdev))) < 0) + ERROR("Failed to stop sub-device %u", + SUB_ID(sdev)); fs_unlock(dev, 0); return ret; } -- 2.17.1