X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_link_bonding_rssconf.c;h=5dac60ca1edd64f2d4988c06ba6c30830fc9c03b;hb=ff6fcd415f4b2be7572abffa5284978c176d3de4;hp=d82de2cef51190651f5ca6797987aa92a986393e;hpb=a9de470cc7c0649221e156fc5f30a2dbdfe7c166;p=dpdk.git diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c index d82de2cef5..5dac60ca1e 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -81,7 +81,7 @@ static struct link_bonding_rssconf_unittest_params test_params = { static struct rte_eth_conf default_pmd_conf = { .rxmode = { .mq_mode = ETH_MQ_RX_NONE, - .max_rx_pkt_len = ETHER_MAX_LEN, + .max_rx_pkt_len = RTE_ETHER_MAX_LEN, .split_hdr_size = 0, }, .txmode = { @@ -93,7 +93,7 @@ static struct rte_eth_conf default_pmd_conf = { static struct rte_eth_conf rss_pmd_conf = { .rxmode = { .mq_mode = ETH_MQ_RX_RSS, - .max_rx_pkt_len = ETHER_MAX_LEN, + .max_rx_pkt_len = RTE_ETHER_MAX_LEN, .split_hdr_size = 0, }, .txmode = { @@ -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; } @@ -329,7 +330,11 @@ test_propagate(void) uint64_t rss_hf = 0; uint64_t default_rss_hf = 0; - rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info); + retval = rte_eth_dev_info_get(test_params.bond_port_id, + &test_params.bond_dev_info); + TEST_ASSERT((retval == 0), + "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-retval)); /* * Test hash function propagation @@ -443,10 +448,16 @@ test_rss(void) /** * Configure bonding port in RSS mq mode */ + int ret; + TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id, &rss_pmd_conf, 0), "Failed to configure bonding device\n"); - rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info); + ret = rte_eth_dev_info_get(test_params.bond_port_id, + &test_params.bond_dev_info); + TEST_ASSERT((ret == 0), + "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-ret)); TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed"); @@ -468,10 +479,16 @@ test_rss(void) static int test_rss_lazy(void) { + int ret; + TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id, &default_pmd_conf, 0), "Failed to configure bonding device\n"); - rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info); + ret = rte_eth_dev_info_get(test_params.bond_port_id, + &test_params.bond_dev_info); + TEST_ASSERT((ret == 0), + "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-ret)); TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed"); @@ -495,7 +512,7 @@ test_setup(void) int port_id; char name[256]; struct slave_conf *port; - struct ether_addr mac_addr = { .addr_bytes = {0} }; + struct rte_ether_addr mac_addr = { .addr_bytes = {0} }; if (test_params.mbuf_pool == NULL) { @@ -532,6 +549,10 @@ test_setup(void) rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr); rte_eth_dev_info_get(port->port_id, &port->dev_info); + retval = rte_eth_dev_info_get(port->port_id, &port->dev_info); + TEST_ASSERT((retval == 0), + "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-retval)); } if (test_params.bond_port_id == INVALID_PORT_ID) { @@ -545,8 +566,11 @@ test_setup(void) TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id, &default_pmd_conf, 0), "Failed to configure bonding device\n"); - rte_eth_dev_info_get(test_params.bond_port_id, - &test_params.bond_dev_info); + retval = rte_eth_dev_info_get(test_params.bond_port_id, + &test_params.bond_dev_info); + TEST_ASSERT((retval == 0), + "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-retval)); } return TEST_SUCCESS;