| 120 | static double pkt_time_usec = 0; |
| 121 | |
| 122 | static void init_port_ts(uint64_t cpu_clock) |
| 123 | { |
| 124 | double cycles_per_byte = (double)(cpu_clock) / (double)(port_speed_bytes); |
| 125 | inv_cycles_per_byte = 1.0 / cycles_per_byte; |
| 126 | pkt_time_usec = 1000000.0 / ((double)port_speed_bytes / (double)RTE_RED_S); |
| 127 | } |
| 128 | |
| 129 | static uint64_t get_port_ts(void) |
| 130 | { |