From patchwork Sun Nov 15 12:30:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Barak X-Patchwork-Id: 7618891 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 78888BF90C for ; Sun, 15 Nov 2015 12:33:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B012F205F0 for ; Sun, 15 Nov 2015 12:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB86B205BA for ; Sun, 15 Nov 2015 12:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751314AbbKOMdi (ORCPT ); Sun, 15 Nov 2015 07:33:38 -0500 Received: from [193.47.165.129] ([193.47.165.129]:48576 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751322AbbKOMd2 (ORCPT ); Sun, 15 Nov 2015 07:33:28 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from matanb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 15 Nov 2015 14:32:51 +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 tAFCWo60019038; Sun, 15 Nov 2015 14:32:51 +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 3/7] Add timestmap support for ibv_poll_cq_ex Date: Sun, 15 Nov 2015 14:30:30 +0200 Message-Id: <1447590634-12858-4-git-send-email-matanb@mellanox.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1447590634-12858-1-git-send-email-matanb@mellanox.com> References: <1447590634-12858-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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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,