From patchwork Thu Oct 4 12:23:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pattan, Reshma" X-Patchwork-Id: 46063 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2BC481B123; Thu, 4 Oct 2018 14:24:07 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9A8D61B120 for ; Thu, 4 Oct 2018 14:24:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2018 05:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,338,1534834800"; d="scan'208";a="96025637" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by fmsmga001.fm.intel.com with ESMTP; 04 Oct 2018 05:24:02 -0700 From: Reshma Pattan To: dev@dpdk.org, longtb5@viettel.com.vn, john.mcnamara@intel.com Cc: Reshma Pattan Date: Thu, 4 Oct 2018 13:23:59 +0100 Message-Id: <1538655839-32339-1-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] doc: update timestamp validity for latency measurement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Updated the doc on how packets are marked to identify their timestamp as valid and considered for latency measurement. Suggested-by: Bao-Long Tran Signed-off-by: Reshma Pattan Acked-by: Marko Kovacevic --- This change is relevant to the below patch and must be applied after that. http://patches.dpdk.org/patch/45328/ --- doc/guides/prog_guide/metrics_lib.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/guides/prog_guide/metrics_lib.rst b/doc/guides/prog_guide/metrics_lib.rst index 5cbe17c90..e68e4e743 100644 --- a/doc/guides/prog_guide/metrics_lib.rst +++ b/doc/guides/prog_guide/metrics_lib.rst @@ -271,3 +271,12 @@ de-initialise the latency library. .. code-block:: c rte_latencystats_uninit(); + +Timestamp and latency calculation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Latency stats library marks the time in the timestamp field of the +mbuf for the ingress packets and sets the ``PKT_RX_TIMESTAMP`` flag of +``ol_flags`` for the mbuf to indicate the marked time as a valid one. +At the egress, the mbufs with the flag set are considered having valid +timestamp and are used for the latency calculation.