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 5288BA04DB; Thu, 15 Oct 2020 15:32:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0872E1E948; Thu, 15 Oct 2020 15:31:23 +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 8DB621DFE4 for ; Thu, 15 Oct 2020 15:31:16 +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 072EC60107; Thu, 15 Oct 2020 13:31:15 +0000 (UTC) Received: from us4-mdac16-20.ut7.mdlocal (unknown [10.7.65.244]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 04ECD2009A; Thu, 15 Oct 2020 13:31:15 +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 834BD1C005B; Thu, 15 Oct 2020 13:31:14 +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 3AC771C009C; Thu, 15 Oct 2020 13:31:14 +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:11 +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:11 +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 09FDVASX025329; Thu, 15 Oct 2020 14:31:11 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id CF57C1613AB; Thu, 15 Oct 2020 14:31:10 +0100 (BST) From: Andrew Rybchenko To: Chas Williams , "Min Hu (Connor)" CC: , Ivan Ilchenko Date: Thu, 15 Oct 2020 14:30:39 +0100 Message-ID: <1602768646-13142-6-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-0.405100-8.000000-10 X-TMASE-MatchedRID: m3UrM73BECPRlxaUc/KTYX4neC0h7SAD3V4UShoTXacd0WOKRkwsh0kx APClfhN02tmoqiGUvaLMdHm3E7kFwCHhSBQfglfsA9lly13c/gGByxVkfd04JFIxScKXZnK0DYo fQuAXb7gq6gxfT+cErya6mjy4RIhP4bVbyN6yIMmeAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8ifEz J5hPndGZa0UaoW74jY2VRnupLfvT1e7dy+fNoTC0+6FisgFNKw9eUxDL0BCgoub7KuTEVvnxCf5 kJJfuTTypY3Bjx0uiBCgDf5kaYsDpN1JFeUKeMEiOOUXfTkScBZSbxIRLLN37zfneGoTKOTw8g2 HBNcF5k= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.405100-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25726.003 X-MDID: 1602768675-t111NGAWzXRp X-PPE-DISP: 1602768675;t111NGAWzXRp Subject: [dpdk-dev] [PATCH v2 05/11] net/bonding: 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/bonding according to new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- drivers/net/bonding/rte_eth_bond_api.c | 7 ++++++- drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index a4007fe07c..55c8e3167c 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -237,7 +237,12 @@ slave_rte_flow_prepare(uint16_t slave_id, struct bond_dev_private *internals) uint16_t slave_port_id = internals->slaves[slave_id].port_id; if (internals->flow_isolated_valid != 0) { - rte_eth_dev_stop(slave_port_id); + if (rte_eth_dev_stop(slave_port_id) != 0) { + RTE_BOND_LOG(ERR, "Failed to stop device on port %u", + slave_port_id); + return -1; + } + if (rte_flow_isolate(slave_port_id, internals->flow_isolated, &ferror)) { RTE_BOND_LOG(ERR, "rte_flow_isolate failed for slave" diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 1c404b2edd..b75646117c 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1694,7 +1694,10 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, struct bond_dev_private *internals = bonded_eth_dev->data->dev_private; /* Stop slave */ - rte_eth_dev_stop(slave_eth_dev->data->port_id); + errval = rte_eth_dev_stop(slave_eth_dev->data->port_id); + if (errval != 0) + RTE_BOND_LOG(ERR, "rte_eth_dev_stop: port %u, err (%d)", + slave_eth_dev->data->port_id, errval); /* Enable interrupts on slave device if supported */ if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) @@ -2110,7 +2113,11 @@ bond_ethdev_close(struct rte_eth_dev *dev) while (internals->slave_count != skipped) { uint16_t port_id = internals->slaves[skipped].port_id; - rte_eth_dev_stop(port_id); + if (rte_eth_dev_stop(port_id) != 0) { + RTE_BOND_LOG(ERR, "Failed to stop device on port %u", + port_id); + skipped++; + } if (rte_eth_bond_slave_remove(bond_port_id, port_id) != 0) { RTE_BOND_LOG(ERR, -- 2.17.1