From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH v2 2/3] app/testpmd: add Rx timestamp in testpmd Date: Thu, 24 Aug 2017 15:49:28 +0200 Message-ID: <20170824134928.GM4544@autoinstall.dev.6wind.com> References: <1503409570-9946-3-git-send-email-rasland@mellanox.com> <1503560793-21597-1-git-send-email-rasland@mellanox.com> <1503560793-21597-2-git-send-email-rasland@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: thomas@monjalon.net, jingjing.wu@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com To: Raslan Darawsheh Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id BE7A77D14 for ; Thu, 24 Aug 2017 15:49:37 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id m207so5901822wma.1 for ; Thu, 24 Aug 2017 06:49:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1503560793-21597-2-git-send-email-rasland@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Aug 24, 2017 at 10:46:32AM +0300, Raslan Darawsheh wrote: > Added new print in case a PMD exposes Rx timestamp. > Also, added a print for timestamp value in rxonly mode > in case the packet was timestamped. > > Signed-off-by: Raslan Darawsheh > --- > app/test-pmd/config.c | 3 +++ > app/test-pmd/rxonly.c | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 3ae3e1c..8a5da5d 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -598,6 +598,9 @@ port_offload_cap_display(portid_t port_id) > printf("off\n"); > } > > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TIMESTAMP) > + printf("HW timestamp: on\n"); > + > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) { > printf("Double VLANs insert: "); > if (ports[port_id].tx_ol_flags & > diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c > index 5ef0219..f4d35d7 100644 > --- a/app/test-pmd/rxonly.c > +++ b/app/test-pmd/rxonly.c > @@ -158,6 +158,8 @@ pkt_burst_receive(struct fwd_stream *fs) > printf("hash=0x%x ID=0x%x ", > mb->hash.fdir.hash, mb->hash.fdir.id); > } > + if (ol_flags & PKT_RX_TIMESTAMP) > + printf(" - timestamp %lu ", mb->timestamp); > if (ol_flags & PKT_RX_VLAN_STRIPPED) > printf(" - VLAN tci=0x%x", mb->vlan_tci); > if (ol_flags & PKT_RX_QINQ_STRIPPED) > -- > 2.7.4 How can we enable this Rx offload? Thanks, -- Nélio Laranjeiro 6WIND