From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 6F4286CC2 for ; Thu, 13 Oct 2016 16:35:15 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from olegk@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 Oct 2016 16:35:12 +0200 Received: from r-aa-zorro016.mtr.labs.mlnx (r-aa-zorro016.mtr.labs.mlnx [10.209.68.122]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id u9DEZCgl029473 for ; Thu, 13 Oct 2016 17:35:12 +0300 Received: from r-aa-zorro016.mtr.labs.mlnx (localhost [127.0.0.1]) by r-aa-zorro016.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id u9DEZBYO017264 for ; Thu, 13 Oct 2016 14:35:12 GMT From: Oleg Kuporosov To: dev@dpdk.org Date: Thu, 13 Oct 2016 14:35:05 +0000 Message-Id: <1476369308-17021-1-git-send-email-olegk@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/3] Improvements in packet timestamps support 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, 13 Oct 2016 14:35:15 -0000 Hello DPDK Developers, Financial Services Industry which is pretty eager for several DPDK features especially low latency while high throughput. The major issue so far for increasing DPDK adoption there is requirement for several applications (capturers, some trading algorithms) to support of accurate timestamping. The requirement mostly came from regulatory and customers need strictly follow it. Current state of timestamping support in DPDK looks pretty good: - there is API to enable/disable timestamping acquisition by rte_eth_timesync_enable/disable - get timestamps itself by timesync_read_rx/tx_timestamp - and even implementation of NTP IEEE 1588 for time synchronization by rte_eth_timesync_adjust_read/write_time APIs. But it misses the most important feature there – embedding timestamp in rte_mbuf aligning it with packet. We would like to change this to increase DPDK adoption for several new DPDK-based applications for FSI segment. It also might be very applicable for several RT media and debugging purposes of network flows/streams in other segments like HPC. There are several thoughts how to improve there: - include uint64_t timestamp field into rte_mbuf with minimal impact to throughput/latency. Keep it just simple uint64_t in ns (more than 580 years) would be enough for immediate needs while using full struct timespec with twice bigger size would have much stronger performance impact as missed cacheline0. It is possible as there is 6-bytes gap in 1st cacheline (fast path) and moving uint16_t vlan_tci_outer field to 2nd cacheline. - such move will only impact for pretty rare usable VLAN RX stripping mode for outer TCI (it used only for one NIC i40e from the whole set and keep minimal performance impact for timestamps. - PMD can fill the field in their callback completion routines depending on enabling this feature in runtime. We evaluated other possible options but looks it will have even worse performance impact. Oleg Kuporosov (3): mbuf: embedding timestamp into the packet app/testpmd: enabled control for packet timestamps net/mlx5: implementation of Rx packet timestamping support app/test-pmd/cmdline.c | 122 +++++++++++++++ app/test-pmd/parameters.c | 4 + app/test-pmd/testpmd.c | 5 + app/test-pmd/testpmd.h | 1 + doc/guides/testpmd_app_ug/run_app.rst | 4 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 7 + drivers/net/mlx5/mlx5.c | 7 +- drivers/net/mlx5/mlx5.h | 10 +- drivers/net/mlx5/mlx5_defs.h | 4 + drivers/net/mlx5/mlx5_ethdev.c | 222 +++++++++++++++++++++++++++- drivers/net/mlx5/mlx5_rxq.c | 2 + drivers/net/mlx5/mlx5_rxtx.c | 19 ++- drivers/net/mlx5/mlx5_rxtx.h | 7 +- drivers/net/mlx5/mlx5_time.h | 53 +++++++ drivers/net/mlx5/mlx5_trigger.c | 1 + lib/librte_eal/common/include/rte_time.h | 45 ++++++ lib/librte_mbuf/rte_mbuf.h | 6 +- 17 files changed, 507 insertions(+), 12 deletions(-) create mode 100644 drivers/net/mlx5/mlx5_time.h Thanks, Oleg. -- 1.8.3.1