From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7004795B0 for ; Fri, 13 Nov 2015 17:10:39 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 13 Nov 2015 08:10:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,288,1444719600"; d="scan'208";a="850464997" Received: from sie-lab-214-036.ir.intel.com (HELO sie-lab-214-174.ir.intel.com) ([10.237.214.36]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2015 08:10:35 -0800 From: Pablo de Lara To: dev@dpdk.org Date: Fri, 13 Nov 2015 16:09:12 +0000 Message-Id: <1447430954-94167-7-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447430954-94167-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1447332938-201120-1-git-send-email-pablo.de.lara.guarch@intel.com> <1447430954-94167-1-git-send-email-pablo.de.lara.guarch@intel.com> Cc: konstatin.ananyev@intel.com Subject: [dpdk-dev] [PATCH v7 6/8] testpmd: add nanosecond output for ieee1588 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 16:10:39 -0000 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 Reviewed-by: John McNamara --- app/test-pmd/ieee1588fwd.c | 8 ++++---- 1 file 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"); } -- 2.5.0