app/testpmd: send failure logs to stderr
[dpdk.git] / app / test-pmd / csumonly.c
index 6b4df33..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;
 
@@ -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);