From patchwork Wed Feb 20 14:57:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10822269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFD6E1575 for ; Wed, 20 Feb 2019 14:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 989A42E5FE for ; Wed, 20 Feb 2019 14:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C8112E620; Wed, 20 Feb 2019 14:58:03 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 335342E5FE for ; Wed, 20 Feb 2019 14:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726591AbfBTO6B (ORCPT ); Wed, 20 Feb 2019 09:58:01 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:33029 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbfBTO6A (ORCPT ); Wed, 20 Feb 2019 09:58:00 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 20 Feb 2019 16:57:55 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x1KEvtNm030847; Wed, 20 Feb 2019 16:57:55 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id x1KEvsij013387; Wed, 20 Feb 2019 16:57:54 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id x1KEvsnW013386; Wed, 20 Feb 2019 16:57:54 +0200 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, monis@mellanox.com, artemyko@mellanox.com, jgg@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 2/6] verbs: Add SRQ as ODP capability support Date: Wed, 20 Feb 2019 16:57:34 +0200 Message-Id: <1550674658-13295-3-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1550674658-13295-1-git-send-email-yishaih@mellanox.com> References: <1550674658-13295-1-git-send-email-yishaih@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 From: Moni Shoua Support in ODP with SRQ is considered as a per-transport capability. Applications need to check that SRQ with ODP is supported if access to an ODP MR happens with a QP that has a shared receive queue. In addition, ibv_devinfo was updated to report this capability. Signed-off-by: Moni Shoua Signed-off-by: Yishai Hadas --- libibverbs/examples/devinfo.c | 5 ++++- libibverbs/man/ibv_query_device_ex.3 | 1 + libibverbs/verbs.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c index 75bdd8c..e928b05 100644 --- a/libibverbs/examples/devinfo.c +++ b/libibverbs/examples/devinfo.c @@ -288,7 +288,8 @@ static void print_odp_trans_caps(uint32_t trans) IBV_ODP_SUPPORT_RECV | IBV_ODP_SUPPORT_WRITE | IBV_ODP_SUPPORT_READ | - IBV_ODP_SUPPORT_ATOMIC); + IBV_ODP_SUPPORT_ATOMIC | + IBV_ODP_SUPPORT_SRQ_RECV); if (!trans) { printf("\t\t\t\t\tNO SUPPORT\n"); @@ -303,6 +304,8 @@ static void print_odp_trans_caps(uint32_t trans) printf("\t\t\t\t\tSUPPORT_READ\n"); if (trans & IBV_ODP_SUPPORT_ATOMIC) printf("\t\t\t\t\tSUPPORT_ATOMIC\n"); + if (trans & IBV_ODP_SUPPORT_SRQ_RECV) + printf("\t\t\t\t\tSUPPORT_SRQ\n"); if (trans & unknown_transport_caps) printf("\t\t\t\t\tUnknown flags: 0x%" PRIX32 "\n", trans & unknown_transport_caps); diff --git a/libibverbs/man/ibv_query_device_ex.3 b/libibverbs/man/ibv_query_device_ex.3 index 3ad9eec..f99f818 100644 --- a/libibverbs/man/ibv_query_device_ex.3 +++ b/libibverbs/man/ibv_query_device_ex.3 @@ -60,6 +60,7 @@ enum ibv_odp_transport_cap_bits { IBV_ODP_SUPPORT_WRITE = 1 << 2, /* RDMA-Write operations support on-demand paging */ IBV_ODP_SUPPORT_READ = 1 << 3, /* RDMA-Read operations support on-demand paging */ IBV_ODP_SUPPORT_ATOMIC = 1 << 4, /* RDMA-Atomic operations support on-demand paging */ + IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5, /* SRQ receive operations support on-demand paging */ }; struct ibv_tso_caps { diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 94e4916..9561e39 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -204,6 +204,7 @@ enum ibv_odp_transport_cap_bits { IBV_ODP_SUPPORT_WRITE = 1 << 2, IBV_ODP_SUPPORT_READ = 1 << 3, IBV_ODP_SUPPORT_ATOMIC = 1 << 4, + IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5, }; struct ibv_odp_caps {