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 E112EA04B7; Wed, 14 Oct 2020 15:31:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A02401DE2C; Wed, 14 Oct 2020 15:29:29 +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 6A9C81DDCF for ; Wed, 14 Oct 2020 15:29:20 +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 14BF3200E0; Wed, 14 Oct 2020 13:29:19 +0000 (UTC) Received: from us4-mdac16-11.at1.mdlocal (unknown [10.110.49.193]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0F878800AF; Wed, 14 Oct 2020 13:29:19 +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 8016A100052; Wed, 14 Oct 2020 13:29: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 47257980087; Wed, 14 Oct 2020 13:29:18 +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:14 +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:14 +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 09EDTE6I009194; Wed, 14 Oct 2020 14:29:14 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 20C441613A9; Wed, 14 Oct 2020 14:29:14 +0100 (BST) From: Andrew Rybchenko To: Chas Williams , "Min Hu (Connor)" CC: , Ivan Ilchenko Date: Wed, 14 Oct 2020 14:29:02 +0100 Message-ID: <1602682146-4722-8-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-4.089200-8.000000-10 X-TMASE-MatchedRID: cxaTYRzWUivRlxaUc/KTYX4neC0h7SAD3V4UShoTXaeYkF7ZtFfCU0kx APClfhN0YHB0GcKFMltFdYu4cV7ttyHhSBQfglfsA9lly13c/gHVoHA9HwvQm5wsUqEjZnPr2VC 1QWKKKPoRtfYWlraBqb5XOALI4JsjBOatfChdjHspJ8SpVT9O/3607foZgOWyJmE4A+qD79lZru EoKvBZSdXn8fbOSyKigF2CU61NPqQfE8yM4pjsDwtuKBGekqUpm+MB6kaZ2g7eWeTngWZnHRf+g QU4ZiK245RtQqwkfAAMHRdGyc5Bo65KZDnh0cOvqOA9Bck2vxPPPacHi4DkkHzd5FVSeyJMhNKJ okIvZoPkA8OrYHdwDGfYlY/yoV/0Up6EHOb2+c7kHZDO53QSwjflzkGcoK72 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.089200-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25724.003 X-MDID: 1602682159-Jk0aP0AKZeYK X-PPE-DISP: 1602682159;Jk0aP0AKZeYK Subject: [dpdk-dev] [PATCH 07/11] test/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 test/bonding according to new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- app/test/test_link_bonding.c | 42 +++++++++++++++++++++------- app/test/test_link_bonding_mode4.c | 8 ++++-- app/test/test_link_bonding_rssconf.c | 3 +- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 3a46f943f1..e8b76bd850 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -613,7 +613,9 @@ test_stop_bonded_device(void) struct rte_eth_link link_status; int retval; - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); retval = rte_eth_link_get(test_params->bonded_port_id, &link_status); TEST_ASSERT(retval >= 0, @@ -647,7 +649,10 @@ remove_slaves_and_stop_bonded_device(void) TEST_ASSERT_SUCCESS(test_remove_slave_from_bonded_device(), "test_remove_slave_from_bonded_device failed"); - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); + rte_eth_stats_reset(test_params->bonded_port_id); rte_eth_bond_mac_address_reset(test_params->bonded_port_id); @@ -755,7 +760,9 @@ test_set_primary_slave(void) test_params->slave_port_ids[i]); /* stop/start bonded eth dev to apply new MAC */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded port %d", @@ -1024,7 +1031,10 @@ test_set_bonded_port_initialization_mac_assignment(void) slave_port_ids[2]), "failed to set primary port on bonded device."); - rte_eth_dev_stop(bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(bonded_port_id), + "Failed to stop bonded port %u", + bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_start(bonded_port_id), "Failed to start bonded pmd eth device %d.", bonded_port_id); @@ -1063,7 +1073,9 @@ test_set_bonded_port_initialization_mac_assignment(void) * b - remove slave ethdevs * c - Verify slave ethdevs MACs are restored */ - rte_eth_dev_stop(bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(bonded_port_id), + "Failed to stop bonded port %u", + bonded_port_id); for (i = 0; i < BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT; i++) { TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(bonded_port_id, @@ -1769,7 +1781,9 @@ test_roundrobin_verify_mac_assignment(void) /* stop / start bonded device and verify that primary MAC address is * propagate to bonded device and slaves */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); @@ -2404,7 +2418,9 @@ test_activebackup_verify_mac_assignment(void) /* stop / start bonded device and verify that primary MAC address is * propagated to bonded device and slaves */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start device"); @@ -3335,7 +3351,9 @@ test_balance_verify_mac_assignment(void) /* stop / start bonded device and verify that primary MAC address is * propagated to bonded device and slaves */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); @@ -3932,7 +3950,9 @@ test_broadcast_verify_mac_assignment(void) /* stop / start bonded device and verify that primary MAC address is * propagated to bonded device and slaves */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); @@ -4472,7 +4492,9 @@ test_tlb_verify_mac_assignment(void) /* stop / start bonded device and verify that primary MAC address is * propagated to bonded device and slaves */ - rte_eth_dev_stop(test_params->bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonded_port_id), + "Failed to stop bonded port %u", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start device"); diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index cf12f026dd..2c835fa7ad 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -355,7 +355,9 @@ remove_slaves_and_stop_bonded_device(void) uint16_t slaves[RTE_MAX_ETHPORTS]; uint16_t i; - rte_eth_dev_stop(test_params.bonded_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params.bonded_port_id), + "Failed to stop bonded port %u", + test_params.bonded_port_id); FOR_EACH_SLAVE(i, slave) remove_slave(slave); @@ -368,7 +370,9 @@ remove_slaves_and_stop_bonded_device(void) test_params.bonded_port_id, retval); FOR_EACH_PORT(i, slave) { - rte_eth_dev_stop(slave->port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(slave->port_id), + "Failed to stop bonded port %u", + slave->port_id); TEST_ASSERT(slave->bonded == 0, "Port id=%u is still marked as enslaved.", slave->port_id); diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c index 1a9571e5c6..5dac60ca1e 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -176,7 +176,8 @@ static int remove_slaves_and_stop_bonded_device(void) { TEST_ASSERT_SUCCESS(remove_slaves(), "Removing slaves"); - rte_eth_dev_stop(test_params.bond_port_id); + TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params.bond_port_id), + "Failed to stop port %u", test_params.bond_port_id); return TEST_SUCCESS; } -- 2.17.1