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 BBEA19216 for ; Thu, 12 Nov 2015 13:56:00 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 12 Nov 2015 04:55:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,281,1444719600"; d="scan'208";a="835527510" Received: from sie-lab-214-214.ir.intel.com (HELO sie-lab-214-174.ir.intel.com) ([10.237.214.214]) by fmsmga001.fm.intel.com with ESMTP; 12 Nov 2015 04:55:58 -0800 From: Pablo de Lara To: dev@dpdk.org Date: Thu, 12 Nov 2015 12:55:36 +0000 Message-Id: <1447332938-201120-7-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1447332938-201120-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1446732366-10044-1-git-send-email-danielx.t.mrzyglod@intel.com> <1447332938-201120-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH v6 6/8] testpmd: add nanosecond output for ieee1588 fwd 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: Thu, 12 Nov 2015 12:56:01 -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"); } -- 1.8.1.4