app/testpmd: fix timestamp init in txonly mode
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Wed, 29 Jul 2020 12:29:54 +0000 (12:29 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:24 +0000 (00:41 +0200)
commit5ce13f1acd1d1602c9d823d1affbdb8b015b0a11
tree328a2ea611d22ba808e5eb970eaac311678d976e
parent4a67e71816199cf8992a1a02a5aedd8b648382ef
app/testpmd: fix timestamp init in txonly mode

The testpmd application forwards data in multiple threads.
In the txonly mode the Tx timestamps must be initialized
on per thread basis to provide phase shift for the packet
burst being sent. This per thread initialization was performed
on zero value of the variable in thread local storage and
happened only once after testpmd forwarding start. Executing
"start" and "stop" commands did not cause thread local variables
zeroing and wrong timestamp values were used.

Fixes: 4940344dab1d ("app/testpmd: add Tx scheduling command")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
app/test-pmd/txonly.c