@@ -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 {
@@ -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
@@ -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)