From patchwork Thu Feb 18 17:25:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 80363 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1IHP1QR001005 for ; Thu, 18 Feb 2010 17:25:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758553Ab0BRRZA (ORCPT ); Thu, 18 Feb 2010 12:25:00 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:40237 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758508Ab0BRRY7 (ORCPT ); Thu, 18 Feb 2010 12:24:59 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 18 Feb 2010 19:24:57 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Feb 2010 19:24:57 +0200 Date: Thu, 18 Feb 2010 19:25:04 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list , ewg Subject: [PATCHv8 2/4] libibverbs: change kernel API to accept link layer Message-ID: <20100218172504.GN12286@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 18 Feb 2010 17:24:57.0561 (UTC) FILETIME=[4AEA9490:01CAB0BF] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17202.000 X-TM-AS-Result: No--5.124000-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 18 Feb 2010 17:25:01 +0000 (UTC) diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h index 0db083a..619ea7e 100644 --- a/include/infiniband/kern-abi.h +++ b/include/infiniband/kern-abi.h @@ -223,7 +223,8 @@ struct ibv_query_port_resp { __u8 active_width; __u8 active_speed; __u8 phys_state; - __u8 reserved[3]; + __u8 link_layer; + __u8 reserved[2]; }; struct ibv_alloc_pd { diff --git a/man/ibv_query_port.3 b/man/ibv_query_port.3 index 882470d..6d8b873 100644 --- a/man/ibv_query_port.3 +++ b/man/ibv_query_port.3 @@ -44,6 +44,7 @@ uint8_t init_type_reply;/* Type of initialization performed by S uint8_t active_width; /* Currently active link width */ uint8_t active_speed; /* Currently active link speed */ uint8_t phys_state; /* Physical port state */ +uint8_t link_layer; /* link layer protocol of the port */ .in -8 }; .sp diff --git a/src/cmd.c b/src/cmd.c index cbd5288..39af833 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -196,6 +196,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num, port_attr->active_width = resp.active_width; port_attr->active_speed = resp.active_speed; port_attr->phys_state = resp.phys_state; + port_attr->link_layer = resp.link_layer; return 0; }