From patchwork Sun Aug 28 11:00:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 9302629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC7106077C for ; Sun, 28 Aug 2016 11:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EBD228918 for ; Sun, 28 Aug 2016 11:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93E1C28927; Sun, 28 Aug 2016 11:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3302128918 for ; Sun, 28 Aug 2016 11:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755346AbcH1LB6 (ORCPT ); Sun, 28 Aug 2016 07:01:58 -0400 Received: from mail.kernel.org ([198.145.29.136]:48776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755273AbcH1LB5 (ORCPT ); Sun, 28 Aug 2016 07:01:57 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A45E20253; Sun, 28 Aug 2016 11:00:58 +0000 (UTC) Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C17C02024D; Sun, 28 Aug 2016 11:00:56 +0000 (UTC) From: Leon Romanovsky To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Artemy Kovalyov Subject: [PATCH rdma-next 01/10] IB/core: Add XRQ capabilities Date: Sun, 28 Aug 2016 14:00:41 +0300 Message-Id: <1472382050-25908-2-git-send-email-leon@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472382050-25908-1-git-send-email-leon@kernel.org> References: <1472382050-25908-1-git-send-email-leon@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Artemy Kovalyov This patch adds following XRQ capabilities: * max_unexpected_tags - The maximum number of tags in the unexpected message list * tag_mask_length - Number of bits in a tag matching mask * header_size - The maximum size for the TM header including RNDV info * app_context_size - The size for the application context field in the XRQ context * max_match_list - Maximal number of tags which can be matched simultaneously * capability_flags - Tag matching message type supported: - IBV_NO_TAG - The HW supports messages without tag sent on QPs attached to a XRQ - IBV_EAGER_EXPECTED - The HW supports tag matching for EAGER messages when the send arrives after the corresponding receive - IBV_EAGER_UNEXPECTED - The HW supports tag matching for EAGER messages when the send arrives before the corresponding receive - IBV_RNDV_MATCHED - The HW supports tag matching for RENDEZVOUS messages when the send arrives after the corresponding receive - IBV_RNDV_UNEXPECTED - The HW supports tag matching for RENDEZVOUS messages when the send arrives before the corresponding receive Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky --- include/rdma/ib_verbs.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 8e90dd2..000f57d 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -261,6 +261,38 @@ struct ib_odp_caps { } per_transport_caps; }; +enum ibv_xrq_cap_flags { + /* The HW supports messages without tag + * sent on QPs attached to a XRQ + */ + IBV_NO_TAG = 1 << 0, + /* The HW supports tag matching for EAGER messages when + * the send arrives after the corresponding receive + */ + IBV_EAGER_EXPECTED = 1 << 1, + /* The HW supports tag matching for EAGER messages when + * the send arrives before the corresponding receive + */ + IBV_EAGER_UNEXPECTED = 1 << 2, + /* The HW supports tag matching for RANDEZVOUS messages when + * the send arrives after the corresponding receive (for RC QPs) + */ + IBV_RNDV_EXPECTED_RC = 1 << 3, + /* The HW supports tag matching for RANDEZVOUS messages when + * the send arrives before the corresponding receive + */ + IBV_RNDV_UNEXPECTED = 1 << 5, +}; + +struct ib_xrq_caps { + uint32_t max_unexpected_tags; + uint32_t tag_mask_length; + uint32_t header_size; + uint32_t app_context_size; + uint32_t max_match_list; + uint32_t capability_flags; +}; + enum ib_cq_creation_flags { IB_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0, IB_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1, @@ -318,6 +350,7 @@ struct ib_device_attr { struct ib_odp_caps odp_caps; uint64_t timestamp_mask; uint64_t hca_core_clock; /* in KHZ */ + struct ib_xrq_caps xrq_caps; }; enum ib_mtu {