From patchwork Mon Jun 12 06:42:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemy Kovalyov X-Patchwork-Id: 9780489 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 C80FC6038F for ; Mon, 12 Jun 2017 06:42:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B87AB283FF for ; Mon, 12 Jun 2017 06:42:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD7E7284C3; Mon, 12 Jun 2017 06:42:58 +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 5AA8A283FF for ; Mon, 12 Jun 2017 06:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbdFLGm4 (ORCPT ); Mon, 12 Jun 2017 02:42:56 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:45629 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752371AbdFLGmz (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:48 +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 v5C6glRG025263; 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 2/5] verbs: Introduce tag matching SRQ Date: Mon, 12 Jun 2017 09:42:44 +0300 Message-Id: <1497249767-15353-3-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 Introducing tag matching SRQ (TM-SRQ), which retains basic semantic of regular SRQ, reports completions to own CQ, and has additional tag based message receiving mechanism. Change-Id: Ic527680984f343608507ba2162147435be2f7aee Signed-off-by: Artemy Kovalyov Reviewed-by: Yishai Hadas --- libibverbs/verbs.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 43fa386..120471a 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -666,7 +666,8 @@ struct ibv_srq_init_attr { enum ibv_srq_type { IBV_SRQT_BASIC, - IBV_SRQT_XRC + IBV_SRQT_XRC, + IBV_SRQT_TAG_MATCHING }; enum ibv_srq_init_attr_mask { @@ -674,7 +675,13 @@ enum ibv_srq_init_attr_mask { IBV_SRQ_INIT_ATTR_PD = 1 << 1, IBV_SRQ_INIT_ATTR_XRCD = 1 << 2, IBV_SRQ_INIT_ATTR_CQ = 1 << 3, - IBV_SRQ_INIT_ATTR_RESERVED = 1 << 4 + IBV_SRQ_INIT_ATTR_TAG_MATCHING = 1 << 4, + IBV_SRQ_INIT_ATTR_RESERVED = 1 << 5 +}; + +struct ibv_tm_cap { + uint32_t max_num_tags; + uint32_t max_ops; }; struct ibv_srq_init_attr_ex { @@ -686,6 +693,7 @@ struct ibv_srq_init_attr_ex { struct ibv_pd *pd; struct ibv_xrcd *xrcd; struct ibv_cq *cq; + struct ibv_tm_cap tm_cap; }; enum ibv_wq_type {