components/open-fabrics/libibverbs/patches/base.patch
author Boris Chiu <Boris.Chiu@Oracle.COM>
Thu, 17 Jan 2013 09:36:55 -0800
changeset 1125 47a52afcc302
parent 1019 9d261d526266
child 1196 cba083182ade
permissions -rw-r--r--
PSARC 2012/384 Fast IB node death detection 16037511 Add support SM events to facilitate fast node death detection (userland)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     1
diff -r -u /tmp/846623/libibverbs-1.1.4/Makefile.am libibverbs-1.1.4/Makefile.am
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     2
--- /tmp/846623/libibverbs-1.1.4/Makefile.am	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     3
+++ libibverbs-1.1.4/Makefile.am	Fri Feb 11 04:02:12 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     4
@@ -4,13 +4,13 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     5
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     6
 AM_CFLAGS = -g -Wall -D_GNU_SOURCE
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     7
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     8
-src_libibverbs_la_CFLAGS = $(AM_CFLAGS) -DIBV_CONFIG_DIR=\"$(sysconfdir)/libibverbs.d\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     9
+src_libibverbs_la_CFLAGS = $(AM_CFLAGS) -DIBV_CONFIG_DIR=\"$(datadir)/libibverbs.d\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    10
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    11
 libibverbs_version_script = @[email protected]
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    12
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    13
 src_libibverbs_la_SOURCES = src/cmd.c src/compat-1_0.c src/device.c src/init.c \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    14
 			    src/marshall.c src/memory.c src/sysfs.c src/verbs.c \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    15
-			    src/enum_strs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    16
+			    src/enum_strs.c src/solaris_compatibility.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    17
 src_libibverbs_la_LDFLAGS = -version-info 1 -export-dynamic \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    18
     $(libibverbs_version_script)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    19
 src_libibverbs_la_DEPENDENCIES = $(srcdir)/src/libibverbs.map
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    20
@@ -37,7 +37,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    21
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    22
 libibverbsinclude_HEADERS = include/infiniband/arch.h include/infiniband/driver.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    23
     include/infiniband/kern-abi.h include/infiniband/opcode.h include/infiniband/verbs.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    24
-    include/infiniband/sa-kern-abi.h include/infiniband/sa.h include/infiniband/marshall.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    25
+    include/infiniband/sa-kern-abi.h include/infiniband/sa.h include/infiniband/marshall.h include/infiniband/ofa_solaris.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    26
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    27
 man_MANS = man/ibv_asyncwatch.1 man/ibv_devices.1 man/ibv_devinfo.1	\
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    28
     man/ibv_rc_pingpong.1 man/ibv_uc_pingpong.1 man/ibv_ud_pingpong.1	\
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    29
@@ -65,6 +65,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    30
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    31
 EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    32
     include/infiniband/opcode.h include/infiniband/verbs.h include/infiniband/marshall.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    33
+	 include/infiniband/ofa_solaris.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    34
     include/infiniband/sa-kern-abi.h include/infiniband/sa.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    35
     src/ibverbs.h examples/pingpong.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    36
     src/libibverbs.map libibverbs.spec.in $(man_MANS)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    37
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_name.3 libibverbs-1.1.4/man/ibv_get_device_name.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    38
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_name.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    39
+++ libibverbs-1.1.4/man/ibv_get_device_name.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    40
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    41
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    42
 .TH IBV_GET_DEVICE_NAME 3  2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    43
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    44
-ibv_get_device_name \- get an RDMA device's name
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    45
+ibv_get_device_name \- get an InfiniBand device's name
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    46
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    47
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    48
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    49
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    50
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    51
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    52
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    53
-returns a human-readable name associated with the RDMA device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    54
+returns a human-readable name associated with the InfiniBand device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    55
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    56
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    57
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    58
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_attach_mcast.3 libibverbs-1.1.4/man/ibv_attach_mcast.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    59
--- /tmp/846623/libibverbs-1.1.4/man/ibv_attach_mcast.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    60
+++ libibverbs-1.1.4/man/ibv_attach_mcast.3	Tue May  3 13:50:06 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    61
@@ -38,9 +38,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    62
 .SH "NOTES"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    63
 Only QPs of Transport Service Type
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    64
 .BR IBV_QPT_UD
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    65
-or
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    66
-.BR IBV_QPT_RAW_PACKET
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    67
-may be attached to multicast groups.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    68
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    69
 If a QP is attached to the same multicast group multiple times, the QP will still receive a single copy of a multicast message.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    70
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    71
@@ -48,22 +45,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    72
 multicast group must be sent to the subnet administrator (SA), so that
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    73
 the fabric's multicast routing is configured to deliver messages to
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    74
 the local port.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    75
-.SH EXAMPLE
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    76
-	An example of the use of ibv_attach_mcast with RAW ETH QP:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    77
-.nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    78
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    79
-	union ibv_gid mgid;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    80
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    81
-	memset(&mgid, 0, sizeof(union ibv_gid));
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    82
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    83
-	memcpy(&mgid.raw[10], mmac, 6);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    84
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    85
-	if (ibv_attach_mcast(qp, &mgid, 0)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    86
-		printf ("Failed to attach qp to mcast. Errno: %d\\n",errno);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    87
-		return 1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    88
-	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    89
-.fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    90
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    91
 .SH "SEE ALSO"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    92
 .BR ibv_create_qp (3)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    93
 .SH "AUTHORS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    94
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_modify_qp.3 libibverbs-1.1.4/man/ibv_modify_qp.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    95
--- /tmp/846623/libibverbs-1.1.4/man/ibv_modify_qp.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    96
+++ libibverbs-1.1.4/man/ibv_modify_qp.3	Tue May  3 13:50:06 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    97
@@ -161,7 +161,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    98
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    99
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   100
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   101
-For QP Transport Service Type \fB IBV_QPT_RAW_PACKET\fR:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   102
+For QP Transport Service Type:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   103
 .sp
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   104
 Next state     Required attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   105
 \-\-\-\-\-\-\-\-\-\-     \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   106
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_devinfo.1 libibverbs-1.1.4/man/ibv_devinfo.1
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   107
--- /tmp/846623/libibverbs-1.1.4/man/ibv_devinfo.1	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   108
+++ libibverbs-1.1.4/man/ibv_devinfo.1	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   109
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   110
 .TH IBV_DEVINFO 1 "August 30, 2005" "libibverbs" "USER COMMANDS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   111
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   112
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   113
-ibv_devinfo \- query RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   114
+ibv_devinfo \- query InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   115
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   116
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   117
 .B ibv_devinfo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   118
@@ -9,7 +9,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   119
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   120
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   121
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   122
-Print information about RDMA devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   123
+Print information about InfiniBand devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   124
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   125
 .SH OPTIONS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   126
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   127
@@ -22,10 +22,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   128
 query port \fIPORT\fR (default all ports)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   129
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   130
 \fB\-l\fR, \fB\-\-list\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   131
-only list names of RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   132
+only list names of InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   133
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   134
 \fB\-v\fR, \fB\-\-verbose\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   135
-print all available information about RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   136
+print all available information about InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   137
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   138
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   139
 .BR ibv_devices (1)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   140
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_query_qp.3 libibverbs-1.1.4/man/ibv_query_qp.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   141
--- /tmp/846623/libibverbs-1.1.4/man/ibv_query_qp.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   142
+++ libibverbs-1.1.4/man/ibv_query_qp.3	Mon Mar 28 03:11:47 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   143
@@ -68,7 +68,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   144
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   145
 .I attr_mask
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   146
 is a hint that specifies the minimum list of attributes to retrieve.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   147
-Some RDMA devices may return extra attributes not requested, for
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   148
+Some InfiniBand devices may return extra attributes not requested, for
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   149
 example if the value can be returned cheaply. This has the same
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   150
 form as in
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   151
 .B ibv_modify_qp()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   152
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_guid.3 libibverbs-1.1.4/man/ibv_get_device_guid.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   153
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_guid.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   154
+++ libibverbs-1.1.4/man/ibv_get_device_guid.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   155
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   156
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   157
 .TH IBV_GET_DEVICE_GUID 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   158
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   159
-ibv_get_device_guid \- get an RDMA device's GUID
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   160
+ibv_get_device_guid \- get an InfiniBand device's GUID
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   161
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   162
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   163
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   164
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   165
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   166
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   167
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   168
-returns the Global Unique IDentifier (GUID) of the RDMA device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   169
+returns the Global Unique IDentifier (GUID) of the InfiniBand device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   170
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   171
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   172
 .B ibv_get_device_guid()
1019
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   173
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_post_send.3 libibverbs-1.1.4/man/ibv_post_send.3
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   174
--- /tmp/846623/libibverbs-1.1.4/man/ibv_post_send.3	Thu Mar 10 06:58:20 2011
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   175
+++ libibverbs-1.1.4/man/ibv_post_send.3	Tue Nov 13 10:04:25 2012
1019
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   176
@@ -91,14 +91,17 @@
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   177
 The attribute send_flags describes the properties of the \s-1WR\s0. It is either 0 or the bitwise \s-1OR\s0 of one or more of the following flags:
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   178
 .PP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   179
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   180
-.B IBV_SEND_FENCE \fR Set the fence indicator.  Valid only for QPs with Transport Service Type \fBIBV_QPT_RC
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   181
+.B IBV_SEND_FENCE \fR
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   182
+Set the fence indicator.  Valid only for QPs with Transport Service Type \fBIBV_QPT_RC
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   183
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   184
-.B IBV_SEND_SIGNALED \fR Set the completion notification indicator.  Relevant only if QP was created with sq_sig_all=0
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   185
+.B IBV_SEND_SIGNALED \fR
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   186
+Set the completion notification indicator.  Relevant only if QP was created with sq_sig_all=0
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   187
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   188
-.B IBV_SEND_SOLICITED \fR Set the solicited event indicator.  Valid only for Send and RDMA Write with immediate
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   189
+.B IBV_SEND_SOLICITED \fR
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   190
+Set the solicited event indicator.  Valid only for Send and RDMA Write with immediate
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   191
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   192
-.B IBV_SEND_INLINE \fR Send data in given gather list as inline data
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   193
-in a send WQE.  Valid only for Send and RDMA Write.  The L_Key will not be checked.
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   194
+.B IBV_SEND_INLINE \fR
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   195
+Send data in given gather list as inline data in a send WQE.  Valid only for Send and RDMA Write.  The L_Key will not be checked.
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   196
 .SH "RETURN VALUE"
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   197
 .B ibv_post_send()
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   198
 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   199
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_alloc_pd.3 libibverbs-1.1.4/man/ibv_alloc_pd.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   200
--- /tmp/846623/libibverbs-1.1.4/man/ibv_alloc_pd.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   201
+++ libibverbs-1.1.4/man/ibv_alloc_pd.3	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   202
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   203
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   204
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   205
 .B ibv_alloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   206
-allocates a PD for the RDMA device context 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   207
+allocates a PD for the InfiniBand device context 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   208
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   209
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   210
 .B ibv_dealloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   211
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_async_event.3 libibverbs-1.1.4/man/ibv_get_async_event.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   212
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_async_event.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   213
+++ libibverbs-1.1.4/man/ibv_get_async_event.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   214
@@ -14,7 +14,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   215
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   216
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   217
 .B ibv_get_async_event()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   218
-waits for the next async event of the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   219
+waits for the next async event of the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   220
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   221
 and returns it through the pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   222
 .I event\fR,
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   223
@@ -29,6 +29,8 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   224
 struct ibv_qp  *qp;             /* QP that got the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   225
 struct ibv_srq *srq;            /* SRQ that got the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   226
 int             port_num;       /* port number that got the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   227
+uint32_t        xrc_qp_num;     /* XRC QP that got the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   228
+union ibv_gid   gid;            /* list of guids that got the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   229
 .in -8
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   230
 } element;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   231
 enum ibv_event_type     event_type;     /* type of the event */
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   232
@@ -86,6 +88,16 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   233
 .TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   234
 .B IBV_EVENT_DEVICE_FATAL \fR CA is in FATAL state
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   235
 .PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   236
+.I Subnet events:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   237
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   238
+.B IBV_SM_EVENT_MCG_CREATED \fR notification of MCG creation
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   239
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   240
+.B IBV_SM_EVENT_MCG_DELETED \fR notification of MCG deletion
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   241
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   242
+.B IBV_SM_EVENT_GID_AVAIL \fR notification of GID available events
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   243
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   244
+.B IBV_SM_EVENT_GID_UNAVAIL \fR notification of GID unavailable events
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   245
+.PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   246
 .B ibv_ack_async_event()
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   247
 acknowledge the async event
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   248
 .I event\fR.
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   249
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_list.3 libibverbs-1.1.4/man/ibv_get_device_list.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   250
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_list.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   251
+++ libibverbs-1.1.4/man/ibv_get_device_list.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   252
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   253
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   254
 .TH IBV_GET_DEVICE_LIST 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   255
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   256
-ibv_get_device_list, ibv_free_device_list \- get and release list of available RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   257
+ibv_get_device_list, ibv_free_device_list \- get and release list of available InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   258
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   259
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   260
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   261
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   262
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   263
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   264
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   265
-returns a NULL-terminated array of RDMA devices currently available.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   266
+returns a NULL-terminated array of InfiniBand devices currently available.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   267
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   268
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   269
 is optional; if not NULL, it is set to the number of devices returned in the array.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   270
@@ -25,7 +25,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   271
 .B ibv_get_device_list()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   272
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   273
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   274
-returns the array of available RDMA devices, or sets
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   275
+returns the array of available InfiniBand devices, or sets
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   276
 .I errno
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   277
 and returns NULL if the request fails. If no devices are found then
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   278
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   279
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_query_device.3 libibverbs-1.1.4/man/ibv_query_device.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   280
--- /tmp/846623/libibverbs-1.1.4/man/ibv_query_device.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   281
+++ libibverbs-1.1.4/man/ibv_query_device.3	Mon Mar 28 03:11:47 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   282
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   283
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   284
 .TH IBV_QUERY_DEVICE 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   285
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   286
-ibv_query_device \- query an RDMA device's attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   287
+ibv_query_device \- query an InfiniBand device's attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   288
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   289
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   290
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   291
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_query_port.3 libibverbs-1.1.4/man/ibv_query_port.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   292
--- /tmp/846623/libibverbs-1.1.4/man/ibv_query_port.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   293
+++ libibverbs-1.1.4/man/ibv_query_port.3	Mon Mar 28 03:11:47 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   294
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   295
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   296
 .TH IBV_QUERY_PORT 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   297
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   298
-ibv_query_port \- query an RDMA port's attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   299
+ibv_query_port \- query an InfiniBand port's attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   300
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   301
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   302
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   303
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_asyncwatch.1 libibverbs-1.1.4/man/ibv_asyncwatch.1
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   304
--- /tmp/846623/libibverbs-1.1.4/man/ibv_asyncwatch.1	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   305
+++ libibverbs-1.1.4/man/ibv_asyncwatch.1	Mon Mar 28 03:11:45 2011
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   306
@@ -1,16 +1,78 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   307
-.TH IBV_ASYNCWATCH 1 "August 30, 2005" "libibverbs" "USER COMMANDS"
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   308
+'\" te
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   309
+.TH IBV_ASYNCWATCH 1 "August 8, 2012" "libibverbs" "USER COMMANDS"
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   310
 
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   311
 .SH NAME
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   312
 ibv_asyncwatch \- display asynchronous events
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   313
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   314
 .SH SYNOPSIS
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   315
-.B ibv_asyncwatch
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   316
-
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   317
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   318
+.nf
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   319
+\fIibv_asyncwatch\fR [\-G | \-M] [\-s[<guid>]] [\-p port]
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   320
+\fIibv_asyncwactch\fR \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   321
+\fIibv_asyncwatch\fR \-G \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   322
+\fIibv_asyncwatch\fR \-M \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   323
+\fIibv_asyncwatch\fR \-G [\-p port] \-s<guid1>,<guid2>,...
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   324
+\fIibv_asyncwatch\fR \-M [\-p port] \-s<mgid1>,<mgid2>,...
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   325
+.fi
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   326
+.sp
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   327
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   328
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   329
-Display asynchronous events forwarded to userspace for an RDMA device.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   330
+Display asynchronous events forwarded to userspace for an InfiniBand device.
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   331
+SM events can be monitored using the '-s' option, which optionally
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   332
+takes a remote port GUID, or list of remote port GUIDS separated by ','.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   333
+If '-s' is specified with no argument then all remote nodes reachable
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   334
+form device 0 are monitored, otherwise only the specified remote
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   335
+nodes are monitored. The following SM events are monitored using
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   336
+the '-s' option: 
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   337
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   338
-.SH AUTHORS
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   339
-.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   340
-Roland Dreier
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   341
-.RI < [email protected] >
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   342
+    IBV_SM_EVENT_MCG_CREATED
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   343
+         An MCG specified by the "mgid" has been created
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   344
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   345
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   346
+    IBV_SM_EVENT_MCG_DELETED
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   347
+         The MCG specified by the "mgid" has been deleted
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   348
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   349
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   350
+    IBV_SM_EVENT_GID_AVAIL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   351
+         The GID specified by the "guid" is available
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   352
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   353
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   354
+    IBV_SM_EVENT_GID_UNAVAIL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   355
+         The GID specified by the "guid" is no longer
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   356
+         available on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   357
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   358
+.SH OPTIONS
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   359
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   360
+\-G               Monitor SM event for Unicast GIDs
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   361
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   362
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   363
+\-M               Monitor SM event for Multicast GIDs
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   364
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   365
+\-s<GUID>         Takes as an optional argument a comma separated list of remote port GUIDs if \-G is specified or Multicast GIDs if \-M is specified.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   366
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   367
+.PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   368
+\-p <port>        use the specified ca_port.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   369
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   370
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   371
+.SH EXAMPLES
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   372
+.PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   373
+To monitor event=IBV_SM_EVENT_ALL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   374
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   375
+ibv_asyncwatch -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   376
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   377
+To monitor event=IBV_SM_EVENT_UGID_ALL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   378
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   379
+ibv_asyncwatch -G -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   380
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   381
+To monitor event=IBV_SM_EVENT_MGID_ALL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   382
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   383
+ibv_asyncwatch -M -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   384
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   385
+To monitor event=IBV_SM_EVENT_UGID
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   386
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   387
+ibv_asyncwatch -G -s0x0021280001a0e4d9,0x0021280001a0e4da
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   388
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   389
+To monitor event=IBV_SM_EVENT_MGID
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   390
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   391
+ibv_asyncwatch -M -s0xff12:4001:ffff::c:2238
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   392
+.sp
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   393
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_open_device.3 libibverbs-1.1.4/man/ibv_open_device.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   394
--- /tmp/846623/libibverbs-1.1.4/man/ibv_open_device.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   395
+++ libibverbs-1.1.4/man/ibv_open_device.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   396
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   397
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   398
 .TH IBV_OPEN_DEVICE 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   399
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   400
-ibv_open_device, ibv_close_device \- open and close an RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   401
+ibv_open_device, ibv_close_device \- open and close an InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   402
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   403
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   404
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   405
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_create_comp_channel.3 libibverbs-1.1.4/man/ibv_create_comp_channel.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   406
--- /tmp/846623/libibverbs-1.1.4/man/ibv_create_comp_channel.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   407
+++ libibverbs-1.1.4/man/ibv_create_comp_channel.3	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   408
@@ -15,7 +15,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   409
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   410
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   411
 .B ibv_create_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   412
-creates a completion event channel for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   413
+creates a completion event channel for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   414
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   415
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   416
 .B ibv_destroy_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   417
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_create_cq.3 libibverbs-1.1.4/man/ibv_create_cq.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   418
--- /tmp/846623/libibverbs-1.1.4/man/ibv_create_cq.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   419
+++ libibverbs-1.1.4/man/ibv_create_cq.3	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   420
@@ -18,7 +18,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   421
 .B ibv_create_cq()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   422
 creates a completion queue (CQ) with at least
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   423
 .I cqe
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   424
-entries for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   425
+entries for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   426
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   427
 The pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   428
 .I cq_context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   429
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_devices.1 libibverbs-1.1.4/man/ibv_devices.1
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   430
--- /tmp/846623/libibverbs-1.1.4/man/ibv_devices.1	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   431
+++ libibverbs-1.1.4/man/ibv_devices.1	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   432
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   433
 .TH IBV_DEVICES 1 "August 30, 2005" "libibverbs" "USER COMMANDS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   434
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   435
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   436
-ibv_devices \- list RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   437
+ibv_devices \- list InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   438
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   439
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   440
 .B ibv_devices
869
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   441
@@ -8,8 +8,37 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   442
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   443
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   444
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   445
-List RDMA devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   446
+List InfiniBand devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   447
 
869
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   448
+On SR-IOV capable systems, if a domain is configured with
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   449
+VFs (Virtual Function), ibv_devices lists for each IB device
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   450
+the node GUID and the type (PF or VF).  In this case, the PF
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   451
+devices are displayed before the VF devices.  The following
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   452
+shows the results of running ibv_devices on a domain with
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   453
+one PF and two VFs:
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   454
+
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   455
+    device                 node GUID            type
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   456
+    ------              ----------------        ----
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   457
+    mlx4_2              00212800013f3126         PF
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   458
+    mlx4_0              00212d00013f3126         VF
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   459
+    mlx4_1              00212900013f3126         VF
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   460
+
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   461
+If all of the IB devices are PFs, only node GUIDs are
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   462
+listed.  The following shows the results of running
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   463
+ibv_devices on a domain with one PF and no VFs:
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   464
+
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   465
+    device                 node GUID
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   466
+    ------              ----------------
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   467
+    mlx4_0              00212800013f3126
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   468
+
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   469
+On systems which are not SR-IOV capable only node GUIDs are
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   470
+listed.
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   471
+
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   472
+    device                 node GUID
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   473
+    ------              ----------------
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   474
+    mlx4_0              0021280001a0e4d8
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   475
+    mlx4_1              0021280001a0e754
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   476
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   477
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   478
 .BR ibv_devinfo (1)
869
ab908b713ec5 7176714 ibv_devices man page needs to be updated to show PF or VF
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 851
diff changeset
   479
 
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   480
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_create_qp.3 libibverbs-1.1.4/man/ibv_create_qp.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   481
--- /tmp/846623/libibverbs-1.1.4/man/ibv_create_qp.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   482
+++ libibverbs-1.1.4/man/ibv_create_qp.3	Tue May  3 13:50:06 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   483
@@ -28,7 +28,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   484
 struct ibv_cq          *recv_cq;        /* CQ to be associated with the Receive Queue (RQ) */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   485
 struct ibv_srq         *srq;            /* SRQ handle if QP is to be associated with an SRQ, otherwise NULL */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   486
 struct ibv_qp_cap       cap;            /* QP capabilities */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   487
-enum ibv_qp_type        qp_type;        /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD, IBV_QPT_XRC or IBV_QPT_RAW_PACKET */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   488
+enum ibv_qp_type        qp_type;        /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD, IBV_QPT_XRC */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   489
 int                     sq_sig_all;     /* If set, each Work Request (WR) submitted to the SQ generates a completion entry */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   490
 struct ibv_xrc_domain  *xrc_domain;     /* XRC domain the QP will be associated with (valid only for IBV_QPT_XRC QP), otherwise NULL */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   491
 .in -8
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   492
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_create_ah_from_wc.3 libibverbs-1.1.4/man/ibv_create_ah_from_wc.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   493
--- /tmp/846623/libibverbs-1.1.4/man/ibv_create_ah_from_wc.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   494
+++ libibverbs-1.1.4/man/ibv_create_ah_from_wc.3	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   495
@@ -21,7 +21,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   496
 .B ibv_init_ah_from_wc()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   497
 initializes the address handle (AH) attribute structure
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   498
 .I ah_attr
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   499
-for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   500
+for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   501
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   502
 using the port number
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   503
 .I port_num\fR,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   504
diff -r -u /tmp/846623/libibverbs-1.1.4/src/kern_abi.h libibverbs-1.1.4/src/kern_abi.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   505
--- /tmp/846623/libibverbs-1.1.4/src/kern_abi.h	Wed Sep 16 04:27:22 2009
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   506
+++ libibverbs-1.1.4/src/kern_abi.h	Fri Feb 11 04:02:32 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   507
@@ -33,7 +33,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   508
 #ifndef KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   509
 #define KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   510
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   511
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   512
 #include <linux/types.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   513
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   514
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   515
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   516
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   517
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   518
  * Increment this value if any changes that break userspace ABI
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   519
@@ -47,7 +51,10 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   520
 	IB_USER_VERBS_CMD_ALLOC_PD,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   521
 	IB_USER_VERBS_CMD_DEALLOC_PD,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   522
 	IB_USER_VERBS_CMD_REG_MR,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   523
-	IB_USER_VERBS_CMD_DEREG_MR
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   524
+	IB_USER_VERBS_CMD_DEREG_MR,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   525
+	IB_USER_VERBS_CMD_REG_MR_RELAXED,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   526
+	IB_USER_VERBS_CMD_DEREG_MR_RELAXED,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   527
+	IB_USER_VERBS_CMD_FLUSH_RELAXED_MR
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   528
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   529
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   530
 /*
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   531
diff -r -u /tmp/846623/libibverbs-1.1.4/src/verbs.c libibverbs-1.1.4/src/verbs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   532
--- /tmp/846623/libibverbs-1.1.4/src/verbs.c	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   533
+++ libibverbs-1.1.4/src/verbs.c	Fri Feb 11 04:02:33 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   534
@@ -41,6 +41,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   535
 #include <stdlib.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   536
 #include <errno.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   537
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   538
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   539
+#include <fcntl.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   540
+#include <sys/stat.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   541
+#include <sys/mkdev.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   542
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   543
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   544
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   545
 
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   546
@@ -93,6 +98,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   547
 int __ibv_query_gid(struct ibv_context *context, uint8_t port_num,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   548
 		    int index, union ibv_gid *gid)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   549
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   550
+#if defined(__SVR4) && defined(__sun)
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   551
+	extern int sol_ibv_query_gid();
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   552
+
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   553
+	return sol_ibv_query_gid(context, port_num, index, gid);
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   554
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   555
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   556
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   557
 	char attr[41];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   558
 	uint16_t val;
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   559
@@ -112,6 +123,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   560
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   561
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   562
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   563
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   564
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   565
 default_symver(__ibv_query_gid, ibv_query_gid);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   566
 
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   567
@@ -118,6 +130,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   568
 int __ibv_query_pkey(struct ibv_context *context, uint8_t port_num,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   569
 		     int index, uint16_t *pkey)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   570
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   571
+#if defined(__SVR4) && defined(__sun)
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   572
+	extern int sol_ibv_query_pkey();
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   573
+
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   574
+	return sol_ibv_query_pkey(context, port_num, index, pkey);
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   575
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   576
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   577
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   578
 	char attr[8];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   579
 	uint16_t val;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   580
@@ -133,9 +151,142 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   581
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   582
 	*pkey = htons(val);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   583
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   584
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   585
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   586
 default_symver(__ibv_query_pkey, ibv_query_pkey);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   587
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   588
+int ibv_register_sm_events(struct ibv_context *context,
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   589
+    ibv_sm_event_type_t event, uint_t gid_num, union ibv_gid *gids)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   590
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   591
+	struct ibv_reg_sm_event		*cmd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   592
+	int				rc, cmd_size, data_size;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   593
+	void				*data_p;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   594
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   595
+	if (((gid_num > 0) && (gids == NULL)) ||
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   596
+	   ((gid_num == 0) && (gids != NULL))) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   597
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   598
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   599
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   600
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   601
+	if ((event != IBV_SM_EVENT_UGID) && (event != IBV_SM_EVENT_UGID_ALL) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   602
+	    (event != IBV_SM_EVENT_MGID) && (event != IBV_SM_EVENT_MGID_ALL) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   603
+	    (event != IBV_SM_EVENT_ALL)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   604
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   605
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   606
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   607
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   608
+	if (((event == IBV_SM_EVENT_UGID) || (event == IBV_SM_EVENT_MGID)) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   609
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   610
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   611
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   612
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   613
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   614
+	if (((event == IBV_SM_EVENT_UGID_ALL) ||
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   615
+	    (event == IBV_SM_EVENT_MGID_ALL) || (event == IBV_SM_EVENT_ALL)) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   616
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   617
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   618
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   619
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   620
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   621
+	data_size = gid_num * (sizeof (union ibv_gid));
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   622
+	cmd_size = (sizeof (struct ibv_reg_sm_event)) + data_size;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   623
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   624
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   625
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   626
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   627
+	IBV_INIT_CMD(cmd, cmd_size, REG_SM_EVENT);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   628
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   629
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   630
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   631
+		memcpy(cmd->driver_data, data_p, data_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   632
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   633
+	rc = write(context->cmd_fd, cmd, cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   634
+	if (rc < 0) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   635
+		errno = -rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   636
+		rc = -1;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   637
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   638
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   639
+	return (rc);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   640
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   641
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   642
+int ibv_unregister_sm_events(struct ibv_context *context,
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   643
+    ibv_sm_event_type_t event, uint_t gid_num, union ibv_gid *gids)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   644
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   645
+	struct ibv_unreg_sm_event	*cmd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   646
+	int				rc, cmd_size, data_size;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   647
+	void				*data_p;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   648
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   649
+	if (((gid_num > 0) && (gids == NULL)) ||
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   650
+	   ((gid_num == 0) && (gids != NULL))) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   651
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   652
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   653
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   654
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   655
+	if ((event != IBV_SM_EVENT_UGID) && (event != IBV_SM_EVENT_UGID_ALL) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   656
+	    (event != IBV_SM_EVENT_MGID) && (event != IBV_SM_EVENT_MGID_ALL) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   657
+	    (event != IBV_SM_EVENT_ALL)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   658
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   659
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   660
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   661
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   662
+	if (((event == IBV_SM_EVENT_UGID) || (event == IBV_SM_EVENT_MGID)) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   663
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   664
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   665
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   666
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   667
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   668
+	if (((event == IBV_SM_EVENT_UGID_ALL) ||
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   669
+	    (event == IBV_SM_EVENT_MGID_ALL) || (event == IBV_SM_EVENT_ALL)) &&
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   670
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   671
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   672
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   673
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   674
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   675
+	data_size = gid_num*(sizeof (union ibv_gid));
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   676
+	cmd_size = (sizeof (struct ibv_unreg_sm_event)) + data_size;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   677
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   678
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   679
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   680
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   681
+	IBV_INIT_CMD(cmd, cmd_size, UNREG_SM_EVENT);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   682
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   683
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   684
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   685
+		memcpy(cmd->driver_data, data_p, data_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   686
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   687
+	rc = write(context->cmd_fd, cmd, cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   688
+	if (rc < 0) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   689
+		errno = -rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   690
+		rc = -1;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   691
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   692
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   693
+	return (rc);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   694
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   695
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   696
+int ibv_gid_reachable(struct ibv_context *context,
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   697
+    uint_t port, union ibv_gid *gid_p, int timeout)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   698
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   699
+	struct ibv_gid_reachable	*cmd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   700
+	int				rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   701
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   702
+	cmd = alloca((sizeof (struct ibv_gid_reachable)));
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   703
+	cmd->port_num = port;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   704
+	cmd->timeout = timeout;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   705
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   706
+	IBV_INIT_CMD(cmd, sizeof (struct ibv_gid_reachable),
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   707
+	    GID_REACHABLE);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   708
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   709
+	memcpy(cmd->gid, gid_p, sizeof (*gid_p));
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   710
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   711
+	rc = write(context->cmd_fd, cmd, sizeof(struct ibv_gid_reachable));
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   712
+	if (rc < 0) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   713
+		errno = -rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   714
+		rc = -1;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   715
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   716
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   717
+	return (rc);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   718
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   719
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   720
 struct ibv_pd *__ibv_alloc_pd(struct ibv_context *context)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   721
 {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   722
 	struct ibv_pd *pd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   723
@@ -148,6 +299,27 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   724
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   725
 default_symver(__ibv_alloc_pd, ibv_alloc_pd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   726
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   727
+struct ibv_shpd *__ibv_alloc_shpd(struct ibv_pd *pd, uint64_t share_key, struct ibv_shpd *shpd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   728
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   729
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   730
+	shpd = pd->context->ops.alloc_shpd(pd, share_key, shpd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   731
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   732
+	return shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   733
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   734
+default_symver(__ibv_alloc_shpd, ibv_alloc_shpd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   735
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   736
+struct ibv_pd *__ibv_share_pd(struct ibv_context *context, struct ibv_shpd *shpd, uint64_t share_key)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   737
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   738
+	struct ibv_pd *pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   739
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   740
+	pd = context->ops.share_pd(context, shpd, share_key);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   741
+	if (pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   742
+		pd->context = context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   743
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   744
+	return pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   745
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   746
+default_symver(__ibv_share_pd, ibv_share_pd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   747
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   748
 int __ibv_dealloc_pd(struct ibv_pd *pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   749
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   750
 	return pd->context->ops.dealloc_pd(pd);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   751
@@ -175,6 +347,27 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   752
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   753
 default_symver(__ibv_reg_mr, ibv_reg_mr);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   754
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   755
+struct ibv_mr *__ibv_reg_mr_relaxed(struct ibv_pd *pd, void *addr,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   756
+			    size_t length, int access)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   757
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   758
+	struct ibv_mr *mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   759
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   760
+	if (ibv_dontfork_range(addr, length))
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   761
+		return NULL;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   762
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   763
+	mr = pd->context->ops.reg_mr_relaxed(pd, addr, length, access);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   764
+	if (mr) {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   765
+		mr->context = pd->context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   766
+		mr->pd      = pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   767
+		mr->addr    = addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   768
+		mr->length  = length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   769
+	} else
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   770
+		ibv_dofork_range(addr, length);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   771
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   772
+	return mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   773
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   774
+default_symver(__ibv_reg_mr_relaxed, ibv_reg_mr_relaxed);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   775
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   776
 int __ibv_dereg_mr(struct ibv_mr *mr)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   777
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   778
 	int ret;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   779
@@ -189,6 +382,26 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   780
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   781
 default_symver(__ibv_dereg_mr, ibv_dereg_mr);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   782
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   783
+int __ibv_dereg_mr_relaxed(struct ibv_mr *mr)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   784
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   785
+	int ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   786
+	void *addr	= mr->addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   787
+	size_t length	= mr->length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   788
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   789
+	ret = mr->context->ops.dereg_mr_relaxed(mr);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   790
+	if (!ret)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   791
+		ibv_dofork_range(addr, length);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   792
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   793
+	return ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   794
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   795
+default_symver(__ibv_dereg_mr_relaxed, ibv_dereg_mr_relaxed);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   796
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   797
+int __ibv_flush_relaxed_mr(struct ibv_pd *pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   798
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   799
+	return pd->context->ops.flush_relaxed_mr(pd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   800
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   801
+default_symver(__ibv_flush_relaxed_mr, ibv_flush_relaxed_mr);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   802
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   803
 static struct ibv_comp_channel *ibv_create_comp_channel_v2(struct ibv_context *context)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   804
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   805
 	struct ibv_abi_compat_v2 *t = context->abi_compat;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   806
@@ -212,6 +425,10 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   807
 	struct ibv_comp_channel            *channel;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   808
 	struct ibv_create_comp_channel      cmd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   809
 	struct ibv_create_comp_channel_resp resp;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   810
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   811
+	int		event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   812
+	struct stat	fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   813
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   814
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   815
 	if (abi_ver <= 2)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   816
 		return ibv_create_comp_channel_v2(context);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   817
@@ -221,7 +438,23 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   818
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   819
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   820
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_COMP_CHANNEL, &resp, sizeof resp);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   821
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   822
+	event_fd = open("/dev/infiniband/ofs/uverbs:event", O_RDWR);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   823
+	if (event_fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   824
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   825
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   826
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   827
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   828
+	if (fstat(event_fd, &fstat_buf)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   829
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   830
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   831
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   832
+	resp.fd = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   833
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   834
 	if (write(context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   835
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   836
+		close(event_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   837
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   838
 		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   839
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   840
 	}
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   841
@@ -228,6 +461,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   842
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   843
 	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   844
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   845
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   846
+	resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   847
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   848
 	channel->context = context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   849
 	channel->fd      = resp.fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   850
 	channel->refcnt  = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   851
diff -r -u /tmp/846623/libibverbs-1.1.4/src/device.c libibverbs-1.1.4/src/device.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   852
--- /tmp/846623/libibverbs-1.1.4/src/device.c	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   853
+++ libibverbs-1.1.4/src/device.c	Fri Feb 11 04:02:31 2011
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   854
@@ -122,6 +122,28 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   855
 }
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   856
 default_symver(__ibv_get_device_guid, ibv_get_device_guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   857
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   858
+uint64_t __ibv_get_device_guid_external(struct ibv_device *device)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   859
+{
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   860
+	char attr[24];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   861
+	uint64_t guid = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   862
+	uint16_t parts[4];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   863
+	int i;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   864
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   865
+	if (ibv_read_sysfs_file(device->ibdev_path, "node_guid_external",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   866
+				attr, sizeof attr) < 0)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   867
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   868
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   869
+	if (sscanf(attr, "%hx:%hx:%hx:%hx",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   870
+		   parts, parts + 1, parts + 2, parts + 3) != 4)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   871
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   872
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   873
+	for (i = 0; i < 4; ++i)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   874
+		guid = (guid << 16) | parts[i];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   875
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   876
+	return htonll(guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   877
+}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   878
+default_symver(__ibv_get_device_guid_external, ibv_get_device_guid_external);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   879
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   880
 struct ibv_context *__ibv_open_device(struct ibv_device *device)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   881
 {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   882
 	char *devpath;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   883
@@ -128,8 +150,13 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   884
 	int cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   885
 	struct ibv_context *context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   886
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   887
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   888
 	if (asprintf(&devpath, "/dev/infiniband/%s", device->dev_name) < 0)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   889
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   890
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   891
+	if (asprintf(&devpath, "/dev/infiniband/ofs/%s", device->dev_name) < 0)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   892
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   893
+#endif		
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   894
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   895
 	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   896
 	 * We'll only be doing writes, but we need O_RDWR in case the
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   897
@@ -163,6 +190,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   898
 	int async_fd = context->async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   899
 	int cmd_fd   = context->cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   900
 	int cq_fd    = -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   901
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   902
+	int mmap_fd   = context->mmap_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   903
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   904
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   905
 	if (abi_ver <= 2) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   906
 		struct ibv_abi_compat_v2 *t = context->abi_compat;
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   907
@@ -172,6 +202,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   908
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   909
 	context->device->ops.free_context(context);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   910
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   911
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   912
+	if (mmap_fd > 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   913
+		close(mmap_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   914
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   915
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   916
 	close(async_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   917
 	close(cmd_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   918
 	if (abi_ver <= 2)
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   919
@@ -214,6 +249,15 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   920
 		case IBV_EVENT_SRQ_LIMIT_REACHED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   921
 			event->element.srq = (void *) (uintptr_t) ev.element;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   922
 			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   923
+		case IBV_EVENT_GID_AVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   924
+		case IBV_EVENT_GID_UNAVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   925
+		case IBV_EVENT_MCG_CREATED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   926
+		case IBV_EVENT_MCG_DELETED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   927
+			event->element.gid.global.subnet_prefix
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   928
+			    = ev.subnet_prefix;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   929
+                        event->element.gid.global.interface_id
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   930
+			    = ev.interface_id;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   931
+			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   932
 		default:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   933
 			event->element.port_num = ev.element;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   934
 			break;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   935
diff -r -u /tmp/846623/libibverbs-1.1.4/src/ibverbs.h libibverbs-1.1.4/src/ibverbs.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   936
--- /tmp/846623/libibverbs-1.1.4/src/ibverbs.h	Wed Sep 16 04:27:22 2009
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   937
+++ libibverbs-1.1.4/src/ibverbs.h	Fri Feb 11 04:02:31 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   938
@@ -52,7 +52,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   939
 #  define VALGRIND_MAKE_MEM_DEFINED(addr, len)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   940
 #endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   941
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   942
-#define HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   943
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   944
+#define	HIDDEN
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   945
+#undef HAVE_SYMVER_SUPPORT
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   946
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   947
+#define	HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   948
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   949
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   950
 #define INIT		__attribute__((constructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   951
 #define FINI		__attribute__((destructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   952
diff -r -u /tmp/846623/libibverbs-1.1.4/src/libibverbs.map libibverbs-1.1.4/src/libibverbs.map
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   953
--- /tmp/846623/libibverbs-1.1.4/src/libibverbs.map	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   954
+++ libibverbs-1.1.4/src/libibverbs.map	Mon Mar 28 13:44:44 2011
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   955
@@ -12,10 +12,18 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   956
 		ibv_query_port;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   957
 		ibv_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   958
 		ibv_query_pkey;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   959
+		ibv_register_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   960
+		ibv_unregister_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   961
+		ibv__gid_reachable;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   962
 		ibv_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   963
+		ibv_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   964
+		ibv_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   965
 		ibv_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   966
 		ibv_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   967
+		ibv_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   968
 		ibv_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   969
+		ibv_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   970
+		ibv_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   971
 		ibv_create_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   972
 		ibv_destroy_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   973
 		ibv_create_cq;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   974
@@ -41,9 +49,14 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   975
 		ibv_cmd_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   976
 		ibv_cmd_query_pkey;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   977
 		ibv_cmd_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   978
+		ibv_cmd_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   979
+		ibv_cmd_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   980
 		ibv_cmd_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   981
 		ibv_cmd_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   982
+		ibv_cmd_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   983
 		ibv_cmd_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   984
+		ibv_cmd_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   985
+		ibv_cmd_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   986
 		ibv_cmd_create_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   987
 		ibv_cmd_poll_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   988
 		ibv_cmd_req_notify_cq;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   989
@@ -71,6 +84,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   990
 		mult_to_ibv_rate;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   991
 		ibv_get_sysfs_path;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   992
 		ibv_read_sysfs_file;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   993
+		sol_get_cpu_info;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   994
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   995
 	local: *;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   996
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   997
diff -r -u /tmp/846623/libibverbs-1.1.4/src/cmd.c libibverbs-1.1.4/src/cmd.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   998
--- /tmp/846623/libibverbs-1.1.4/src/cmd.c	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   999
+++ libibverbs-1.1.4/src/cmd.c	Fri Feb 11 04:02:31 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1000
@@ -42,9 +42,34 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1001
 #include <errno.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1002
 #include <alloca.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1003
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1004
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1005
+#include <fcntl.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1006
+#include <sys/stat.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1007
+#include <sys/mkdev.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1008
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1009
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1010
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1011
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1012
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1013
+extern int ibv_open_mmap_driver(char *dev_name);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1014
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1015
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1016
+ * Event file creation for GET_CONTEXT & CREATE_COMP_CHANNEL :
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1017
+ * 	Solaris Uverbs driver supports creation of event file
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1018
+ * 	from the open(2) system call only. Event file will not
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1019
+ * 	be created by the write(2) syscall, for the above commands
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1020
+ *	as in Linux OFED.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1021
+ *
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1022
+ * Sequence of operations for GET_CONTEXT &  CREATE_COMP_CHANNEL :
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1023
+ *	event_fd = open(UVERBS_EVENT_FILE, O_RDWR);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1024
+ *	fstat(event_fd, &fstat_buf);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1025
+ *	NOTE : Minor number of event file passed to driver 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1026
+ *	cmd.resp.fd = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1027
+ *	write(verbs_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1028
+ *	NOTE : Initialize the fd to one got by opening event file
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1029
+ *	cmd.resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents: