All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: thomas@monjalon.net, jingjing.wu@intel.com, dev@dpdk.org,
	nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com
Subject: [PATCH v2 2/3] app/testpmd: add Rx timestamp in testpmd
Date: Thu, 24 Aug 2017 10:46:32 +0300	[thread overview]
Message-ID: <1503560793-21597-2-git-send-email-rasland@mellanox.com> (raw)
In-Reply-To: <1503560793-21597-1-git-send-email-rasland@mellanox.com>

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 <rasland@mellanox.com>
---
 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

  reply	other threads:[~2017-08-24  7:46 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 13:46 [PATCH 1/3] ethdev: expose Rx hardware timestamp Raslan Darawsheh
2017-08-22 13:46 ` [PATCH 2/3] app/testpmd: add Rx timestamp in testpmd Raslan Darawsheh
2017-08-22 13:46 ` [PATCH 3/3] net/mlx5: add hardware timestamp Raslan Darawsheh
2017-08-23 15:02   ` Nélio Laranjeiro
2017-08-24  7:46   ` [PATCH v2 1/3] ethdev: expose Rx " Raslan Darawsheh
2017-08-24  7:46     ` Raslan Darawsheh [this message]
2017-08-24 13:49       ` [PATCH v2 2/3] app/testpmd: add Rx timestamp in testpmd Nélio Laranjeiro
2017-08-24  7:46     ` [PATCH v2 3/3] net/mlx5: add hardware timestamp Raslan Darawsheh
2017-08-24 14:01       ` Nélio Laranjeiro
2017-08-24 13:47     ` [PATCH v2 1/3] ethdev: expose Rx " Nélio Laranjeiro
2017-09-28 16:48     ` [PATCH v3 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-09-28 16:48       ` [PATCH v3 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-09-28 16:48       ` [PATCH v3 3/3] net/mlx5: " Raslan Darawsheh
2017-09-29  7:25       ` [PATCH v3 1/3] ethdev: add Rx HW timestamp capability Andrew Rybchenko
2017-10-01  6:44         ` Shahaf Shuler
2017-10-02 14:50       ` [PATCH " Raslan Darawsheh
2017-10-02 14:50         ` [PATCH 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-02 14:50         ` [PATCH 3/3] net/mlx5: " Raslan Darawsheh
2017-10-02 18:48         ` [PATCH 1/3] ethdev: add Rx HW timestamp capability Ferruh Yigit
2017-10-03  0:39           ` Yongseok Koh
2017-10-03  6:33       ` [PATCH v5 " Raslan Darawsheh
2017-10-03  6:33         ` [PATCH v5 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-03  6:33         ` [PATCH v5 3/3] net/mlx5: " Raslan Darawsheh
2017-10-03  6:40         ` [PATCH v5 1/3] ethdev: add Rx HW timestamp capability Andrew Rybchenko
2017-10-03  6:53           ` Yongseok Koh
2017-10-03  7:24             ` Andrew Rybchenko
2017-10-03 11:00       ` [PATCH v6 " Raslan Darawsheh
2017-10-03 11:00         ` [PATCH v6 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-05 23:11           ` Yongseok Koh
2017-10-03 11:00         ` [PATCH v6 3/3] net/mlx5: " Raslan Darawsheh
2017-10-05 23:23           ` Yongseok Koh
2017-10-08  8:24           ` [PATCH v7 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-10-08  8:24             ` [PATCH v7 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-08  8:24             ` [PATCH v7 3/3] net/mlx5: " Raslan Darawsheh
2017-10-09 19:17               ` Ferruh Yigit
2017-10-10  7:45           ` [PATCH v8 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-10-10  7:45             ` [PATCH v8 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-10  7:45             ` [PATCH v8 3/3] net/mlx5: " Raslan Darawsheh
2017-10-10 13:33             ` [PATCH v8 1/3] ethdev: add Rx HW timestamp capability Yongseok Koh
2017-10-10 14:37           ` [PATCH v9 " Raslan Darawsheh
2017-10-10 14:37             ` [PATCH v9 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-10 14:37             ` [PATCH v9 3/3] net/mlx5: " Raslan Darawsheh
2017-10-10 14:40               ` Yongseok Koh
2017-10-11  1:14             ` [PATCH v9 1/3] ethdev: add Rx HW timestamp capability Ferruh Yigit
2017-10-11  1:22               ` Yongseok Koh
2017-10-11  1:30                 ` Ferruh Yigit
2017-10-04  5:57         ` [PATCH v6 " Shahaf Shuler
2017-10-06  0:54         ` Ferruh Yigit
2017-10-02 14:01     ` [PATCH " Raslan Darawsheh
2017-10-02 14:01       ` [PATCH 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-02 14:01       ` [PATCH 3/3] net/mlx5: " Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503560793-21597-2-git-send-email-rasland@mellanox.com \
    --to=rasland@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.