From patchwork Tue Sep 10 08:52:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 59087 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF0071EE5B; Tue, 10 Sep 2019 10:53:22 +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 829621EB66 for ; Tue, 10 Sep 2019 10:53:09 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 1214ABC006A; Tue, 10 Sep 2019 08:53:08 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 01:53:05 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 01:53:04 -0700 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 x8A8r3Ll024737; Tue, 10 Sep 2019 09:53:03 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id B36E01613D1; Tue, 10 Sep 2019 09:53:03 +0100 (BST) From: Andrew Rybchenko To: Chas Williams CC: , Igor Romanov Date: Tue, 10 Sep 2019 09:52:19 +0100 Message-ID: <1568105541-7399-6-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568105541-7399-1-git-send-email-arybchenko@solarflare.com> References: <1568105541-7399-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24898.005 X-TM-AS-Result: No-1.925300-4.000000-10 X-TMASE-MatchedRID: Wn2D/DSOcBHNQetBFGxSlJzEHTUOuMX3Y/L2/AZJAWSYkF7ZtFfCU2ah 6lYlTZIZfGzuoVn0Vs6PQi9XuOWoOOG1W8jesiDJimHWEC28pk34uJ1REX4MHe5vmGkDDWSWEvf XVFdC2JIvvcHel1iRalRTz4CURzaWyGOiXr1rOL51e7Xbb6Im2g5E5zpXZv3GHApIKLQpe4RWkj /w6AJ3hF7TlACxZgxSgB7vXQad2cLXQbkPFHZM3xo8wYJxWb0ONV9S7O+u3KZt/CaXU0F5uXnUb FaXoymeNiFFPm3DVxhV+9a+ZVGpWR8TzIzimOwPbdTuPa9VRGvEQdG7H66TyJ8TMnmE+d0Z2LUp FDWWJmWPav2k2krYqeiysnWhGSmAXXOjXMVXuN80whpgaPRradc2wK89n8uIr2W5Xbwvu1uD6Wy 1q4QyENAUlPjzyh2Zk3UkV5Qp4wSI45Rd9ORJwFlJvEhEss3fvN+d4ahMo5NWXGvUUmKP2w== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.925300-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24898.005 X-MDID: 1568105588-PWz9mIn8r6Ns Subject: [dpdk-dev] [PATCH 5/7] app/test: check status of getting MAC address in bonding 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: Igor Romanov The return value of rte_eth_macaddr_get() was changed from void to int. Update the usage of the functions according to the new return type. Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- app/test/test_link_bonding.c | 304 +++++++++++++++++++++-------- app/test/test_link_bonding_mode4.c | 14 +- 2 files changed, 237 insertions(+), 81 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index d0d6fc23d..a9b9d0c42 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -399,9 +399,11 @@ test_remove_slave_from_bonded_device(void) mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = test_params->bonded_slave_count-1; - rte_eth_macaddr_get( + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get( test_params->slave_port_ids[test_params->bonded_slave_count-1], - &read_mac_addr); + &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[test_params->bonded_slave_count-1]); TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not set to that of primary port\n"); @@ -763,13 +765,17 @@ test_set_primary_slave(void) expected_mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = i; /* Check primary slave MAC */ - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not set to that of primary port\n"); /* Check bonded MAC */ - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not set to that of primary port\n"); @@ -777,8 +783,10 @@ test_set_primary_slave(void) /* Check other slaves MACs */ for (j = 0; j < 4; j++) { if (j != i) { - rte_eth_macaddr_get(test_params->slave_port_ids[j], - &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[j], + &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[j]); TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port mac address not set to that of primary " @@ -843,13 +851,17 @@ test_set_explicit_bonded_mac(void) } /* Check bonded MAC */ - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not set to that of primary port"); /* Check other slaves MACs */ for (i = 0; i < 4; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port mac address not set to that of primary port"); @@ -973,24 +985,32 @@ test_set_bonded_port_initialization_mac_assignment(void) slave_port_ids[i], 1); } - rte_eth_macaddr_get(bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not as expected"); - rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 0 mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100; - rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 1 mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100; - rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[2]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 2 mac address not as expected"); @@ -1009,24 +1029,32 @@ test_set_bonded_port_initialization_mac_assignment(void) "Failed to start bonded pmd eth device %d.", bonded_port_id); - rte_eth_macaddr_get(bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonded port mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100; - rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 0 mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100; - rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 1 mac address not as expected"); - rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[2]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 2 mac address not as expected"); @@ -1052,19 +1080,25 @@ test_set_bonded_port_initialization_mac_assignment(void) slave_count, 0); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100; - rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 0 mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100; - rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 1 mac address not as expected"); slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100; - rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr), + "Failed to get mac address (port %d)", + slave_port_ids[2]); TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "slave port 2 mac address not as expected"); @@ -1688,8 +1722,12 @@ test_roundrobin_verify_mac_assignment(void) int i; - rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0); - rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_2); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_2), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[2]); /* Initialize bonded device with 4 slaves in round robin mode */ TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves( @@ -1698,7 +1736,9 @@ test_roundrobin_verify_mac_assignment(void) /* Verify that all MACs are the same as first slave added to bonded dev */ for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -1712,7 +1752,9 @@ test_roundrobin_verify_mac_assignment(void) test_params->bonded_port_id, test_params->slave_port_ids[i]); for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address has changed to that of primary" @@ -1727,14 +1769,18 @@ test_roundrobin_verify_mac_assignment(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS( memcmp(&expected_mac_addr_2, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of new primary port", test_params->slave_port_ids[i]); for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_2, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of new primary" @@ -1747,14 +1793,18 @@ test_roundrobin_verify_mac_assignment(void) (struct rte_ether_addr *)bonded_mac), "Failed to set MAC"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of new primary port", test_params->slave_port_ids[i]); for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to" " that of new primary port\n", test_params->slave_port_ids[i]); @@ -2278,8 +2328,12 @@ test_activebackup_verify_mac_assignment(void) struct rte_ether_addr read_mac_addr; struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1; - rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); /* Initialize bonded device with 2 slaves in active backup mode */ TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves( @@ -2288,19 +2342,25 @@ test_activebackup_verify_mac_assignment(void) /* Verify that bonded MACs is that of first slave and that the other slave * MAC hasn't been changed */ - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", @@ -2312,19 +2372,25 @@ test_activebackup_verify_mac_assignment(void) "Failed to set bonded port (%d) primary port to (%d)", test_params->bonded_port_id, test_params->slave_port_ids[1]); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", @@ -2338,19 +2404,25 @@ test_activebackup_verify_mac_assignment(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start device"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -2362,19 +2434,25 @@ test_activebackup_verify_mac_assignment(void) (struct rte_ether_addr *)bonded_mac), "failed to set MAC address"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of bonded port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of bonded port", @@ -3181,8 +3259,12 @@ test_balance_verify_mac_assignment(void) struct rte_ether_addr read_mac_addr; struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1; - rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); /* Initialize bonded device with 2 slaves in active backup mode */ TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves( @@ -3191,19 +3273,25 @@ test_balance_verify_mac_assignment(void) /* Verify that bonded MACs is that of first slave and that the other slave * MAC hasn't been changed */ - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -3215,19 +3303,25 @@ test_balance_verify_mac_assignment(void) "Failed to set bonded port (%d) primary port to (%d)\n", test_params->bonded_port_id, test_params->slave_port_ids[1]); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -3241,19 +3335,25 @@ test_balance_verify_mac_assignment(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -3265,19 +3365,25 @@ test_balance_verify_mac_assignment(void) (struct rte_ether_addr *)bonded_mac), "failed to set MAC"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of bonded port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected\n", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of bonded port", @@ -3777,8 +3883,12 @@ test_broadcast_verify_mac_assignment(void) int i; - rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0); - rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_1); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_1), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[2]); /* Initialize bonded device with 4 slaves in round robin mode */ TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves( @@ -3788,7 +3898,9 @@ test_broadcast_verify_mac_assignment(void) /* Verify that all MACs are the same as first slave added to bonded * device */ for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -3802,7 +3914,9 @@ test_broadcast_verify_mac_assignment(void) test_params->bonded_port_id, test_params->slave_port_ids[i]); for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address has changed to that of primary " @@ -3818,14 +3932,18 @@ test_broadcast_verify_mac_assignment(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start bonded device"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of new primary port", test_params->slave_port_ids[i]); for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of new primary " @@ -3838,7 +3956,9 @@ test_broadcast_verify_mac_assignment(void) (struct rte_ether_addr *)bonded_mac), "Failed to set MAC address"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of new primary port", @@ -3846,7 +3966,9 @@ test_broadcast_verify_mac_assignment(void) for (i = 0; i < test_params->bonded_slave_count; i++) { - rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[i]); TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of new primary " @@ -4274,8 +4396,12 @@ test_tlb_verify_mac_assignment(void) struct rte_ether_addr read_mac_addr; struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1; - rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); /* Initialize bonded device with 2 slaves in active backup mode */ TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves( @@ -4284,19 +4410,25 @@ test_tlb_verify_mac_assignment(void) /* Verify that bonded MACs is that of first slave and that the other slave * MAC hasn't been changed */ - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", @@ -4308,19 +4440,25 @@ test_tlb_verify_mac_assignment(void) "Failed to set bonded port (%d) primary port to (%d)", test_params->bonded_port_id, test_params->slave_port_ids[1]); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", @@ -4334,19 +4472,25 @@ test_tlb_verify_mac_assignment(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id), "Failed to start device"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of primary port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of primary port", @@ -4359,19 +4503,25 @@ test_tlb_verify_mac_assignment(void) (struct rte_ether_addr *)bonded_mac), "failed to set MAC address"); - rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->bonded_port_id); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "bonded port (%d) mac address not set to that of bonded port", test_params->bonded_port_id); - rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[0]); TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not as expected", test_params->slave_port_ids[0]); - rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr); + TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr), + "Failed to get mac address (port %d)", + test_params->slave_port_ids[1]); TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr, sizeof(read_mac_addr)), "slave port (%d) mac address not set to that of bonded port", diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index 70b95d040..ff54d7b91 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -225,6 +225,7 @@ static int add_slave(struct slave_conf *slave, uint8_t start) { struct rte_ether_addr addr, addr_check; + int retval; /* Some sanity check */ RTE_VERIFY(test_params.slave_ports <= slave && @@ -252,7 +253,9 @@ add_slave(struct slave_conf *slave, uint8_t start) "Failed to start slave %u", slave->port_id); } - rte_eth_macaddr_get(slave->port_id, &addr_check); + retval = rte_eth_macaddr_get(slave->port_id, &addr_check); + TEST_ASSERT_SUCCESS(retval, "Failed to get slave mac address: %s", + strerror(-retval)); TEST_ASSERT_EQUAL(rte_is_same_ether_addr(&addr, &addr_check), 1, "Slave MAC address is not as expected"); @@ -816,7 +819,9 @@ test_mode4_rx(void) retval = bond_handshake(); TEST_ASSERT_SUCCESS(retval, "Initial handshake failed"); - rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); + retval = rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); + TEST_ASSERT_SUCCESS(retval, "Failed to get mac address: %s", + strerror(-retval)); rte_ether_addr_copy(&bonded_mac, &dst_mac); /* Assert that dst address is not bonding address. Do not set the @@ -1002,8 +1007,9 @@ test_mode4_tx_burst(void) retval = bond_handshake(); TEST_ASSERT_SUCCESS(retval, "Initial handshake failed"); - rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); - + retval = rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); + TEST_ASSERT_SUCCESS(retval, "Failed to get mac address: %s", + strerror(-retval)); /* Prepare burst */ for (pkts_cnt = 0; pkts_cnt < RTE_DIM(pkts); pkts_cnt++) { dst_mac.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = pkts_cnt;