test/threads: add unit test
[dpdk.git] / app / test / test_link_bonding.c
index dc6fc46..194ed5a 100644 (file)
@@ -181,6 +181,10 @@ configure_ethdev(uint16_t port_id, uint8_t start, uint8_t en_isr)
                        test_params->nb_tx_q, &default_pmd_conf),
                        "rte_eth_dev_configure for port %d failed", port_id);
 
+       int ret = rte_eth_dev_set_mtu(port_id, 1550);
+       RTE_TEST_ASSERT(ret == 0 || ret == -ENOTSUP,
+                       "rte_eth_dev_set_mtu for port %d failed", port_id);
+
        for (q_id = 0; q_id < test_params->nb_rx_q; q_id++)
                TEST_ASSERT_SUCCESS(rte_eth_rx_queue_setup(port_id, q_id, RX_RING_SIZE,
                                rte_eth_dev_socket_id(port_id), &rx_conf_default,
@@ -1639,8 +1643,7 @@ test_roundrobin_rx_burst_on_single_slave(void)
 
        /* free mbufs */
        for (i = 0; i < MAX_PKT_BURST; i++) {
-               if (rx_pkt_burst[i] != NULL)
-                       rte_pktmbuf_free(rx_pkt_burst[i]);
+               rte_pktmbuf_free(rx_pkt_burst[i]);
        }
 
 
@@ -1722,8 +1725,7 @@ test_roundrobin_rx_burst_on_multiple_slaves(void)
 
        /* free mbufs */
        for (i = 0; i < MAX_PKT_BURST; i++) {
-               if (rx_pkt_burst[i] != NULL)
-                       rte_pktmbuf_free(rx_pkt_burst[i]);
+               rte_pktmbuf_free(rx_pkt_burst[i]);
        }
 
        /* Clean up and remove slaves from bonded device */
@@ -2010,8 +2012,7 @@ test_roundrobin_verify_slave_link_status_change_behaviour(void)
 
        /* free mbufs */
        for (i = 0; i < MAX_PKT_BURST; i++) {
-               if (rx_pkt_burst[i] != NULL)
-                       rte_pktmbuf_free(rx_pkt_burst[i]);
+               rte_pktmbuf_free(rx_pkt_burst[i]);
        }
 
        /* Clean up and remove slaves from bonded device */