From patchwork Tue Mar 9 10:39:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 84262 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 o29AeDZl002236 for ; Tue, 9 Mar 2010 10:40:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320Ab0CIKj5 (ORCPT ); Tue, 9 Mar 2010 05:39:57 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:36331 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753855Ab0CIKjz (ORCPT ); Tue, 9 Mar 2010 05:39:55 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 9 Mar 2010 12:39:50 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 9 Mar 2010 12:39:50 +0200 Message-ID: <4B96256C.7000406@dev.mellanox.co.il> Date: Tue, 09 Mar 2010 12:39:40 +0200 From: Yevgeny Kliteynik User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: libibumad: added link_layer for RoCEE support and updated umad version X-OriginalArrivalTime: 09 Mar 2010 10:39:50.0565 (UTC) FILETIME=[D8AA9550:01CABF74] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17238.005 X-TM-AS-Result: No--10.751700-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]); Tue, 09 Mar 2010 10:40:14 +0000 (UTC) diff --git a/libibumad/include/infiniband/umad.h b/libibumad/include/infiniband/umad.h index 1f82183..f9da204 100644 --- a/libibumad/include/infiniband/umad.h +++ b/libibumad/include/infiniband/umad.h @@ -116,6 +116,7 @@ typedef struct ib_user_mad { #define SYS_PORT_RATE "rate" #define SYS_PORT_GUID "port_guid" #define SYS_PORT_GID "gids/0" +#define SYS_PORT_LINK_LAYER "link_layer" typedef struct umad_port { char ca_name[UMAD_CA_NAME_LEN]; @@ -132,6 +133,7 @@ typedef struct umad_port { uint64_t port_guid; unsigned pkeys_size; uint16_t *pkeys; + char link_layer[UMAD_CA_NAME_LEN]; } umad_port_t; typedef struct umad_ca { diff --git a/libibumad/libibumad.ver b/libibumad/libibumad.ver index 57cddbd..225738c 100644 --- a/libibumad/libibumad.ver +++ b/libibumad/libibumad.ver @@ -6,4 +6,4 @@ # API_REV - advance on any added API # RUNNING_REV - advance any change to the vendor files # AGE - number of backward versions the API still supports -LIBVERSION=2:1:0 +LIBVERSION=2:2:0 diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c index 277ae6b..d16e750 100644 --- a/libibumad/src/umad.c +++ b/libibumad/src/umad.c @@ -159,6 +159,11 @@ static int get_port(char *ca_name, char *dir, int portnum, umad_port_t * port) if (sys_read_uint(port_dir, SYS_PORT_CAPMASK, &port->capmask) < 0) goto clean; + if (sys_read_string(port_dir, SYS_PORT_LINK_LAYER, + port->link_layer, UMAD_CA_NAME_LEN) < 0) + /* assume IB by default */ + sprintf(port->link_layer, "IB"); + port->capmask = htonl(port->capmask); if (sys_read_gid(port_dir, SYS_PORT_GID, gid) < 0)