components/open-fabrics/libibverbs/patches/base.patch
author Boris Chiu <boris.chiu@oracle.com>
Thu, 21 Nov 2013 11:54:41 -0800
changeset 1566 d1c87d1ecd13
parent 1399 8f4b38fe52ad
child 2187 391c8a50fa82
permissions -rw-r--r--
16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds 16382598 ibv_register_sm_events/ibv_unregister_sm_events should validate MGID format
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
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   534
@@ -41,9 +41,24 @@
369
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
 
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   546
+#define	IBV_IS_VALID_UGID(gid)	\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   547
+	(gid->raw[0] != 0xff)
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   548
+
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   549
+#define	IBV_IS_VALID_MGID(gid)					\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   550
+	((gids->raw[0] == 0xff) &&				\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   551
+	((gids->raw[1] == 0x0e) || (gids->raw[1] == 0x02) ||	\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   552
+	(gids->raw[1] == 0x05)  || (gids->raw[1] == 0x08) ||	\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   553
+	(gids->raw[1] == 0x1e)  || (gids->raw[1] == 0x12) ||	\
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   554
+	(gids->raw[1] == 0x15)  || (gids->raw[1] == 0x18)))
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   555
+
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   556
 int ibv_rate_to_mult(enum ibv_rate rate)
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   557
 {
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   558
 	switch (rate) {
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   559
@@ -93,6 +108,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   560
 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
   561
 		    int index, union ibv_gid *gid)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   562
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   563
+#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
   564
+	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
   565
+
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
   566
+	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
   567
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   568
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   569
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   570
 	char attr[41];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   571
 	uint16_t val;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   572
@@ -112,6 +133,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   573
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   574
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   575
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   576
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   577
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   578
 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
   579
 
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   580
@@ -118,6 +140,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   581
 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
   582
 		     int index, uint16_t *pkey)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   583
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   584
+#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
   585
+	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
   586
+
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
   587
+	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
   588
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   589
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   590
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   591
 	char attr[8];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   592
 	uint16_t val;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   593
@@ -133,9 +161,159 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   594
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   595
 	*pkey = htons(val);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   596
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   597
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   598
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   599
 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
   600
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   601
+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
   602
+    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
   603
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   604
+	struct ibv_reg_sm_event		*cmd;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   605
+	int				cmd_size, data_size;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   606
+	void				*data_p;
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 (((gid_num > 0) && (gids == NULL)) ||
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   609
+	   ((gid_num == 0) && (gids != NULL))) {
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) && (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) && (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
   616
+	    (event != IBV_SM_EVENT_ALL)) {
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
+	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
   622
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   623
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   624
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   625
+	}
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
+	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
   628
+	    (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
   629
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   630
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   631
+		return (-1);
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
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   634
+	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
   635
+	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
   636
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   637
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   638
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   639
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   640
+	if ((event == IBV_SM_EVENT_UGID) && (!IBV_IS_VALID_UGID(gids))) { 
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   641
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   642
+		return (-1);
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   643
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   644
+
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   645
+	if ((event == IBV_SM_EVENT_MGID) && (!IBV_IS_VALID_MGID(gids))) { 
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   646
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   647
+		return (-1);
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   648
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   649
+
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   650
+	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
   651
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   652
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   653
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   654
+		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
   655
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   656
+	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) {
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   657
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   658
+		return (-1);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   659
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   660
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   661
+	return (0);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   662
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   663
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   664
+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
   665
+    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
   666
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   667
+	struct ibv_unreg_sm_event	*cmd;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   668
+	int				cmd_size, data_size;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   669
+	void				*data_p;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   670
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   671
+	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
   672
+	   ((gid_num == 0) && (gids != NULL))) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   673
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   674
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   675
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   676
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   677
+	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
   678
+	    (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
   679
+	    (event != IBV_SM_EVENT_ALL)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   680
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   681
+		return (-1);
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
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   684
+	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
   685
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   686
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   687
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   688
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   689
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   690
+	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
   691
+	    (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
   692
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   693
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   694
+		return (-1);
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
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   697
+	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
   698
+	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
   699
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   700
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   701
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   702
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   703
+	if ((event == IBV_SM_EVENT_UGID) && (!IBV_IS_VALID_UGID(gids))) { 
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   704
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   705
+		return (-1);
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   706
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   707
+
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   708
+	if ((event == IBV_SM_EVENT_MGID) && (!IBV_IS_VALID_MGID(gids))) { 
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   709
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   710
+		return (-1);
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   711
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   712
+
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   713
+	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
   714
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   715
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   716
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   717
+		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
   718
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   719
+	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) {
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   720
+		errno = EINVAL;
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   721
+		return (-1);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   722
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   723
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   724
+	return (0);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   725
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   726
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   727
+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
   728
+    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
   729
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   730
+	struct ibv_gid_reachable	*cmd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   731
+	int				rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   732
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   733
+	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
   734
+	cmd->port_num = port;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   735
+	cmd->timeout = timeout;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   736
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   737
+	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
   738
+	    GID_REACHABLE);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   739
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   740
+	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
   741
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   742
+	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
   743
+	if (rc < 0) {
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   744
+		return (-1);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   745
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   746
+
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   747
+	return (0);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   748
+}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   749
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   750
 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
   751
 {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   752
 	struct ibv_pd *pd;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   753
@@ -148,6 +326,27 @@
817
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
 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
   756
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   757
+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
   758
+{
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
+	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
   761
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   762
+	return shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   763
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   764
+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
   765
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   766
+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
   767
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   768
+	struct ibv_pd *pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   769
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   770
+	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
   771
+	if (pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   772
+		pd->context = context;
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
+	return pd;
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
+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
   777
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   778
 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
   779
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   780
 	return pd->context->ops.dealloc_pd(pd);
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   781
@@ -175,6 +374,27 @@
817
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
 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
   784
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   785
+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
   786
+			    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
   787
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   788
+	struct ibv_mr *mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   789
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   790
+	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
   791
+		return NULL;
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
+	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
   794
+	if (mr) {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   795
+		mr->context = pd->context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   796
+		mr->pd      = pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   797
+		mr->addr    = addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   798
+		mr->length  = length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   799
+	} else
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   800
+		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
   801
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   802
+	return mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   803
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   804
+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
   805
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   806
 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
   807
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   808
 	int ret;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   809
@@ -189,6 +409,26 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   810
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   811
 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
   812
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   813
+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
   814
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   815
+	int ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   816
+	void *addr	= mr->addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   817
+	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
   818
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   819
+	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
   820
+	if (!ret)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   821
+		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
   822
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   823
+	return ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   824
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   825
+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
   826
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   827
+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
   828
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   829
+	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
   830
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   831
+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
   832
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   833
 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
   834
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   835
 	struct ibv_abi_compat_v2 *t = context->abi_compat;
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   836
@@ -212,6 +452,10 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   837
 	struct ibv_comp_channel            *channel;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   838
 	struct ibv_create_comp_channel      cmd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   839
 	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
   840
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   841
+	int		event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   842
+	struct stat	fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   843
+#endif
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 (abi_ver <= 2)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   846
 		return ibv_create_comp_channel_v2(context);
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   847
@@ -221,7 +465,23 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   848
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   849
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   850
 	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
   851
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   852
+	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
   853
+	if (event_fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   854
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   855
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   856
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   857
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   858
+	if (fstat(event_fd, &fstat_buf)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   859
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   860
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   861
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   862
+	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
   863
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   864
 	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
   865
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   866
+		close(event_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   867
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   868
 		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   869
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   870
 	}
1566
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   871
@@ -228,6 +488,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   872
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   873
 	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
   874
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   875
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   876
+	resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   877
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   878
 	channel->context = context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   879
 	channel->fd      = resp.fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   880
 	channel->refcnt  = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   881
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
   882
--- /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
   883
+++ 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
   884
@@ -122,6 +122,28 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   885
 }
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   886
 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
   887
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   888
+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
   889
+{
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   890
+	char attr[24];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   891
+	uint64_t guid = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   892
+	uint16_t parts[4];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   893
+	int i;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   894
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   895
+	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
   896
+				attr, sizeof attr) < 0)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   897
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   898
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   899
+	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
   900
+		   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
   901
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   902
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   903
+	for (i = 0; i < 4; ++i)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   904
+		guid = (guid << 16) | parts[i];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   905
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   906
+	return htonll(guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   907
+}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   908
+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
   909
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   910
 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
   911
 {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   912
 	char *devpath;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   913
@@ -128,8 +150,13 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   914
 	int cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   915
 	struct ibv_context *context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   916
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   917
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   918
 	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
   919
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   920
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   921
+	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
   922
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   923
+#endif		
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   924
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   925
 	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   926
 	 * We'll only be doing writes, but we need O_RDWR in case the
1399
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   927
@@ -141,6 +168,15 @@
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   928
 	if (cmd_fd < 0)
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   929
 		return NULL;
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   930
 
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   931
+#if defined(__SVR4) && defined(__sun)
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   932
+	/* We don't support parent-child sharing of IB resources on Solaris */
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   933
+	if (fcntl(cmd_fd, F_SETFD, FD_CLOEXEC) < 0) {
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   934
+		fprintf(stderr, "ibv_open_device: FD_CLOEXEC failed: %s\n",
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   935
+		    strerror(errno));
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   936
+		goto err;
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   937
+	}
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   938
+#endif
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   939
+
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   940
 	context = device->ops.alloc_context(device, cmd_fd);
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   941
 	if (!context)
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   942
 		goto err;
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   943
@@ -163,6 +199,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   944
 	int async_fd = context->async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   945
 	int cmd_fd   = context->cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   946
 	int cq_fd    = -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   947
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   948
+	int mmap_fd   = context->mmap_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   949
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   950
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   951
 	if (abi_ver <= 2) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   952
 		struct ibv_abi_compat_v2 *t = context->abi_compat;
1399
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   953
@@ -172,6 +211,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   954
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   955
 	context->device->ops.free_context(context);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   956
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   957
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   958
+	if (mmap_fd > 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   959
+		close(mmap_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   960
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   961
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   962
 	close(async_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   963
 	close(cmd_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   964
 	if (abi_ver <= 2)
1399
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   965
@@ -214,6 +258,15 @@
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   966
 		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
   967
 			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
   968
 			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   969
+		case IBV_EVENT_GID_AVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   970
+		case IBV_EVENT_GID_UNAVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   971
+		case IBV_EVENT_MCG_CREATED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   972
+		case IBV_EVENT_MCG_DELETED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   973
+			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
   974
+			    = ev.subnet_prefix;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   975
+                        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
   976
+			    = ev.interface_id;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   977
+			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   978
 		default:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   979
 			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
   980
 			break;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   981
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
   982
--- /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
   983
+++ 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
   984
@@ -52,7 +52,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   985
 #  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
   986
 #endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   987
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   988
-#define HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   989
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   990
+#define	HIDDEN
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   991
+#undef HAVE_SYMVER_SUPPORT
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   992
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   993
+#define	HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   994
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   995
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   996
 #define INIT		__attribute__((constructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   997
 #define FINI		__attribute__((destructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   998
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
   999
--- /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
  1000
+++ 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
  1001
@@ -12,10 +12,18 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1002
 		ibv_query_port;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1003
 		ibv_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1004
 		ibv_query_pkey;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1005
+		ibv_register_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1006
+		ibv_unregister_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1007
+		ibv__gid_reachable;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1008
 		ibv_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1009
+		ibv_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1010
+		ibv_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1011
 		ibv_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1012
 		ibv_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1013
+		ibv_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1014
 		ibv_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1015
+		ibv_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1016
+		ibv_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1017
 		ibv_create_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1018
 		ibv_destroy_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1019
 		ibv_create_cq;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1020
@@ -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
  1021