Changeset 09dc6dc


Ignore:
Timestamp:
07/01/14 19:18:16 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
0c866b0
Parents:
9b69b49
Message:

Print debug to stderr rather than stdout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r9b69b49 r09dc6dc  
    351351    if (global_config != NULL) {
    352352        int i;
    353         printf("Intel DPDK setup\n"
     353        fprintf(stderr, "Intel DPDK setup\n"
    354354               "---Version      : %"PRIu32"\n"
    355355               "---Magic        : %"PRIu32"\n"
     
    360360       
    361361        for (i = 0 ; i < nb_cpu; i++) {
    362             printf("   ---Core %d : %s\n", i,
     362            fprintf(stderr, "   ---Core %d : %s\n", i,
    363363                   global_config->lcore_role[i] == ROLE_RTE ? "on" : "off");
    364364        }
     
    381381                proc_type = "something worse than invalid!!";
    382382        }
    383         printf("---Process Type : %s\n", proc_type);
     383        fprintf(stderr, "---Process Type : %s\n", proc_type);
    384384    }
    385385   
     
    744744         */
    745745#if DEBUG
    746     printf("Creating mempool named %s\n", format_data->mempool_name);
     746    fprintf(stderr, "Creating mempool named %s\n", format_data->mempool_name);
    747747#endif
    748748        format_data->pktmbuf_pool =
     
    825825    rte_eth_link_get(format_data->port, &link_info);
    826826#if DEBUG
    827     printf("Link status is %d %d %d\n", (int) link_info.link_status,
     827    fprintf(stderr, "Link status is %d %d %d\n", (int) link_info.link_status,
    828828            (int) link_info.link_duplex, (int) link_info.link_speed);
    829829#endif
     
    949949    ret = rte_eth_dev_start(format_data->port);
    950950#if DEBUG
    951     printf("Done start device\n");
     951    fprintf(stderr, "Done start device\n");
    952952#endif 
    953953    if (ret < 0) {
     
    979979    rte_eth_link_get(format_data->port, &link_info);
    980980#if DEBUG
    981     printf("Link status is %d %d %d\n", (int) link_info.link_status,
     981    fprintf(stderr, "Link status is %d %d %d\n", (int) link_info.link_status,
    982982            (int) link_info.link_duplex, (int) link_info.link_speed);
    983983#endif
     
    10151015        tot = MIN(libtrace->perpkt_thread_count, enabled_lcore_count);
    10161016        tot = MIN(tot, 8);
    1017         printf("Running pstart DPDK %d %d %d %d\n", tot, libtrace->perpkt_thread_count, enabled_lcore_count, rte_lcore_count());
     1017        fprintf(stderr, "Running pstart DPDK %d %d %d %d\n", tot, libtrace->perpkt_thread_count, enabled_lcore_count, rte_lcore_count());
    10181018       
    10191019    if (dpdk_start_port_queues(libtrace, FORMAT(libtrace), err, sizeof(err), tot) != 0) {
     
    10461046    if (FORMAT(libtrace)->paused == DPDK_RUNNING) {
    10471047#if DEBUG     
    1048         printf("Pausing port\n");
     1048        fprintf(stderr, "Pausing port\n");
    10491049#endif
    10501050        rte_eth_dev_stop(FORMAT(libtrace)->port);
     
    14311431                            get_thread_table_num(libtrace), pkts_burst, 1);
    14321432        if (nb_rx > 0) { /* Got a packet - otherwise we keep spining */
    1433                         printf("Doing P READ PACKET port=%d q=%d\n", (int) FORMAT(libtrace)->port, (int) get_thread_table_num(libtrace));
     1433                        //fprintf(stderr, "Doing P READ PACKET port=%d q=%d\n", (int) FORMAT(libtrace)->port, (int) get_thread_table_num(libtrace));
    14341434            return dpdk_ready_pkt(libtrace, packet, pkts_burst[0]);
    14351435        }
Note: See TracChangeset for help on using the changeset viewer.