app/testpmd: send failure logs to stderr
[dpdk.git] / app / test-pmd / csumonly.c
index 37ed415..0161f72 100644 (file)
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
        mp = current_fwd_lcore()->mbp;
 
        if (tx_pkt_split == TX_PKT_SPLIT_RND)
-               nb_seg = random() % tx_pkt_nb_segs + 1;
+               nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
        else
                nb_seg = tx_pkt_nb_segs;
 
@@ -864,7 +864,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
                        rx_bad_l4_csum += 1;
                if (rx_ol_flags & PKT_RX_OUTER_L4_CKSUM_BAD)
                        rx_bad_outer_l4_csum += 1;
-               if (rx_ol_flags & PKT_RX_EIP_CKSUM_BAD)
+               if (rx_ol_flags & PKT_RX_OUTER_IP_CKSUM_BAD)
                        rx_bad_outer_ip_csum += 1;
 
                /* step 1: dissect packet, parsing optional vlan, ip4/ip6, vxlan
@@ -1107,8 +1107,9 @@ tunnel_update:
        nb_prep = rte_eth_tx_prepare(fs->tx_port, fs->tx_queue,
                        tx_pkts_burst, nb_rx);
        if (nb_prep != nb_rx)
-               printf("Preparing packet burst to transmit failed: %s\n",
-                               rte_strerror(rte_errno));
+               fprintf(stderr,
+                       "Preparing packet burst to transmit failed: %s\n",
+                       rte_strerror(rte_errno));
 
        nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, tx_pkts_burst,
                        nb_prep);