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 AB1DFA04B7; Wed, 14 Oct 2020 15:30:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F68B1DDD8; Wed, 14 Oct 2020 15:29:22 +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 56D0A1DDB6 for ; Wed, 14 Oct 2020 15:29:17 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.150]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id EA42220082; Wed, 14 Oct 2020 13:29:15 +0000 (UTC) Received: from us4-mdac16-62.at1.mdlocal (unknown [10.110.50.155]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id E90C4800A3; Wed, 14 Oct 2020 13:29:15 +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 65C25100085; Wed, 14 Oct 2020 13:29:15 +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 2CA8E98007C; Wed, 14 Oct 2020 13:29:15 +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: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; Wed, 14 Oct 2020 14:29: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 09EDTB6A009143; Wed, 14 Oct 2020 14:29:11 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 718E41613AB; Wed, 14 Oct 2020 14:29:11 +0100 (BST) From: Andrew Rybchenko To: Bruce Richardson CC: , Ivan Ilchenko Date: Wed, 14 Oct 2020 14:28:58 +0100 Message-ID: <1602682146-4722-4-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-1.293300-8.000000-10 X-TMASE-MatchedRID: Y4ICLEyyxIvRlxaUc/KTYX4neC0h7SAD3V4UShoTXac7FE26mju9OwZe An7ANE0ajjj7xmhW6vgQlFkmdk3VOiHhSBQfglfsA9lly13c/gH4uJ1REX4MHWKuDy0kKGx0bOS TqgrdBFmK3EGc/DQ/3BIlVYCqhV5OHxPMjOKY7A8LbigRnpKlKZx+7GyJjhAUtK8zmvZOkW/NUZ AolFkycSe9MTX7LHA3Oq+vvL5bLdsaXeKprYDDUzzcblGQkvMawLqZeYlLQddkuPAFj76O+cEwY CsCjMTr5APDq2B3cAxn2JWP8qFf9FKehBzm9vnO5B2Qzud0EsJgO21BQaodlQ== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.293300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25724.003 X-MDID: 1602682155-KcskWrkOPA8K X-PPE-DISP: 1602682155;KcskWrkOPA8K Subject: [dpdk-dev] [PATCH 03/11] app: 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 app according to new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- app/test/test_pmd_perf.c | 6 +++++- app/test/test_pmd_ring.c | 13 ++++++++++--- app/test/test_pmd_ring_perf.c | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index d1240b76f9..85c932c6dc 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -802,7 +802,11 @@ test_pmd_perf(void) if (socketid != rte_eth_dev_socket_id(portid)) continue; - rte_eth_dev_stop(portid); + ret = rte_eth_dev_stop(portid); + if (ret != 0) + rte_exit(EXIT_FAILURE, + "rte_eth_dev_stop: err=%s, port=%d\n", + rte_strerror(-ret), portid); } return 0; diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c index 02873f26a1..b7af8f4b70 100644 --- a/app/test/test_pmd_ring.c +++ b/app/test/test_pmd_ring.c @@ -412,8 +412,14 @@ test_pmd_ring_pair_create_attach(void) return TEST_FAILED; } - rte_eth_dev_stop(rxtx_portd); - rte_eth_dev_stop(rxtx_porte); + if (rte_eth_dev_stop(rxtx_portd) != 0) { + printf("Error: failed to stop port %u\n", rxtx_portd); + return TEST_FAILED; + } + if (rte_eth_dev_stop(rxtx_porte) != 0) { + printf("Error: failed to stop port %u\n", rxtx_porte); + return TEST_FAILED; + } return TEST_SUCCESS; } @@ -522,7 +528,8 @@ test_command_line_ring_port(void) "test stats reset cmdl_port0 is failed"); TEST_ASSERT((test_get_stats(cmdl_port0) < 0), "test get stats cmdl_port0 is failed"); - rte_eth_dev_stop(cmdl_port0); + TEST_ASSERT((rte_eth_dev_stop(cmdl_port0) == 0), + "test stop cmdl_port0 is failed"); } return TEST_SUCCESS; } diff --git a/app/test/test_pmd_ring_perf.c b/app/test/test_pmd_ring_perf.c index 3b2ff9cb4f..d249b7de5f 100644 --- a/app/test/test_pmd_ring_perf.c +++ b/app/test/test_pmd_ring_perf.c @@ -155,7 +155,8 @@ test_ring_pmd_perf(void) test_bulk_enqueue_dequeue(); /* release port and ring resources */ - rte_eth_dev_stop(ring_ethdev_port); + if (rte_eth_dev_stop(ring_ethdev_port) != 0) + return -1; rte_eth_dev_get_name_by_port(ring_ethdev_port, name); rte_vdev_uninit(name); rte_ring_free(r); -- 2.17.1