app/pipeline: check status of getting link info
[dpdk.git] / app / test / test_pmd_perf.c
index 0d1c1b1..85ef118 100644 (file)
@@ -184,7 +184,7 @@ init_traffic(struct rte_mempool *mp,
 {
        struct rte_ether_hdr pkt_eth_hdr;
        struct rte_ipv4_hdr pkt_ipv4_hdr;
-       struct udp_hdr pkt_udp_hdr;
+       struct rte_udp_hdr pkt_udp_hdr;
        uint32_t pktlen;
        static uint8_t src_mac[] = { 0x00, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF };
        static uint8_t dst_mac[] = { 0x00, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA };
@@ -192,7 +192,7 @@ init_traffic(struct rte_mempool *mp,
 
        initialize_eth_header(&pkt_eth_hdr,
                (struct rte_ether_addr *)src_mac,
-               (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
+               (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPV4, 0, 0);
 
        pktlen = initialize_ipv4_header(&pkt_ipv4_hdr,
                                        IPV4_ADDR(10, 0, 0, 1),
@@ -745,7 +745,11 @@ test_pmd_perf(void)
                                ret, portid);
 
                /* always eanble promiscuous */
-               rte_eth_promiscuous_enable(portid);
+               ret = rte_eth_promiscuous_enable(portid);
+               if (ret != 0)
+                       rte_exit(EXIT_FAILURE,
+                                "rte_eth_promiscuous_enable: err=%s, port=%d\n",
+                                rte_strerror(-ret), portid);
 
                lcore_conf[slave_id].portlist[num++] = portid;
                lcore_conf[slave_id].nb_ports++;