summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxtx.c
diff options
context:
space:
mode:
authorRaslan Darawsheh <rasland@mellanox.com>2017-10-10 17:37:07 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-12 01:52:49 +0100
commit78c7406b7b5acd3a3498ad619f63c16989ef6956 (patch)
treec9709571360ac6888f92bce9f550a5488a080b14 /drivers/net/mlx5/mlx5_rxtx.c
parent912267a33eede1427e865fc591e3ee2645cd596c (diff)
downloaddpdk-78c7406b7b5acd3a3498ad619f63c16989ef6956.zip
dpdk-78c7406b7b5acd3a3498ad619f63c16989ef6956.tar.gz
dpdk-78c7406b7b5acd3a3498ad619f63c16989ef6956.tar.xz
net/mlx5: add Rx HW timestamp
Expose Rx HW timestamp to packet mbufs. Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.c')
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 275cd6a..961967b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1887,6 +1887,11 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
pkt->vlan_tci =
rte_be_to_cpu_16(cqe->vlan_info);
}
+ if (rxq->hw_timestamp) {
+ pkt->timestamp =
+ rte_be_to_cpu_64(cqe->timestamp);
+ pkt->ol_flags |= PKT_RX_TIMESTAMP;
+ }
if (rxq->crc_present)
len -= ETHER_CRC_LEN;
PKT_LEN(pkt) = len;