From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Chas Williams <chas3@att.com>, "Min Hu (Connor)" <humin29@huawei.com>
Cc: <dev@dpdk.org>, Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH v2 07/11] test/bonding: check eth dev stop status
Date: Thu, 15 Oct 2020 14:30:41 +0100 [thread overview]
Message-ID: <1602768646-13142-8-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1602768646-13142-1-git-send-email-arybchenko@solarflare.com>
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
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 <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
app/test/test_link_bonding.c | 42 +++++++++++++++++++++-------
app/test/test_link_bonding_mode4.c | 8 ++++--
| 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);
--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
next prev parent reply other threads:[~2020-10-15 13:33 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 13:28 [dpdk-dev] [PATCH 00/11] ethdev: change device stop to return status Andrew Rybchenko
2020-10-14 13:28 ` [dpdk-dev] [PATCH 01/11] ethdev: change eth dev stop function to return int Andrew Rybchenko
2020-10-14 13:33 ` Thomas Monjalon
2020-10-14 13:40 ` Andrew Rybchenko
2020-10-14 17:29 ` Ferruh Yigit
2020-10-14 13:28 ` [dpdk-dev] [PATCH 02/11] test/event: check eth dev stop status Andrew Rybchenko
2020-10-14 13:28 ` [dpdk-dev] [PATCH 03/11] app: " Andrew Rybchenko
2020-10-14 17:34 ` Ferruh Yigit
2020-10-14 13:28 ` [dpdk-dev] [PATCH 04/11] examples: " Andrew Rybchenko
2020-10-14 17:38 ` Ferruh Yigit
2020-10-14 13:29 ` [dpdk-dev] [PATCH 05/11] net/bonding: " Andrew Rybchenko
2020-10-14 17:45 ` Ferruh Yigit
2020-10-14 13:29 ` [dpdk-dev] [PATCH 06/11] kni: " Andrew Rybchenko
2020-10-14 13:29 ` [dpdk-dev] [PATCH 07/11] test/bonding: " Andrew Rybchenko
2020-10-14 13:29 ` [dpdk-dev] [PATCH 08/11] app/flow-perf: " Andrew Rybchenko
2020-10-15 8:04 ` Wisam Monther
2020-10-14 13:29 ` [dpdk-dev] [PATCH 09/11] app/testpmd: " Andrew Rybchenko
2020-10-14 13:29 ` [dpdk-dev] [PATCH 10/11] net/failsafe: " Andrew Rybchenko
2020-10-15 10:37 ` [dpdk-dev] [PATCH v2] " Gaetan Rivet
2020-10-14 13:29 ` [dpdk-dev] [PATCH 11/11] ethdev: change stop device callback to return int Andrew Rybchenko
2020-10-14 18:08 ` Ferruh Yigit
2020-10-15 10:40 ` Gaëtan Rivet
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 00/11] ethdev: change device stop to return status Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 01/11] ethdev: change eth dev stop function to return int Andrew Rybchenko
2020-10-16 9:22 ` Ferruh Yigit
2020-10-16 11:20 ` Kinsella, Ray
2020-10-16 17:13 ` Andrew Rybchenko
2020-10-19 9:37 ` Kinsella, Ray
2020-10-16 16:20 ` Ferruh Yigit
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 02/11] test/event: check eth dev stop status Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 03/11] app: " Andrew Rybchenko
2020-10-16 1:28 ` Min Hu (Connor)
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 04/11] examples: " Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 05/11] net/bonding: " Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 06/11] kni: " Andrew Rybchenko
2020-10-15 13:30 ` Andrew Rybchenko [this message]
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 08/11] app/flow-perf: " Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 09/11] app/testpmd: " Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 10/11] net/failsafe: " Andrew Rybchenko
2020-10-15 13:30 ` [dpdk-dev] [PATCH v2 11/11] ethdev: change stop device callback to return int Andrew Rybchenko
2020-10-16 18:37 ` Ferruh Yigit
2020-10-18 8:55 ` Xu, Rosen
2020-10-16 18:54 ` [dpdk-dev] [PATCH v2 00/11] ethdev: change device stop to return status Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1602768646-13142-8-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=chas3@att.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=ivan.ilchenko@oktetlabs.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).