From patchwork Mon Jun 12 06:42:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemy Kovalyov X-Patchwork-Id: 9780491 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 22BEA602DA for ; Mon, 12 Jun 2017 06:42:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1333827CAF for ; Mon, 12 Jun 2017 06:42:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07F6828408; Mon, 12 Jun 2017 06:42:59 +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, UNPARSEABLE_RELAY 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 A75FC27CAF for ; Mon, 12 Jun 2017 06:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752371AbdFLGm5 (ORCPT ); Mon, 12 Jun 2017 02:42:57 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:45587 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752376AbdFLGmz (ORCPT ); Mon, 12 Jun 2017 02:42:55 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from artemyko@mellanox.com) with ESMTPS (AES256-SHA encrypted); 12 Jun 2017 09:42:47 +0300 Received: from hpchead.mtr.labs.mlnx. (hpchead.mtr.labs.mlnx [10.209.44.59]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v5C6glRF025263; Mon, 12 Jun 2017 09:42:47 +0300 From: Artemy Kovalyov To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, liranl@mellanox.com, yosefe@mellanox.com, leonro@mellanox.com, anag@mellanox.com, Artemy Kovalyov Subject: [RFC 1/5] verbs: Expose tag matching capabilities Date: Mon, 12 Jun 2017 09:42:43 +0300 Message-Id: <1497249767-15353-2-git-send-email-artemyko@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1497249767-15353-1-git-send-email-artemyko@mellanox.com> References: <1497249767-15353-1-git-send-email-artemyko@mellanox.com> 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 Expose tag matching capabilities and show them in ibv_devinfo. * max_rndv_hdr_size - Max size of RNDV message * max_num_tags - Max number of entries in tag matching list * max_ops - Max number of outstanding list operations * max_sge - Max number of SGE in a tag matching entry * capability_flags - TM capabilities mask: - IBV_TM_CAP_RC - Support tag matching on RC transport Change-Id: I6f15a6db209155be6406bb54c714796047979f68 Signed-off-by: Artemy Kovalyov Reviewed-by: Yishai Hadas --- libibverbs/verbs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index b27dfd1..43fa386 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -259,6 +259,23 @@ enum ibv_raw_packet_caps { IBV_RAW_PACKET_CAP_IP_CSUM = 1 << 2, }; +enum ibv_tm_cap_flags { + IBV_TM_CAP_RC = 1 << 0 +}; + +struct ibv_tm_caps { + /* Max size for RNDV message */ + uint32_t max_rndv_hdr_size; + /* Max number of entries in tag matching list */ + uint32_t max_num_tags; + /* TM capabilities mask - enumerated in ibv_tm_cap_flags */ + uint32_t capability_flags; + /* Max number of outstanding list operations */ + uint32_t max_ops; + /* Max number of SGE in a tag matching entry */ + uint32_t max_sge; +}; + struct ibv_device_attr_ex { struct ibv_device_attr orig_attr; uint32_t comp_mask; @@ -271,6 +288,7 @@ struct ibv_device_attr_ex { uint32_t max_wq_type_rq; struct ibv_packet_pacing_caps packet_pacing_caps; uint32_t raw_packet_caps; /* Use ibv_raw_packet_caps */ + struct ibv_tm_caps tm_caps; }; enum ibv_mtu {