From patchwork Tue Feb 11 12:31:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 3626801 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D24829F383 for ; Tue, 11 Feb 2014 12:31:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 199BF201CD for ; Tue, 11 Feb 2014 12:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D3F1201F4 for ; Tue, 11 Feb 2014 12:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbaBKMbL (ORCPT ); Tue, 11 Feb 2014 07:31:11 -0500 Received: from mailp.voltaire.com ([193.47.165.129]:44284 "EHLO mellanox.co.il" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750812AbaBKMbK (ORCPT ); Tue, 11 Feb 2014 07:31:10 -0500 Received: from Internal Mail-Server by MTLPINE2 (envelope-from ogerlitz@mellanox.com) with SMTP; 11 Feb 2014 14:31:06 +0200 Received: from r-vnc04.mtr.labs.mlnx (r-vnc04.mtr.labs.mlnx [10.208.0.116]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id s1BCV5R8019240; Tue, 11 Feb 2014 14:31:06 +0200 From: Or Gerlitz To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, monis@mellanox.com, matanb@mellanox.com, amirv@mellanox.com, yishaih@mellanox.com, dledford@redhat.com, Or Gerlitz Subject: [PATCH V1 libibverbs 1/3] Add ibv_port_cap_flags Date: Tue, 11 Feb 2014 14:31:02 +0200 Message-Id: <1392121864-9672-2-git-send-email-ogerlitz@mellanox.com> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1392121864-9672-1-git-send-email-ogerlitz@mellanox.com> References: <1392121864-9672-1-git-send-email-ogerlitz@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 From: Matan Barak Add an enum that describes ibv_port_cap_flags that complies with the respective kernel enum and modify the existing field in struct ibv_port_attr to be of that type. This value could be fetched when using ibv_query_port. Signed-off-by: Matan Barak Signed-off-by: Or Gerlitz --- include/infiniband/verbs.h | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 5064636..a79a1de 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -186,6 +186,28 @@ enum { IBV_LINK_LAYER_ETHERNET, }; +enum ibv_port_cap_flags { + IBV_PORT_SM = 1 << 1, + IBV_PORT_NOTICE_SUP = 1 << 2, + IBV_PORT_TRAP_SUP = 1 << 3, + IBV_PORT_OPT_IPD_SUP = 1 << 4, + IBV_PORT_AUTO_MIGR_SUP = 1 << 5, + IBV_PORT_SL_MAP_SUP = 1 << 6, + IBV_PORT_MKEY_NVRAM = 1 << 7, + IBV_PORT_PKEY_NVRAM = 1 << 8, + IBV_PORT_LED_INFO_SUP = 1 << 9, + IBV_PORT_SYS_IMAGE_GUID_SUP = 1 << 11, + IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, + IBV_PORT_EXTENDED_SPEEDS_SUP = 1 << 14, + IBV_PORT_CM_SUP = 1 << 16, + IBV_PORT_SNMP_TUNNEL_SUP = 1 << 17, + IBV_PORT_REINIT_SUP = 1 << 18, + IBV_PORT_DEVICE_MGMT_SUP = 1 << 19, + IBV_PORT_VENDOR_CLASS = 1 << 24, + IBV_PORT_CLIENT_REG_SUP = 1 << 25, + IBV_PORT_IP_BASED_GIDS = 1 << 26, +}; + struct ibv_port_attr { enum ibv_port_state state; enum ibv_mtu max_mtu;