From patchwork Thu Dec 3 16:02:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Barak X-Patchwork-Id: 7761621 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E28F19F1C2 for ; Thu, 3 Dec 2015 16:05:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6BAC2042A for ; Thu, 3 Dec 2015 16:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4AD920445 for ; Thu, 3 Dec 2015 16:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752302AbbLCQFm (ORCPT ); Thu, 3 Dec 2015 11:05:42 -0500 Received: from [193.47.165.129] ([193.47.165.129]:41115 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752320AbbLCQFl (ORCPT ); Thu, 3 Dec 2015 11:05:41 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from matanb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Dec 2015 18:05:19 +0200 Received: from rsws33.mtr.labs.mlnx (dev-r-vrt-064.mtr.labs.mlnx [10.212.64.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id tB3G5J2g009883; Thu, 3 Dec 2015 18:05:19 +0200 From: Matan Barak To: Eli Cohen Cc: linux-rdma@vger.kernel.org, Doug Ledford , Matan Barak , Eran Ben Elisha , Christoph Lameter Subject: [PATCH libmlx5 V1 2/6] Add timestmap support for ibv_poll_cq_ex Date: Thu, 3 Dec 2015 18:02:47 +0200 Message-Id: <1449158571-26228-3-git-send-email-matanb@mellanox.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449158571-26228-1-git-send-email-matanb@mellanox.com> References: <1449158571-26228-1-git-send-email-matanb@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for filling the timestamp field in ibv_poll_cq_ex (if it's required by the user). Signed-off-by: Matan Barak --- src/cq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cq.c b/src/cq.c index 0185696..5e06990 100644 --- a/src/cq.c +++ b/src/cq.c @@ -913,6 +913,11 @@ inline int mlx5_poll_one_ex(struct mlx5_cq *cq, wc_ex->wc_flags = 0; wc_ex->reserved = 0; + if (wc_flags & IBV_WC_EX_WITH_COMPLETION_TIMESTAMP) { + *wc_buffer.b64++ = ntohll(cqe64->timestamp); + wc_ex->wc_flags |= IBV_WC_EX_WITH_COMPLETION_TIMESTAMP; + } + switch (opcode) { case MLX5_CQE_REQ: err = mlx5_poll_one_cqe_req(cq, cur_rsc, cqe, qpn, cqe_ver,