| 85 | } |
| 86 | |
| 87 | static void |
| 88 | output_result(uint8_t scenario_id, uint32_t lcore_id, char *dma_name, uint16_t ring_size, |
| 89 | uint16_t kick_batch, uint64_t ave_cycle, uint32_t buf_size, uint32_t nr_buf, |
| 90 | float memory, float bandwidth, float mops, bool is_dma) |
| 91 | { |
| 92 | if (is_dma) |
| 93 | printf("lcore %u, DMA %s, DMA Ring Size: %u, Kick Batch Size: %u.\n", |
| 94 | lcore_id, dma_name, ring_size, kick_batch); |
| 95 | else |
| 96 | printf("lcore %u\n", lcore_id); |
| 97 | |
| 98 | printf("Average Cycles/op: %" PRIu64 ", Buffer Size: %u B, Buffer Number: %u, Memory: %.2lf MB, Frequency: %.3lf Ghz.\n", |
| 99 | ave_cycle, buf_size, nr_buf, memory, rte_get_timer_hz()/1000000000.0); |
| 100 | printf("Average Bandwidth: %.3lf Gbps, MOps: %.3lf\n", bandwidth, mops); |
| 101 | |
| 102 | if (is_dma) |
| 103 | snprintf(output_str[lcore_id], MAX_OUTPUT_STR_LEN, CSV_LINE_DMA_FMT, |
| 104 | scenario_id, lcore_id, dma_name, ring_size, kick_batch, buf_size, |
| 105 | nr_buf, memory, ave_cycle, bandwidth, mops); |
| 106 | else |
| 107 | snprintf(output_str[lcore_id], MAX_OUTPUT_STR_LEN, CSV_LINE_CPU_FMT, |
| 108 | scenario_id, lcore_id, buf_size, |
| 109 | nr_buf, memory, ave_cycle, bandwidth, mops); |
| 110 | } |
| 111 | |
| 112 | static inline void |
| 113 | cache_flush_buf(__rte_unused struct rte_mbuf **array, |
no test coverage detected