[dpdk-dev] [PATCH v9 12/18] examples/distributor: allow for extra stats
Hunt, David
david.hunt at intel.com
Tue Mar 14 11:44:28 CET 2017
On 10/3/2017 4:46 PM, Bruce Richardson wrote:
> On Mon, Mar 06, 2017 at 09:10:27AM +0000, David Hunt wrote:
>> + freq = rte_get_timer_hz();
>> + t = rte_rdtsc() + freq;
>> + while (!quit_signal_dist) {
>> + if (t < rte_rdtsc()) {
>> + print_stats();
>> + t = rte_rdtsc() + freq;
>> + }
>> + }
>> +
> You can probably put in a usleep or nanosleep inot the while loop above.
> No need to burn an entire core by polling the tsc.
>
> /Bruce
Done in the next version.
Dave.
More information about the dev
mailing list