summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2015-11-13 16:09:12 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-11-13 17:44:43 +0100
commit8a45731c028ec6f12c3209e07a8715346b8a4b62 (patch)
tree27c5a3be03ea6b710e8e9d7dd3f57785949e49df
parentf3a4e40eca0c690f5a324a3839ed1f1cbcb8d75e (diff)
downloaddpdk-8a45731c028ec6f12c3209e07a8715346b8a4b62.zip
dpdk-8a45731c028ec6f12c3209e07a8715346b8a4b62.tar.gz
dpdk-8a45731c028ec6f12c3209e07a8715346b8a4b62.tar.xz
app/testpmd: add nanosecond output for ieee1588
Testpmd was only printing out second values when printing RX/TX timestamp value, instead of both second and nanoseconds. Since resolution of time counters is in nanoseconds, testpmd should print out both. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Reviewed-by: John McNamara <john.mcnamara@intel.com>
-rw-r--r--app/test-pmd/ieee1588fwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index b1a301b..c69023a 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -89,8 +89,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
(unsigned) pi);
return;
}
- printf("Port %u RX timestamp value %lu\n",
- (unsigned) pi, timestamp.tv_sec);
+ printf("Port %u RX timestamp value %lu s %lu ns\n",
+ (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec);
}
#define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -112,9 +112,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
(unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
return;
}
- printf("Port %u TX timestamp value %lu validated after "
+ printf("Port %u TX timestamp value %lu s %lu ns validated after "
"%u micro-second%s\n",
- (unsigned) pi, timestamp.tv_sec, wait_us,
+ (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
(wait_us == 1) ? "" : "s");
}