components/open-fabrics/libibverbs/patches/base.patch
author boris.chiu@oracle.com
Mon, 03 Nov 2014 13:22:00 -0800
changeset 2187 391c8a50fa82
parent 1566 d1c87d1ecd13
child 4661 353f8a998732
permissions -rw-r--r--
19187537 iberror() of open-fabrics dumps core because of buffer overrun 19195181 wrong handling of getaddrinfo() retval in open-fabrics dumps core 19448949 libibverbs cleanup incomplete
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2187
391c8a50fa82 19187537 iberror() of open-fabrics dumps core because of buffer overrun
boris.chiu@oracle.com
parents: 1566
diff changeset
     1
# This patch was developed in-house. Since it is Solaris-specific,
391c8a50fa82 19187537 iberror() of open-fabrics dumps core because of buffer overrun
boris.chiu@oracle.com
parents: 1566
diff changeset
     2
# it is not suitable for upstream.
391c8a50fa82 19187537 iberror() of open-fabrics dumps core because of buffer overrun
boris.chiu@oracle.com
parents: 1566
diff changeset
     3
#
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     4
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
     5
--- /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
     6
+++ 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
     7
@@ -4,13 +4,13 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     8
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     9
 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
    10
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    11
-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
    12
+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
    13
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    14
 libibverbs_version_script = @[email protected]
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    15
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    16
 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
    17
 			    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
    18
-			    src/enum_strs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    19
+			    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
    20
 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
    21
     $(libibverbs_version_script)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    22
 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
    23
@@ -37,7 +37,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    24
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    25
 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
    26
     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
    27
-    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
    28
+    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
    29
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    30
 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
    31
     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
    32
@@ -65,6 +65,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    33
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    34
 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
    35
     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
    36
+	 include/infiniband/ofa_solaris.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    37
     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
    38
     src/ibverbs.h examples/pingpong.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    39
     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
    40
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
    41
--- /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
    42
+++ 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
    43
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    44
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    45
 .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
    46
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    47
-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
    48
+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
    49
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    50
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    51
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    52
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    53
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    54
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    55
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    56
-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
    57
+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
    58
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    59
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    60
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    61
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
    62
--- /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
    63
+++ 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
    64
@@ -38,9 +38,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    65
 .SH "NOTES"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    66
 Only QPs of Transport Service Type
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    67
 .BR IBV_QPT_UD
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    68
-or
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    69
-.BR IBV_QPT_RAW_PACKET
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    70
-may be attached to multicast groups.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    71
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    72
 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
    73
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    74
@@ -48,22 +45,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    75
 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
    76
 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
    77
 the local port.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    78
-.SH EXAMPLE
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    79
-	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
    80
-.nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    81
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    82
-	union ibv_gid mgid;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    83
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    84
-	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
    85
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    86
-	memcpy(&mgid.raw[10], mmac, 6);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    87
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    88
-	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
    89
-		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
    90
-		return 1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    91
-	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    92
-.fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    93
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    94
 .SH "SEE ALSO"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    95
 .BR ibv_create_qp (3)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    96
 .SH "AUTHORS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    97
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
    98
--- /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
    99
+++ 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
   100
@@ -161,7 +161,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   101
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   102
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   103
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   104
-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
   105
+For QP Transport Service Type:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   106
 .sp
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   107
 Next state     Required attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   108
 \-\-\-\-\-\-\-\-\-\-     \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   109
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
   110
--- /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
   111
+++ 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
   112
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   113
 .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
   114
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   115
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   116
-ibv_devinfo \- query RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   117
+ibv_devinfo \- query InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   118
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   119
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   120
 .B ibv_devinfo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   121
@@ -9,7 +9,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   122
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   123
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   124
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   125
-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
   126
+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
   127
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   128
 .SH OPTIONS
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
@@ -22,10 +22,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   131
 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
   132
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   133
 \fB\-l\fR, \fB\-\-list\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   134
-only list names of RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   135
+only list names of InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   136
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   137
 \fB\-v\fR, \fB\-\-verbose\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   138
-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
   139
+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
   140
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   141
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   142
 .BR ibv_devices (1)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   143
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
   144
--- /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
   145
+++ 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
   146
@@ -68,7 +68,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   147
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   148
 .I attr_mask
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   149
 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
   150
-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
   151
+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
   152
 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
   153
 form as in
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   154
 .B ibv_modify_qp()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   155
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
   156
--- /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
   157
+++ 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
   158
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   159
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   160
 .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
   161
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   162
-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
   163
+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
   164
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   165
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   166
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   167
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   168
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   169
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   170
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   171
-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
   172
+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
   173
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   174
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   175
 .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
   176
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
   177
--- /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
   178
+++ 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
   179
@@ -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
   180
 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
   181
 .PP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   182
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   183
-.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
   184
+.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
   185
+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
   186
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   187
-.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
   188
+.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
   189
+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
   190
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   191
-.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
   192
+.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
   193
+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
   194
 .TP
9d261d526266 7202122 work request without SIGNALED flag for unsignaled QP generates completion events
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   195
-.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
   196
-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
   197
+.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
   198
+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
   199
 .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
   200
 .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
   201
 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
   202
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
   203
--- /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
   204
+++ 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
   205
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   206
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   207
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   208
 .B ibv_alloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   209
-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
   210
+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
   211
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   212
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   213
 .B ibv_dealloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   214
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
   215
--- /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
   216
+++ 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
   217
@@ -14,7 +14,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   218
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   219
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   220
 .B ibv_get_async_event()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   221
-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
   222
+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
   223
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   224
 and returns it through the pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   225
 .I event\fR,
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   226
@@ -29,6 +29,8 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   227
 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
   228
 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
   229
 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
   230
+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
   231
+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
   232
 .in -8
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   233
 } element;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   234
 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
   235
@@ -86,6 +88,16 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   236
 .TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   237
 .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
   238
 .PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   239
+.I Subnet events:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   240
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   241
+.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
   242
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   243
+.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
   244
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   245
+.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
   246
+.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   247
+.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
   248
+.PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   249
 .B ibv_ack_async_event()
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   250
 acknowledge the async event
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   251
 .I event\fR.
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   252
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
   253
--- /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
   254
+++ 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
   255
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   256
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   257
 .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
   258
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   259
-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
   260
+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
   261
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   262
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   263
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   264
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   265
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   266
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   267
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   268
-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
   269
+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
   270
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   271
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   272
 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
   273
@@ -25,7 +25,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   274
 .B ibv_get_device_list()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   275
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   276
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   277
-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
   278
+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
   279
 .I errno
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   280
 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
   281
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   282
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
   283
--- /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
   284
+++ 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
   285
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   286
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   287
 .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
   288
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   289
-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
   290
+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
   291
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   292
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   293
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   294
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
   295
--- /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
   296
+++ 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
   297
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   298
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   299
 .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
   300
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   301
-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
   302
+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
   303
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   304
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   305
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   306
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
   307
--- /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
   308
+++ 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
   309
@@ -1,16 +1,78 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   310
-.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
   311
+'\" te
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   312
+.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
   313
 
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   314
 .SH NAME
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   315
 ibv_asyncwatch \- display asynchronous events
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   316
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   317
 .SH SYNOPSIS
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   318
-.B ibv_asyncwatch
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   319
-
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   320
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   321
+.nf
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   322
+\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
   323
+\fIibv_asyncwactch\fR \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   324
+\fIibv_asyncwatch\fR \-G \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   325
+\fIibv_asyncwatch\fR \-M \-s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   326
+\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
   327
+\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
   328
+.fi
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   329
+.sp
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   330
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   331
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   332
-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
   333
+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
   334
+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
   335
+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
   336
+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
   337
+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
   338
+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
   339
+the '-s' option: 
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   340
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   341
-.SH AUTHORS
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   342
-.TP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   343
-Roland Dreier
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   344
-.RI < [email protected] >
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   345
+    IBV_SM_EVENT_MCG_CREATED
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   346
+         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
   347
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   348
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   349
+    IBV_SM_EVENT_MCG_DELETED
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   350
+         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
   351
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   352
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   353
+    IBV_SM_EVENT_GID_AVAIL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   354
+         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
   355
+         on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   356
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   357
+    IBV_SM_EVENT_GID_UNAVAIL
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   358
+         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
   359
+         available on this subnet.
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   360
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   361
+.SH OPTIONS
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
+\-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
   364
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   365
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   366
+\-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
   367
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   368
+\-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
   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
+\-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
   372
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   373
+.pp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   374
+.SH EXAMPLES
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   375
+.PP
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   376
+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
   377
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   378
+ibv_asyncwatch -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   379
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   380
+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
   381
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   382
+ibv_asyncwatch -G -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   383
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   384
+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
   385
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   386
+ibv_asyncwatch -M -s
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   387
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   388
+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
   389
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   390
+ibv_asyncwatch -G -s0x0021280001a0e4d9,0x0021280001a0e4da
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   391
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   392
+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
   393
+.sp
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   394
+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
   395
+.sp
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   396
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
   397
--- /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
   398
+++ 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
   399
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   400
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   401
 .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
   402
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   403
-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
   404
+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
   405
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   406
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   407
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   408
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
   409
--- /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
   410
+++ 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
   411
@@ -15,7 +15,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   412
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   413
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   414
 .B ibv_create_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   415
-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
   416
+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
   417
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   418
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   419
 .B ibv_destroy_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   420
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
   421
--- /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
   422
+++ 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
   423
@@ -18,7 +18,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   424
 .B ibv_create_cq()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   425
 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
   426
 .I cqe
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   427
-entries for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   428
+entries for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   429
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   430
 The pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   431
 .I cq_context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   432
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
   433
--- /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
   434
+++ 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
   435
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   436
 .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
   437
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   438
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   439
-ibv_devices \- list RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   440
+ibv_devices \- list InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   441
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   442
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   443
 .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
   444
@@ -8,8 +8,37 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   445
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   446
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   447
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   448
-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
   449
+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
   450
 
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
   451
+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
   452
+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
   453
+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
   454
+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
   455
+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
   456
+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
   457
+
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
+    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
   459
+    ------              ----------------        ----
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
+    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
   461
+    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
   462
+    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
   463
+
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
+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
   465
+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
   466
+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
   467
+
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
+    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
   469
+    ------              ----------------
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
+    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
   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
+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
   473
+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
   474
+
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
+    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
   476
+    ------              ----------------
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
   477
+    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
   478
+    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
   479
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   480
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   481
 .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
   482
 
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   483
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
   484
--- /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
   485
+++ 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
   486
@@ -28,7 +28,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   487
 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
   488
 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
   489
 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
   490
-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
   491
+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
   492
 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
   493
 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
   494
 .in -8
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   495
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
   496
--- /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
   497
+++ 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
   498
@@ -21,7 +21,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   499
 .B ibv_init_ah_from_wc()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   500
 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
   501
 .I ah_attr
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   502
-for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   503
+for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   504
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   505
 using the port number
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   506
 .I port_num\fR,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   507
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
   508
--- /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
   509
+++ 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
   510
@@ -33,7 +33,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   511
 #ifndef KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   512
 #define KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   513
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   514
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   515
 #include <linux/types.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   516
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   517
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   518
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   519
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   520
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   521
  * 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
   522
@@ -47,7 +51,10 @@
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_ALLOC_PD,
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_DEALLOC_PD,
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,
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
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_DEREG_MR,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   528
+	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
   529
+	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
   530
+	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
   531
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   532
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   533
 /*
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   534
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
   535
--- /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
   536
+++ 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
   537
@@ -41,9 +41,24 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   538
 #include <stdlib.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   539
 #include <errno.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   540
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   541
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   542
+#include <fcntl.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   543
+#include <sys/stat.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   544
+#include <sys/mkdev.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   545
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   546
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   547
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   548
 
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
   549
+#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
   550
+	(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
   551
+
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
+#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
   553
+	((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
   554
+	((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
   555
+	(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
   556
+	(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
   557
+	(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
   558
+
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
 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
   560
 {
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   561
 	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
   562
@@ -93,6 +108,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   563
 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
   564
 		    int index, union ibv_gid *gid)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   565
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   566
+#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
   567
+	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
   568
+
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
   569
+	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
   570
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   571
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   572
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   573
 	char attr[41];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   574
 	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
   575
@@ -112,6 +133,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   576
 	}
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
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   579
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   580
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   581
 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
   582
 
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
   583
@@ -118,6 +140,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   584
 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
   585
 		     int index, uint16_t *pkey)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   586
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   587
+#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
   588
+	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
   589
+
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
   590
+	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
   591
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   592
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   593
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   594
 	char attr[8];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   595
 	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
   596
@@ -133,9 +161,159 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   597
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   598
 	*pkey = htons(val);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   599
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   600
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   601
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   602
 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
   603
 
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   604
+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
   605
+    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
   606
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   607
+	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
   608
+	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
   609
+	void				*data_p;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   610
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   611
+	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
   612
+	   ((gid_num == 0) && (gids != NULL))) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   613
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   614
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   615
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   616
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   617
+	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
   618
+	    (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
   619
+	    (event != IBV_SM_EVENT_ALL)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   620
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   621
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   622
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   623
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   624
+	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
   625
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   626
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   627
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   628
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   629
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   630
+	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
   631
+	    (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
   632
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   633
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   634
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   635
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   636
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   637
+	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
   638
+	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
   639
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   640
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   641
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   642
+
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
   643
+	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
   644
+		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
   645
+		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
   646
+	}
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
+
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
+	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
   649
+		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
   650
+		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
   651
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   652
+
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   653
+	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
   654
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   655
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   656
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   657
+		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
   658
+
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
   659
+	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
   660
+		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
   661
+		return (-1);
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
+
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
   664
+	return (0);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   665
+}
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
+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
   668
+    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
   669
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   670
+	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
   671
+	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
   672
+	void				*data_p;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   673
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   674
+	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
   675
+	   ((gid_num == 0) && (gids != NULL))) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   676
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   677
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   678
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   679
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   680
+	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
   681
+	    (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
   682
+	    (event != IBV_SM_EVENT_ALL)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   683
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   684
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   685
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   686
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   687
+	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
   688
+	    (gid_num == 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   689
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   690
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   691
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   692
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   693
+	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
   694
+	    (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
   695
+	    (gid_num != 0)) {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   696
+		errno = EINVAL;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   697
+		return (-1);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   698
+	}
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   699
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   700
+	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
   701
+	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
   702
+	data_p = (void *)gids;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   703
+	cmd  = alloca(cmd_size);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   704
+	cmd->data_num = gid_num;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   705
+
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
   706
+	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
   707
+		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
   708
+		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
   709
+	}
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
+
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
+	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
   712
+		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
   713
+		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
   714
+	}
d1c87d1ecd13 16223428 ibv_register_sm_events/ibv_gid_reachable should return 0 if succeeds
Boris Chiu <boris.chiu@oracle.com>
parents: 1399
diff changeset
   715
+
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   716
+	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
   717
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   718
+	cmd->events = event;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   719
+	if (gid_num > 0)
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   720
+		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
   721
+
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
   722
+	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
   723
+		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
   724
+		return (-1);
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
+
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
   727
+	return (0);
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   728
+}
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
+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
   731
+    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
   732
+{
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   733
+	struct ibv_gid_reachable	*cmd;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   734
+	int				rc;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   735
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   736
+	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
   737
+	cmd->port_num = port;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   738
+	cmd->timeout = timeout;
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
+	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
   741
+	    GID_REACHABLE);
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   742
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   743
+	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
   744
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   745
+	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
   746
+	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
   747
+		return (-1);
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
+
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
   750
+	return (0);
1125
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
+
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   753
 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
   754
 {
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   755
 	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
   756
@@ -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
   757
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   758
 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
   759
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   760
+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
   761
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   762
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   763
+	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
   764
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   765
+	return shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   766
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   767
+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
   768
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   769
+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
   770
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   771
+	struct ibv_pd *pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   772
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   773
+	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
   774
+	if (pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   775
+		pd->context = context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   776
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   777
+	return pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   778
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   779
+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
   780
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   781
 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
   782
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   783
 	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
   784
@@ -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
   785
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   786
 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
   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 *__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
   789
+			    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
   790
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   791
+	struct ibv_mr *mr;
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
+	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
   794
+		return NULL;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   795
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   796
+	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
   797
+	if (mr) {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   798
+		mr->context = pd->context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   799
+		mr->pd      = pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   800
+		mr->addr    = addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   801
+		mr->length  = length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   802
+	} else
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   803
+		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
   804
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   805
+	return mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   806
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   807
+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
   808
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   809
 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
   810
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   811
 	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
   812
@@ -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
   813
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   814
 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
   815
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   816
+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
   817
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   818
+	int ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   819
+	void *addr	= mr->addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   820
+	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
   821
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   822
+	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
   823
+	if (!ret)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   824
+		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
   825
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   826
+	return ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   827
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   828
+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
   829
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   830
+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
   831
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   832
+	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
   833
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   834
+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
   835
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   836
 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
   837
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   838
 	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
   839
@@ -212,6 +452,10 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   840
 	struct ibv_comp_channel            *channel;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   841
 	struct ibv_create_comp_channel      cmd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   842
 	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
   843
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   844
+	int		event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   845
+	struct stat	fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   846
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   847
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   848
 	if (abi_ver <= 2)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   849
 		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
   850
@@ -221,7 +465,23 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   851
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   852
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   853
 	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
   854
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   855
+	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
   856
+	if (event_fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   857
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   858
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   859
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   860
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   861
+	if (fstat(event_fd, &fstat_buf)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   862
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   863
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   864
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   865
+	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
   866
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   867
 	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
   868
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   869
+		close(event_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   870
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   871
 		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   872
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   873
 	}
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
   874
@@ -228,6 +488,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   875
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   876
 	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
   877
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   878
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   879
+	resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   880
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   881
 	channel->context = context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   882
 	channel->fd      = resp.fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   883
 	channel->refcnt  = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   884
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
   885
--- /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
   886
+++ 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
   887
@@ -122,6 +122,28 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   888
 }
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   889
 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
   890
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   891
+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
   892
+{
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   893
+	char attr[24];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   894
+	uint64_t guid = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   895
+	uint16_t parts[4];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   896
+	int i;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   897
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   898
+	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
   899
+				attr, sizeof attr) < 0)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   900
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   901
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   902
+	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
   903
+		   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
   904
+		return 0;
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
+	for (i = 0; i < 4; ++i)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   907
+		guid = (guid << 16) | parts[i];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   908
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   909
+	return htonll(guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   910
+}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   911
+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
   912
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   913
 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
   914
 {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   915
 	char *devpath;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   916
@@ -128,8 +150,13 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   917
 	int cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   918
 	struct ibv_context *context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   919
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   920
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   921
 	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
   922
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   923
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   924
+	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
   925
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   926
+#endif		
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   927
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   928
 	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   929
 	 * 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
   930
@@ -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
   931
 	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
   932
 		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
   933
 
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   934
+#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
   935
+	/* 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
   936
+	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
   937
+		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
   938
+		    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
   939
+		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
   940
+	}
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   941
+#endif
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   942
+
8f4b38fe52ad 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing)
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 1196
diff changeset
   943
 	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
   944
 	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
   945
 		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
   946
@@ -163,6 +199,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   947
 	int async_fd = context->async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   948
 	int cmd_fd   = context->cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   949
 	int cq_fd    = -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   950
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   951
+	int mmap_fd   = context->mmap_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   952
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   953
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   954
 	if (abi_ver <= 2) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   955
 		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
   956
@@ -172,6 +211,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   957
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   958
 	context->device->ops.free_context(context);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   959
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   960
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   961
+	if (mmap_fd > 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   962
+		close(mmap_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   963
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   964
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   965
 	close(async_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   966
 	close(cmd_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   967
 	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
   968
@@ -214,6 +258,15 @@
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   969
 		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
   970
 			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
   971
 			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   972
+		case IBV_EVENT_GID_AVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   973
+		case IBV_EVENT_GID_UNAVAIL:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   974
+		case IBV_EVENT_MCG_CREATED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   975
+		case IBV_EVENT_MCG_DELETED:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   976
+			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
   977
+			    = ev.subnet_prefix;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   978
+                        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
   979
+			    = ev.interface_id;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   980
+			break;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   981
 		default:
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
   982
 			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
   983
 			break;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   984
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
   985
--- /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
   986
+++ 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
   987
@@ -52,7 +52,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   988
 #  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
   989
 #endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   990
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   991
-#define HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   992
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   993
+#define	HIDDEN
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   994
+#undef HAVE_SYMVER_SUPPORT
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   995
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   996
+#define	HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   997
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   998
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   999
 #define INIT		__attribute__((constructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1000
 #define FINI		__attribute__((destructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1001
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
  1002
--- /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
  1003
+++ 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
  1004
@@ -12,10 +12,18 @@
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1005
 		ibv_query_port;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1006
 		ibv_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1007
 		ibv_query_pkey;
1125
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1008
+		ibv_register_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1009
+		ibv_unregister_sm_events;
47a52afcc302 PSARC 2012/384 Fast IB node death detection
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 1019
diff changeset
  1010
+		ibv__gid_reachable;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1011
 		ibv_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1012
+		ibv_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1013
+		ibv_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1014
 		ibv_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1015
 		ibv_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1016
+		ibv_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1017
 		ibv_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1018
+		ibv_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1019
+		ibv_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1020
 		ibv_create_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1021
 		ibv_destroy_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: