components/open-fabrics/libibverbs/patches/base.patch
author Boris Chiu <boris.chiu@oracle.com>
Fri, 13 Sep 2013 13:54:01 -0400
branchs11u1-sru
changeset 2761 91830550729b
parent 2567 333785b27b31
permissions -rw-r--r--
17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland) 16831066 need hardening in libibverbs (e.g., prevent double frees, interprocess sharing) 16821677 qperf can not work between Solaris/Linux
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     1
diff -r -u /tmp/846623/libibverbs-1.1.4/Makefile.am libibverbs-1.1.4/Makefile.am
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     2
--- /tmp/846623/libibverbs-1.1.4/Makefile.am	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     3
+++ libibverbs-1.1.4/Makefile.am	Fri Feb 11 04:02:12 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     4
@@ -4,13 +4,13 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     5
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     6
 AM_CFLAGS = -g -Wall -D_GNU_SOURCE
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     7
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     8
-src_libibverbs_la_CFLAGS = $(AM_CFLAGS) -DIBV_CONFIG_DIR=\"$(sysconfdir)/libibverbs.d\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
     9
+src_libibverbs_la_CFLAGS = $(AM_CFLAGS) -DIBV_CONFIG_DIR=\"$(datadir)/libibverbs.d\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    10
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    11
 libibverbs_version_script = @LIBIBVERBS_VERSION_SCRIPT@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    12
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    13
 src_libibverbs_la_SOURCES = src/cmd.c src/compat-1_0.c src/device.c src/init.c \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    14
 			    src/marshall.c src/memory.c src/sysfs.c src/verbs.c \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    15
-			    src/enum_strs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    16
+			    src/enum_strs.c src/solaris_compatibility.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    17
 src_libibverbs_la_LDFLAGS = -version-info 1 -export-dynamic \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    18
     $(libibverbs_version_script)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    19
 src_libibverbs_la_DEPENDENCIES = $(srcdir)/src/libibverbs.map
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    20
@@ -37,7 +37,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    21
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    22
 libibverbsinclude_HEADERS = include/infiniband/arch.h include/infiniband/driver.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    23
     include/infiniband/kern-abi.h include/infiniband/opcode.h include/infiniband/verbs.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    24
-    include/infiniband/sa-kern-abi.h include/infiniband/sa.h include/infiniband/marshall.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    25
+    include/infiniband/sa-kern-abi.h include/infiniband/sa.h include/infiniband/marshall.h include/infiniband/ofa_solaris.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    26
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    27
 man_MANS = man/ibv_asyncwatch.1 man/ibv_devices.1 man/ibv_devinfo.1	\
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    28
     man/ibv_rc_pingpong.1 man/ibv_uc_pingpong.1 man/ibv_ud_pingpong.1	\
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    29
@@ -65,6 +65,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    30
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    31
 EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    32
     include/infiniband/opcode.h include/infiniband/verbs.h include/infiniband/marshall.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    33
+	 include/infiniband/ofa_solaris.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    34
     include/infiniband/sa-kern-abi.h include/infiniband/sa.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    35
     src/ibverbs.h examples/pingpong.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    36
     src/libibverbs.map libibverbs.spec.in $(man_MANS)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    37
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_name.3 libibverbs-1.1.4/man/ibv_get_device_name.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    38
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_name.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    39
+++ libibverbs-1.1.4/man/ibv_get_device_name.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    40
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    41
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    42
 .TH IBV_GET_DEVICE_NAME 3  2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    43
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    44
-ibv_get_device_name \- get an RDMA device's name
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    45
+ibv_get_device_name \- get an InfiniBand device's name
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    46
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    47
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    48
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    49
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    50
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    51
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    52
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    53
-returns a human-readable name associated with the RDMA device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    54
+returns a human-readable name associated with the InfiniBand device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    55
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    56
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    57
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    58
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_attach_mcast.3 libibverbs-1.1.4/man/ibv_attach_mcast.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    59
--- /tmp/846623/libibverbs-1.1.4/man/ibv_attach_mcast.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    60
+++ libibverbs-1.1.4/man/ibv_attach_mcast.3	Tue May  3 13:50:06 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    61
@@ -38,9 +38,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    62
 .SH "NOTES"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    63
 Only QPs of Transport Service Type
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    64
 .BR IBV_QPT_UD
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    65
-or
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    66
-.BR IBV_QPT_RAW_PACKET
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    67
-may be attached to multicast groups.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    68
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    69
 If a QP is attached to the same multicast group multiple times, the QP will still receive a single copy of a multicast message.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    70
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    71
@@ -48,22 +45,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    72
 multicast group must be sent to the subnet administrator (SA), so that
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    73
 the fabric's multicast routing is configured to deliver messages to
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    74
 the local port.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    75
-.SH EXAMPLE
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    76
-	An example of the use of ibv_attach_mcast with RAW ETH QP:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    77
-.nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    78
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    79
-	union ibv_gid mgid;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    80
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    81
-	memset(&mgid, 0, sizeof(union ibv_gid));
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    82
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    83
-	memcpy(&mgid.raw[10], mmac, 6);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    84
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    85
-	if (ibv_attach_mcast(qp, &mgid, 0)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    86
-		printf ("Failed to attach qp to mcast. Errno: %d\\n",errno);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    87
-		return 1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    88
-	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    89
-.fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    90
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    91
 .SH "SEE ALSO"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    92
 .BR ibv_create_qp (3)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    93
 .SH "AUTHORS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    94
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_modify_qp.3 libibverbs-1.1.4/man/ibv_modify_qp.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    95
--- /tmp/846623/libibverbs-1.1.4/man/ibv_modify_qp.3	Thu Mar 10 06:58:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    96
+++ libibverbs-1.1.4/man/ibv_modify_qp.3	Tue May  3 13:50:06 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    97
@@ -161,7 +161,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    98
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
    99
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   100
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   101
-For QP Transport Service Type \fB IBV_QPT_RAW_PACKET\fR:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   102
+For QP Transport Service Type:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   103
 .sp
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   104
 Next state     Required attributes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   105
 \-\-\-\-\-\-\-\-\-\-     \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   106
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_devinfo.1 libibverbs-1.1.4/man/ibv_devinfo.1
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   107
--- /tmp/846623/libibverbs-1.1.4/man/ibv_devinfo.1	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   108
+++ libibverbs-1.1.4/man/ibv_devinfo.1	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   109
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   110
 .TH IBV_DEVINFO 1 "August 30, 2005" "libibverbs" "USER COMMANDS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   111
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   112
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   113
-ibv_devinfo \- query RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   114
+ibv_devinfo \- query InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   115
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   116
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   117
 .B ibv_devinfo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   118
@@ -9,7 +9,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   119
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   120
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   121
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   122
-Print information about RDMA devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   123
+Print information about InfiniBand devices available for use from userspace.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   124
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   125
 .SH OPTIONS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   126
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   127
@@ -22,10 +22,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   128
 query port \fIPORT\fR (default all ports)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   129
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   130
 \fB\-l\fR, \fB\-\-list\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   131
-only list names of RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   132
+only list names of InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   133
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   134
 \fB\-v\fR, \fB\-\-verbose\fR
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   135
-print all available information about RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   136
+print all available information about InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   137
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   138
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   139
 .BR ibv_devices (1)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   140
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_query_qp.3 libibverbs-1.1.4/man/ibv_query_qp.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   141
--- /tmp/846623/libibverbs-1.1.4/man/ibv_query_qp.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   142
+++ libibverbs-1.1.4/man/ibv_query_qp.3	Mon Mar 28 03:11:47 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   143
@@ -68,7 +68,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   144
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   145
 .I attr_mask
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   146
 is a hint that specifies the minimum list of attributes to retrieve.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   147
-Some RDMA devices may return extra attributes not requested, for
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   148
+Some InfiniBand devices may return extra attributes not requested, for
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   149
 example if the value can be returned cheaply. This has the same
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   150
 form as in
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   151
 .B ibv_modify_qp()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   152
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_guid.3 libibverbs-1.1.4/man/ibv_get_device_guid.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   153
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_device_guid.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   154
+++ libibverbs-1.1.4/man/ibv_get_device_guid.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   155
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   156
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   157
 .TH IBV_GET_DEVICE_GUID 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   158
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   159
-ibv_get_device_guid \- get an RDMA device's GUID
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   160
+ibv_get_device_guid \- get an InfiniBand device's GUID
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   161
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   162
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   163
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   164
@@ -11,7 +11,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   165
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   166
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   167
 .B ibv_get_device_name()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   168
-returns the Global Unique IDentifier (GUID) of the RDMA device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   169
+returns the Global Unique IDentifier (GUID) of the InfiniBand device
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   170
 .I device\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   171
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   172
 .B ibv_get_device_guid()
2453
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   173
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_post_send.3 libibverbs-1.1.4/man/ibv_post_send.3
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   174
--- /tmp/846623/libibverbs-1.1.4/man/ibv_post_send.3	Thu Mar 10 06:58:20 2011
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   175
+++ libibverbs-1.1.4/man/ibv_post_send.3	Thu Dec  6 13:50:27 2012
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   176
@@ -91,14 +91,17 @@
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   177
 The attribute send_flags describes the properties of the \s-1WR\s0. It is either 0 or the bitwise \s-1OR\s0 of one or more of the following flags:
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   178
 .PP
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   179
 .TP
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   180
-.B IBV_SEND_FENCE \fR Set the fence indicator.  Valid only for QPs with Transport Service Type \fBIBV_QPT_RC
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   181
+.B IBV_SEND_FENCE \fR
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   182
+Set the fence indicator.  Valid only for QPs with Transport Service Type \fBIBV_QPT_RC
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   183
 .TP
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   184
-.B IBV_SEND_SIGNALED \fR Set the completion notification indicator.  Relevant only if QP was created with sq_sig_all=0
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   185
+.B IBV_SEND_SIGNALED \fR
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   186
+Set the completion notification indicator.  Relevant only if QP was created with sq_sig_all=0
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   187
 .TP
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   188
-.B IBV_SEND_SOLICITED \fR Set the solicited event indicator.  Valid only for Send and RDMA Write with immediate
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   189
+.B IBV_SEND_SOLICITED \fR
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   190
+Set the solicited event indicator.  Valid only for Send and RDMA Write with immediate
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   191
 .TP
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   192
-.B IBV_SEND_INLINE \fR Send data in given gather list as inline data
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   193
-in a send WQE.  Valid only for Send and RDMA Write.  The L_Key will not be checked.
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   194
+.B IBV_SEND_INLINE \fR
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   195
+Send data in given gather list as inline data in a send WQE.  Valid only for Send and RDMA Write.  The L_Key will not be checked.
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   196
 .SH "RETURN VALUE"
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   197
 .B ibv_post_send()
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
   198
 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   199
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_alloc_pd.3 libibverbs-1.1.4/man/ibv_alloc_pd.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   200
--- /tmp/846623/libibverbs-1.1.4/man/ibv_alloc_pd.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   201
+++ libibverbs-1.1.4/man/ibv_alloc_pd.3	Mon Mar 28 03:11:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   202
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   203
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   204
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   205
 .B ibv_alloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   206
-allocates a PD for the RDMA device context 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   207
+allocates a PD for the InfiniBand device context 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   208
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   209
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   210
 .B ibv_dealloc_pd()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   211
diff -r -u /tmp/846623/libibverbs-1.1.4/man/ibv_get_async_event.3 libibverbs-1.1.4/man/ibv_get_async_event.3
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   212
--- /tmp/846623/libibverbs-1.1.4/man/ibv_get_async_event.3	Thu Mar 10 04:51:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   213
+++ libibverbs-1.1.4/man/ibv_get_async_event.3	Mon Mar 28 03:11:46 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   214
@@ -14,7 +14,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   215
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   216
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   217
 .B ibv_get_async_event()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   218
-waits for the next async event of the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   219
+waits for the next async event of the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   220
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   221
 and returns it through the pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   222
 .I event\fR,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   223
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
   224
--- /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
   225
+++ 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
   226
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   227
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   228
 .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
   229
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   230
-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
   231
+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
   232
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   233
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   234
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   235
@@ -13,7 +13,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   236
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   237
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   238
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   239
-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
   240
+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
   241
 The argument
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   242
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   243
 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
   244
@@ -25,7 +25,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   245
 .B ibv_get_device_list()\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   246
 .SH "RETURN VALUE"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   247
 .B ibv_get_device_list()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   248
-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
   249
+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
   250
 .I errno
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   251
 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
   252
 .I num_devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   253
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
   254
--- /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
   255
+++ 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
   256
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   257
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   258
 .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
   259
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   260
-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
   261
+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
   262
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   263
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   264
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   265
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
   266
--- /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
   267
+++ 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
   268
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   269
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   270
 .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
   271
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   272
-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
   273
+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
   274
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   275
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   276
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   277
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
   278
--- /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
   279
+++ libibverbs-1.1.4/man/ibv_asyncwatch.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
   280
@@ -8,7 +8,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   281
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   282
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   283
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   284
-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
   285
+Display asynchronous events forwarded to userspace for an InfiniBand device.
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
 .SH AUTHORS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   288
 .TP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   289
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
   290
--- /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
   291
+++ 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
   292
@@ -2,7 +2,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   293
 .\"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   294
 .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
   295
 .SH "NAME"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   296
-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
   297
+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
   298
 .SH "SYNOPSIS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   299
 .nf
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   300
 .B #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   301
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
   302
--- /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
   303
+++ 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
   304
@@ -15,7 +15,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   305
 .fi
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   306
 .SH "DESCRIPTION"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   307
 .B ibv_create_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   308
-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
   309
+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
   310
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   311
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   312
 .B ibv_destroy_comp_channel()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   313
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
   314
--- /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
   315
+++ 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
   316
@@ -18,7 +18,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   317
 .B ibv_create_cq()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   318
 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
   319
 .I cqe
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   320
-entries for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   321
+entries for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   322
 .I context\fR.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   323
 The pointer
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   324
 .I cq_context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   325
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
   326
--- /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
   327
+++ 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
   328
@@ -1,7 +1,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   329
 .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
   330
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   331
 .SH NAME
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   332
-ibv_devices \- list RDMA devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   333
+ibv_devices \- list InfiniBand devices
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   334
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   335
 .SH SYNOPSIS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   336
 .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
   337
@@ -8,8 +8,37 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   338
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   339
 .SH DESCRIPTION
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   340
 .PP
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   341
-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
   342
+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
   343
 
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
   344
+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
   345
+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
   346
+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
   347
+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
   348
+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
   349
+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
   350
+
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
   351
+    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
   352
+    ------              ----------------        ----
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
   353
+    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
   354
+    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
   355
+    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
   356
+
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
   357
+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
   358
+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
   359
+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
   360
+
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
   361
+    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
   362
+    ------              ----------------
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
   363
+    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
   364
+
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
   365
+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
   366
+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
   367
+
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
   368
+    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
   369
+    ------              ----------------
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
   370
+    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
   371
+    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
   372
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   373
 .SH SEE ALSO
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   374
 .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
   375
 
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   376
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
   377
--- /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
   378
+++ 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
   379
@@ -28,7 +28,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   380
 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
   381
 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
   382
 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
   383
-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
   384
+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
   385
 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
   386
 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
   387
 .in -8
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   388
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
   389
--- /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
   390
+++ 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
   391
@@ -21,7 +21,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   392
 .B ibv_init_ah_from_wc()
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   393
 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
   394
 .I ah_attr
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   395
-for the RDMA device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   396
+for the InfiniBand device context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   397
 .I context
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   398
 using the port number
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   399
 .I port_num\fR,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   400
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
   401
--- /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
   402
+++ 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
   403
@@ -33,7 +33,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   404
 #ifndef KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   405
 #define KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   406
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   407
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   408
 #include <linux/types.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   409
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   410
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   411
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   412
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   413
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   414
  * 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
   415
@@ -47,7 +51,10 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   416
 	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
   417
 	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
   418
 	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
   419
-	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
   420
+	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
   421
+	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
   422
+	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
   423
+	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
   424
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   425
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   426
 /*
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   427
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
   428
--- /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
   429
+++ libibverbs-1.1.4/src/verbs.c	Fri Feb 11 04:02:33 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   430
@@ -41,6 +41,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   431
 #include <stdlib.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   432
 #include <errno.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   433
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   434
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   435
+#include <fcntl.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   436
+#include <sys/stat.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   437
+#include <sys/mkdev.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   438
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   439
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   440
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   441
 
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
   442
@@ -93,6 +98,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   443
 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
   444
 		    int index, union ibv_gid *gid)
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
+#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
   447
+	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
   448
+
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
   449
+	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
   450
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   451
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   452
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   453
 	char attr[41];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   454
 	uint16_t val;
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   455
@@ -112,6 +123,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   456
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   457
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   458
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   459
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   460
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   461
 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
   462
 
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
   463
@@ -118,6 +130,12 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   464
 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
   465
 		     int index, uint16_t *pkey)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   466
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   467
+#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
   468
+	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
   469
+
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
   470
+	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
   471
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   472
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   473
 	char name[24];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   474
 	char attr[8];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   475
 	uint16_t val;
715
eed3ed08f692 6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents: 369
diff changeset
   476
@@ -133,6 +151,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   477
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   478
 	*pkey = htons(val);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   479
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   480
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   481
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   482
 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
   483
 
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   484
@@ -148,6 +167,27 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   485
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   486
 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
   487
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   488
+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
   489
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   490
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   491
+	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
   492
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   493
+	return shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   494
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   495
+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
   496
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   497
+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
   498
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   499
+	struct ibv_pd *pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   500
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   501
+	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
   502
+	if (pd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   503
+		pd->context = context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   504
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   505
+	return pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   506
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   507
+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
   508
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   509
 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
   510
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   511
 	return pd->context->ops.dealloc_pd(pd);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   512
@@ -175,6 +215,27 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   513
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   514
 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
   515
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   516
+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
   517
+			    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
   518
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   519
+	struct ibv_mr *mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   520
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   521
+	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
   522
+		return NULL;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   523
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   524
+	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
   525
+	if (mr) {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   526
+		mr->context = pd->context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   527
+		mr->pd      = pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   528
+		mr->addr    = addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   529
+		mr->length  = length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   530
+	} else
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   531
+		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
   532
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   533
+	return mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   534
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   535
+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
   536
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   537
 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
   538
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   539
 	int ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   540
@@ -189,6 +250,26 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   541
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   542
 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
   543
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   544
+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
   545
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   546
+	int ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   547
+	void *addr	= mr->addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   548
+	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
   549
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   550
+	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
   551
+	if (!ret)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   552
+		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
   553
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   554
+	return ret;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   555
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   556
+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
   557
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   558
+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
   559
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   560
+	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
   561
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   562
+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
   563
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   564
 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
   565
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   566
 	struct ibv_abi_compat_v2 *t = context->abi_compat;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   567
@@ -212,6 +293,10 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   568
 	struct ibv_comp_channel            *channel;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   569
 	struct ibv_create_comp_channel      cmd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   570
 	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
   571
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   572
+	int		event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   573
+	struct stat	fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   574
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   575
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   576
 	if (abi_ver <= 2)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   577
 		return ibv_create_comp_channel_v2(context);
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   578
@@ -221,7 +306,23 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   579
 		return NULL;
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
 	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
   582
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   583
+	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
   584
+	if (event_fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   585
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   586
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   587
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   588
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   589
+	if (fstat(event_fd, &fstat_buf)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   590
+		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   591
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   592
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   593
+	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
   594
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   595
 	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
   596
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   597
+		close(event_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   598
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   599
 		free(channel);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   600
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   601
 	}
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   602
@@ -228,6 +329,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   603
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   604
 	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
   605
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   606
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   607
+	resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   608
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   609
 	channel->context = context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   610
 	channel->fd      = resp.fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   611
 	channel->refcnt  = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   612
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
   613
--- /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
   614
+++ 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
   615
@@ -122,6 +122,28 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   616
 }
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   617
 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
   618
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   619
+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
   620
+{
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   621
+	char attr[24];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   622
+	uint64_t guid = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   623
+	uint16_t parts[4];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   624
+	int i;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   625
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   626
+	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
   627
+				attr, sizeof attr) < 0)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   628
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   629
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   630
+	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
   631
+		   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
   632
+		return 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   633
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   634
+	for (i = 0; i < 4; ++i)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   635
+		guid = (guid << 16) | parts[i];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   636
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   637
+	return htonll(guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   638
+}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   639
+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
   640
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   641
 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
   642
 {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   643
 	char *devpath;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   644
@@ -128,8 +150,13 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   645
 	int cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   646
 	struct ibv_context *context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   647
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   648
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   649
 	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
   650
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   651
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   652
+	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
   653
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   654
+#endif		
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   655
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   656
 	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   657
 	 * We'll only be doing writes, but we need O_RDWR in case the
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   658
@@ -141,6 +168,15 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   659
 	if (cmd_fd < 0)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   660
 		return NULL;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   661
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   662
+#if defined(__SVR4) && defined(__sun)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   663
+	/* We don't support parent-child sharing of IB resources on Solaris */
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   664
+	if (fcntl(cmd_fd, F_SETFD, FD_CLOEXEC) < 0) {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   665
+		fprintf(stderr, "ibv_open_device: FD_CLOEXEC failed: %s\n",
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   666
+		    strerror(errno));
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   667
+		goto err;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   668
+	}
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   669
+#endif
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   670
+
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   671
 	context = device->ops.alloc_context(device, cmd_fd);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   672
 	if (!context)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   673
 		goto err;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   674
@@ -163,6 +199,9 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   675
 	int async_fd = context->async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   676
 	int cmd_fd   = context->cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   677
 	int cq_fd    = -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   678
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   679
+	int mmap_fd   = context->mmap_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   680
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   681
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   682
 	if (abi_ver <= 2) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   683
 		struct ibv_abi_compat_v2 *t = context->abi_compat;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   684
@@ -172,6 +211,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   685
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   686
 	context->device->ops.free_context(context);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   687
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   688
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   689
+	if (mmap_fd > 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   690
+		close(mmap_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   691
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   692
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   693
 	close(async_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   694
 	close(cmd_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   695
 	if (abi_ver <= 2)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   696
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
   697
--- /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
   698
+++ 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
   699
@@ -52,7 +52,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   700
 #  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
   701
 #endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   702
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   703
-#define HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   704
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   705
+#define	HIDDEN
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   706
+#undef HAVE_SYMVER_SUPPORT
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   707
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   708
+#define	HIDDEN		__attribute__((visibility ("hidden")))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   709
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   710
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   711
 #define INIT		__attribute__((constructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   712
 #define FINI		__attribute__((destructor))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   713
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
   714
--- /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
   715
+++ libibverbs-1.1.4/src/libibverbs.map	Mon Mar 28 13:44:44 2011
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   716
@@ -13,9 +13,14 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   717
 		ibv_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   718
 		ibv_query_pkey;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   719
 		ibv_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   720
+		ibv_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   721
+		ibv_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   722
 		ibv_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   723
 		ibv_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   724
+		ibv_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   725
 		ibv_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   726
+		ibv_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   727
+		ibv_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   728
 		ibv_create_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   729
 		ibv_destroy_comp_channel;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   730
 		ibv_create_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   731
@@ -41,9 +46,14 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   732
 		ibv_cmd_query_gid;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   733
 		ibv_cmd_query_pkey;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   734
 		ibv_cmd_alloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   735
+		ibv_cmd_alloc_shpd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   736
+		ibv_cmd_share_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   737
 		ibv_cmd_dealloc_pd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   738
 		ibv_cmd_reg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   739
+		ibv_cmd_reg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   740
 		ibv_cmd_dereg_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   741
+		ibv_cmd_dereg_mr_relaxed;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   742
+		ibv_cmd_flush_relaxed_mr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   743
 		ibv_cmd_create_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   744
 		ibv_cmd_poll_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   745
 		ibv_cmd_req_notify_cq;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   746
@@ -71,6 +81,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   747
 		mult_to_ibv_rate;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   748
 		ibv_get_sysfs_path;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   749
 		ibv_read_sysfs_file;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   750
+		sol_get_cpu_info;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   751
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   752
 	local: *;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   753
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   754
diff -r -u /tmp/846623/libibverbs-1.1.4/src/cmd.c libibverbs-1.1.4/src/cmd.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   755
--- /tmp/846623/libibverbs-1.1.4/src/cmd.c	Thu Feb  3 01:53:17 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   756
+++ libibverbs-1.1.4/src/cmd.c	Fri Feb 11 04:02:31 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   757
@@ -42,9 +42,34 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   758
 #include <errno.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   759
 #include <alloca.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   760
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   761
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   762
+#include <fcntl.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   763
+#include <sys/stat.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   764
+#include <sys/mkdev.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   765
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   766
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   767
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   768
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   769
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   770
+extern int ibv_open_mmap_driver(char *dev_name);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   771
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   772
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   773
+ * Event file creation for GET_CONTEXT & CREATE_COMP_CHANNEL :
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   774
+ * 	Solaris Uverbs driver supports creation of event file
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   775
+ * 	from the open(2) system call only. Event file will not
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   776
+ * 	be created by the write(2) syscall, for the above commands
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   777
+ *	as in Linux OFED.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   778
+ *
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   779
+ * Sequence of operations for GET_CONTEXT &  CREATE_COMP_CHANNEL :
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   780
+ *	event_fd = open(UVERBS_EVENT_FILE, O_RDWR);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   781
+ *	fstat(event_fd, &fstat_buf);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   782
+ *	NOTE : Minor number of event file passed to driver 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   783
+ *	cmd.resp.fd = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   784
+ *	write(verbs_fd);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   785
+ *	NOTE : Initialize the fd to one got by opening event file
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   786
+ *	cmd.resp.fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   787
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   788
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   789
 static int ibv_cmd_get_context_v2(struct ibv_context *context,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   790
 				  struct ibv_get_context *new_cmd,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   791
 				  size_t new_cmd_size,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   792
@@ -55,6 +80,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   793
 	struct ibv_get_context_v2 *cmd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   794
 	size_t cmd_size;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   795
 	uint32_t cq_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   796
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   797
+	int			event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   798
+	struct stat		fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   799
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   800
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   801
 	t = malloc(sizeof *t);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   802
 	if (!t)
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   803
@@ -67,12 +96,36 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   804
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   805
 	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   806
 	cmd->cq_fd_tab = (uintptr_t) &cq_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   807
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   808
+	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
   809
+	if (event_fd < 0)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   810
+		return (errno);	
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   811
+	if (fstat(event_fd, &fstat_buf))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   812
+		return (errno);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   813
+	resp->async_fd = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   814
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   815
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   816
 	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   817
 		return errno;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   818
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   819
+	resp->async_fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   820
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   821
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   822
 	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   823
 
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   824
+#if defined(__SVR4) && defined(__sun)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   825
+	/* We don't support parent-child sharing of IB resources on Solaris */
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   826
+	if (fcntl(resp->async_fd, F_SETFD, FD_CLOEXEC) < 0) {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   827
+		fprintf(stderr, "ibv_get_context: FD_CLOEXEC failed "
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   828
+		    "for async_fd: %s\n", strerror(errno));
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   829
+		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   830
+	}
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   831
+	if (fcntl(cq_fd, F_SETFD, FD_CLOEXEC) < 0) {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   832
+		fprintf(stderr, "ibv_get_context: FD_CLOEXEC failed "
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   833
+		    "for cq_fd: %s\n", strerror(errno));
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   834
+		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   835
+	}
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   836
+#endif
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   837
 	context->async_fd         = resp->async_fd;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   838
 	context->num_comp_vectors = 1;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   839
 	t->channel.context        = context;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   840
@@ -87,19 +140,53 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   841
 			size_t cmd_size, struct ibv_get_context_resp *resp,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   842
 			size_t resp_size)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   843
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   844
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   845
+	int			event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   846
+	struct stat		fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   847
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   848
 	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_cmd_get_context_v2(context, cmd, cmd_size, resp, resp_size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   850
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   851
 	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   852
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   853
+	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
   854
+	if (event_fd < 0)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   855
+		return (errno);	
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   856
+	if (fstat(event_fd, &fstat_buf))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   857
+		return (errno);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   858
+	resp->async_fd = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   859
+#endif
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 (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   862
 		return errno;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   863
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   864
+	resp->async_fd = event_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   865
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   866
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   867
 	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   868
 
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   869
+#if defined(__SVR4) && defined(__sun)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   870
+	/* We don't support parent-child sharing of IB resources on Solaris */
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   871
+	if (fcntl(resp->async_fd, F_SETFD, FD_CLOEXEC) < 0) {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   872
+		fprintf(stderr, "ibv_get_context: FD_CLOEXEC failed: %s\n",
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   873
+		    strerror(errno));
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   874
+		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   875
+	}
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   876
+#endif
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   877
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   878
 	context->async_fd         = resp->async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   879
 	context->num_comp_vectors = resp->num_comp_vectors;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   880
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   881
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   882
+	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   883
+	 * Open the underlying kernel hardware driver that will
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   884
+	 * provide the mmap function for this context.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   885
+	 */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   886
+	context->mmap_fd = ibv_open_mmap_driver(context->device->dev_name);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   887
+	if (context->mmap_fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   888
+		fprintf(stderr, PFX "ibv_cmd_get_context: Mmap open failed\n");
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   889
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   890
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   891
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   892
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
   893
 
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   894
@@ -120,6 +207,7 @@
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   895
 	memset(device_attr->fw_ver, 0, sizeof device_attr->fw_ver);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   896
 	*raw_fw_ver			       = resp.fw_ver;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   897
 	device_attr->node_guid 		       = resp.node_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   898
+	device_attr->node_guid_external	       = resp.node_guid_external;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   899
 	device_attr->sys_image_guid 	       = resp.sys_image_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   900
 	device_attr->max_mr_size 	       = resp.max_mr_size;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
   901
 	device_attr->page_size_cap 	       = resp.page_size_cap;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   902
@@ -207,6 +295,8 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   903
 {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   904
 	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_PD, resp, resp_size);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   905
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   906
+	cmd->user_handle     = (uintptr_t) pd;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   907
+
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   908
 	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   909
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   910
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   911
@@ -218,6 +308,47 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   912
 	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   913
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   914
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   915
+int ibv_cmd_alloc_shpd(struct ibv_context *context, struct ibv_pd *pd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   916
+         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
   917
+		     struct ibv_alloc_shpd *cmd, size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   918
+		     struct ibv_alloc_shpd_resp *resp, size_t resp_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   919
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   920
+	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_SHPD, resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   921
+        cmd->pd_handle = pd->handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   922
+	cmd->user_handle = (uintptr_t) pd;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   923
+	cmd->share_key = share_key;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   924
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   925
+	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   926
+		return errno;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   927
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   928
+	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   929
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   930
+	shpd->handle  = resp->shpd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   931
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   932
+	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   933
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   934
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   935
+int ibv_cmd_share_pd(struct ibv_context *context, struct ibv_shpd *shpd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   936
+         uint64_t share_key, struct ibv_pd *pd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   937
+		     struct ibv_share_pd *cmd, size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   938
+		     struct ibv_share_pd_resp *resp, size_t resp_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   939
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   940
+	IBV_INIT_CMD_RESP(cmd, cmd_size, SHARE_PD, resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   941
+	cmd->shpd_handle = shpd->handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   942
+	cmd->share_key = share_key;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   943
+	cmd->user_handle     = (uintptr_t) pd;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   944
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   945
+	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   946
+		return errno;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   947
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   948
+	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   949
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   950
+	pd->handle  = resp->pd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   951
+	pd->context = context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   952
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   953
+	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   954
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   955
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   956
 int ibv_cmd_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
   957
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   958
 	struct ibv_dealloc_pd cmd;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   959
@@ -224,6 +355,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   960
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   961
 	IBV_INIT_CMD(&cmd, sizeof cmd, DEALLOC_PD);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   962
 	cmd.pd_handle = pd->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   963
+	cmd.user_handle = (uintptr_t) pd;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   964
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   965
 	if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   966
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   967
@@ -244,6 +376,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   968
 	cmd->length 	  = length;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   969
 	cmd->hca_va 	  = hca_va;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   970
 	cmd->pd_handle 	  = pd->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   971
+	cmd->user_handle  = (uintptr_t) mr;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   972
 	cmd->access_flags = access;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   973
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   974
 	if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   975
@@ -259,6 +392,35 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   976
 	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   977
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   978
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   979
+int ibv_cmd_reg_mr_relaxed(struct ibv_pd *pd, void *addr, size_t length,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   980
+		   uint64_t hca_va, int access,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   981
+		   struct ibv_mr *mr, struct ibv_reg_mr *cmd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   982
+		   size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   983
+		   struct ibv_reg_mr_resp *resp, size_t resp_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   984
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   985
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   986
+	IBV_INIT_CMD_RESP(cmd, cmd_size, REG_MR_RELAXED, resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   987
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   988
+	cmd->start 	  = (uintptr_t) addr;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   989
+	cmd->length 	  = length;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   990
+	cmd->hca_va 	  = hca_va;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   991
+	cmd->pd_handle 	  = pd->handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
   992
+	cmd->user_handle  = (uintptr_t) mr;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   993
+	cmd->access_flags = access;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   994
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   995
+	if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   996
+		return errno;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   997
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   998
+	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
   999
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1000
+	mr->handle  = resp->mr_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1001
+	mr->lkey    = resp->lkey;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1002
+	mr->rkey    = resp->rkey;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1003
+	mr->context = pd->context;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1004
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1005
+	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1006
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1007
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1008
 int ibv_cmd_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
  1009
 {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1010
 	struct ibv_dereg_mr cmd;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1011
@@ -265,6 +427,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1012
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1013
 	IBV_INIT_CMD(&cmd, sizeof cmd, DEREG_MR);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1014
 	cmd.mr_handle = mr->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1015
+	cmd.user_handle  = (uintptr_t) mr;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1016
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1017
 	if (write(mr->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1018
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1019
@@ -272,6 +435,34 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1020
 	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1021
 }
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1022
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1023
+int ibv_cmd_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
  1024
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1025
+	struct ibv_dereg_mr cmd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1026
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1027
+	IBV_INIT_CMD(&cmd, sizeof cmd, DEREG_MR_RELAXED);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1028
+	cmd.mr_handle = mr->handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1029
+	cmd.user_handle  = (uintptr_t) mr;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1030
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1031
+	if (write(mr->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1032
+		return errno;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1033
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1034
+	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1035
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1036
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1037
+int ibv_cmd_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
  1038
+{
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1039
+	struct ibv_flush_relaxed_mr cmd;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1040
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1041
+	IBV_INIT_CMD(&cmd, sizeof cmd, FLUSH_RELAXED_MR);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1042
+	cmd.pd_handle = pd->handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1043
+	cmd.user_handle  = (uintptr_t) pd;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1044
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1045
+	if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1046
+		return errno;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1047
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1048
+	return 0;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1049
+}
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1050
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1051
 static int ibv_cmd_create_cq_v2(struct ibv_context *context, int cqe,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1052
 				struct ibv_cq *cq,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1053
 				struct ibv_create_cq *new_cmd, size_t new_cmd_size,
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1054
@@ -315,7 +506,19 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1055
 	cmd->user_handle   = (uintptr_t) cq;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1056
 	cmd->cqe           = cqe;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1057
 	cmd->comp_vector   = comp_vector;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1058
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1059
+	if (channel) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1060
+		struct stat	fstat_buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1061
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1062
+		if (fstat(channel->fd, &fstat_buf))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1063
+			return (errno);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1064
+		else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1065
+			cmd->comp_channel = minor(fstat_buf.st_rdev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1066
+	} else 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1067
+		cmd->comp_channel = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1068
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1069
 	cmd->comp_channel  = channel ? channel->fd : -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1070
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1071
 	cmd->reserved      = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1072
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1073
 	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1074
@@ -346,6 +549,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1075
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, POLL_CQ, resp, rsize);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1076
 	cmd.cq_handle = ibcq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1077
 	cmd.ne        = ne;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1078
+	cmd.user_handle  = (uintptr_t) ibcq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1079
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1080
 	if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1081
 		ret = -1;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1082
@@ -384,6 +588,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1083
 	IBV_INIT_CMD(&cmd, sizeof cmd, REQ_NOTIFY_CQ);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1084
 	cmd.cq_handle = ibcq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1085
 	cmd.solicited = !!solicited_only;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1086
+	cmd.user_handle  = (uintptr_t) ibcq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1087
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1088
 	if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1089
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1090
@@ -399,6 +604,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1091
 	IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1092
 	cmd->cq_handle = cq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1093
 	cmd->cqe       = cqe;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1094
+	cmd->user_handle   = (uintptr_t) cq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1095
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1096
 	if (write(cq->context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1097
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1098
@@ -434,6 +640,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1099
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_CQ, &resp, sizeof resp);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1100
 	cmd.cq_handle = cq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1101
 	cmd.reserved  = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1102
+	cmd.user_handle  = (uintptr_t) cq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1103
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1104
 	if (write(cq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1105
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1106
@@ -555,6 +762,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1107
 	cmd->attr_mask	= srq_attr_mask;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1108
 	cmd->max_wr	= srq_attr->max_wr;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1109
 	cmd->srq_limit	= srq_attr->srq_limit;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1110
+	cmd->user_handle   = (uintptr_t) srq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1111
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1112
 	if (write(srq->context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1113
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1114
@@ -569,6 +777,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1115
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1116
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_SRQ, &resp, sizeof resp);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1117
 	cmd->srq_handle = srq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1118
+	cmd->user_handle   = (uintptr_t) srq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1119
 	cmd->reserved   = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1120
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1121
 	if (write(srq->context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1122
@@ -606,6 +815,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1123
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1124
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_SRQ, &resp, sizeof resp);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1125
 	cmd.srq_handle = srq->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1126
+	cmd.user_handle  = (uintptr_t) srq;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1127
 	cmd.reserved   = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1128
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1129
 	if (write(srq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1130
@@ -637,7 +847,20 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1131
 	cmd->max_send_sge    = attr->cap.max_send_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1132
 	cmd->max_recv_sge    = attr->cap.max_recv_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1133
 	cmd->max_inline_data = attr->cap.max_inline_data;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1134
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1135
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1136
+	if (attr->sq_sig_all & LIB_RDMACM_QP_BIT) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1137
+		cmd->sq_sig_all =
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1138
+		    (uint8_t)(attr->sq_sig_all & ~LIB_RDMACM_QP_BIT);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1139
+		cmd->sq_sig_all |= 0x80;
2453
1c6123926962 15963508 SUNBT7202723 ibv_post_send(3) needs to be updated
Boris Chiu <Boris.Chiu@Oracle.COM>
parents: 869
diff changeset
  1140
+		attr->sq_sig_all &= ~LIB_RDMACM_QP_BIT;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1141
+	} else {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1142
+		cmd->sq_sig_all = (uint8_t)attr->sq_sig_all;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1143
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1144
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1145
 	cmd->sq_sig_all	     = attr->sq_sig_all;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1146
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1147
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1148
 	cmd->qp_type 	     = attr->qp_type;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1149
 	cmd->is_srq 	     = !!attr->srq;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1150
 	cmd->srq_handle      = attr->qp_type == IBV_QPT_XRC ?
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1151
@@ -691,6 +914,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1152
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_QP, &resp, sizeof resp);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1153
 	cmd->qp_handle = qp->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1154
 	cmd->attr_mask = attr_mask;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1155
+	cmd->user_handle   = (uintptr_t) qp;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1156
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1157
 	if (write(qp->context->cmd_fd, cmd, cmd_size) != cmd_size)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1158
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1159
@@ -772,6 +996,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1160
 	IBV_INIT_CMD(cmd, cmd_size, MODIFY_QP);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1161
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1162
 	cmd->qp_handle 		 = qp->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1163
+	cmd->user_handle   	 = (uintptr_t) qp;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1164
 	cmd->attr_mask 		 = attr_mask;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1165
 	cmd->qkey 		 = attr->qkey;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1166
 	cmd->rq_psn 		 = attr->rq_psn;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1167
@@ -1292,6 +1517,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1168
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1169
 	cmd.qp_handle = qp->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1170
 	cmd.reserved  = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1171
+	cmd.user_handle  = (uintptr_t) qp;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1172
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1173
 	if (write(qp->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1174
 		return errno;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1175
@@ -1313,6 +1539,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1176
 	IBV_INIT_CMD(&cmd, sizeof cmd, ATTACH_MCAST);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1177
 	memcpy(cmd.gid, gid->raw, sizeof cmd.gid);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1178
 	cmd.qp_handle = qp->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1179
+	cmd.user_handle  = (uintptr_t) qp;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1180
 	cmd.mlid      = lid;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1181
 	cmd.reserved  = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1182
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1183
@@ -1329,6 +1556,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1184
 	IBV_INIT_CMD(&cmd, sizeof cmd, DETACH_MCAST);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1185
 	memcpy(cmd.gid, gid->raw, sizeof cmd.gid);
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1186
 	cmd.qp_handle = qp->handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1187
+	cmd.user_handle  = (uintptr_t) qp;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1188
 	cmd.mlid      = lid;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1189
 	cmd.reserved  = 0;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1190
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1191
@@ -1406,4 +1634,3 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1192
 		return errno;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1193
 	return 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1194
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1195
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1196
diff -r -u /tmp/846623/libibverbs-1.1.4/src/init.c libibverbs-1.1.4/src/init.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1197
--- /tmp/846623/libibverbs-1.1.4/src/init.c	Sun Nov  1 06:47:19 2009
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1198
+++ libibverbs-1.1.4/src/init.c	Fri Feb 11 04:02:32 2011
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1199
@@ -77,8 +77,13 @@
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1200
 static struct ibv_driver_name *driver_name_list;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1201
 static struct ibv_driver *head_driver, *tail_driver;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1202
 
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1203
+static uint blueflame_enabled = 0;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1204
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1205
 static int find_sysfs_devs(void)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1206
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1207
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1208
+	char device_path[IBV_SYSFS_PATH_MAX];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1209
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1210
 	char class_path[IBV_SYSFS_PATH_MAX];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1211
 	DIR *class_dir;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1212
 	struct dirent *dent;
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1213
@@ -86,19 +91,35 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1214
 	char value[8];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1215
 	int ret = 0;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1216
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1217
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1218
+	snprintf(device_path, sizeof device_path, "/dev/infiniband/ofs");
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1219
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1220
 	snprintf(class_path, sizeof class_path, "%s/class/infiniband_verbs",
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1221
 		 ibv_get_sysfs_path());
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1222
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1223
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1224
+	class_dir = opendir(device_path);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1225
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1226
 	class_dir = opendir(class_path);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1227
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1228
 	if (!class_dir)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1229
 		return ENOSYS;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1230
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1231
 	while ((dent = readdir(class_dir))) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1232
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1233
+		int adapter_num;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1234
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1235
 		struct stat buf;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1236
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1237
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1238
 		if (dent->d_name[0] == '.')
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1239
 			continue;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1240
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1241
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1242
+		if (sscanf(dent->d_name, "uverbs%d",
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1243
+		    &adapter_num) != 1)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1244
+			continue;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1245
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1246
 		if (!sysfs_dev)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1247
 			sysfs_dev = malloc(sizeof *sysfs_dev);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1248
 		if (!sysfs_dev) {
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1249
@@ -109,6 +130,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1250
 		snprintf(sysfs_dev->sysfs_path, sizeof sysfs_dev->sysfs_path,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1251
 			 "%s/%s", class_path, dent->d_name);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1252
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1253
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1254
 		if (stat(sysfs_dev->sysfs_path, &buf)) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1255
 			fprintf(stderr, PFX "Warning: couldn't stat '%s'.\n",
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1256
 				sysfs_dev->sysfs_path);
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1257
@@ -117,6 +139,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1258
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1259
 		if (!S_ISDIR(buf.st_mode))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1260
 			continue;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1261
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1262
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1263
 		snprintf(sysfs_dev->sysfs_name, sizeof sysfs_dev->sysfs_name,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1264
 			"%s", dent->d_name);
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1265
@@ -280,6 +303,13 @@
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1266
 
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1267
 			driver_name->next = driver_name_list;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1268
 			driver_name_list  = driver_name;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1269
+		} else if (strcmp(field, "blueflame") == 0) {
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1270
+			config += strspn(config, "\t ");
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1271
+			field = strsep(&config, "\n\t ");
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1272
+			if (strcmp(field, "enable") == 0)
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1273
+				blueflame_enabled = 1;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1274
+			if (strcmp(field, "disable") == 0)
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1275
+				blueflame_enabled = 0;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1276
 		} else
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1277
 			fprintf(stderr, PFX "Warning: ignoring bad config directive "
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1278
 				"'%s' in file '%s'.\n", field, path);
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1279
@@ -367,6 +397,7 @@
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1280
 	strcpy(dev->dev_path,   sysfs_dev->sysfs_path);
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1281
 	strcpy(dev->name,       sysfs_dev->ibdev_name);
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1282
 	strcpy(dev->ibdev_path, sysfs_dev->ibdev_path);
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1283
+	dev->blueflame_enabled = blueflame_enabled;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1284
 
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1285
 	return dev;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1286
 }
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1287
@@ -409,6 +440,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1288
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1289
 static void check_memlock_limit(void)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1290
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1291
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1292
 	struct rlimit rlim;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1293
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1294
 	if (!geteuid())
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1295
@@ -423,6 +455,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1296
 		fprintf(stderr, PFX "Warning: RLIMIT_MEMLOCK is %lu bytes.\n"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1297
 			"    This will severely limit memory registrations.\n",
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1298
 			rlim.rlim_cur);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1299
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1300
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1301
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1302
 static void add_device(struct ibv_device *dev,
741
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1303
diff -r -u /tmp/846623/libibverbs-1.1.4/src/enum_strs.c libibverbs-1.1.4/src/enum_strs.c
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1304
--- /tmp/846623/libibverbs-1.1.4/src/enum_strs.c	Wed Sep 16 04:27:22 2009
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1305
+++ libibverbs-1.1.4/src/enum_strs.c	Tue Mar 20 16:27:45 2012
741
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1306
@@ -85,6 +85,7 @@
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1307
 		[IBV_EVENT_SRQ_LIMIT_REACHED]	= "SRQ limit reached",
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1308
 		[IBV_EVENT_QP_LAST_WQE_REACHED]	= "last WQE reached",
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1309
 		[IBV_EVENT_CLIENT_REREGISTER]	= "client reregistration",
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1310
+		[IBV_EVENT_GID_CHANGE]		= "GID change",
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1311
 	};
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1312
 
83cb76377624 7154908 IB_EVENT_LID_CHANGE should be IB_EVENT_GID_CHANGE
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 715
diff changeset
  1313
 	if (event < IBV_EVENT_CQ_ERR || event > IBV_EVENT_CLIENT_REREGISTER)
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1314
diff -r -u /tmp/846623/libibverbs-1.1.4/src/sysfs.c libibverbs-1.1.4/src/sysfs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1315
--- /tmp/846623/libibverbs-1.1.4/src/sysfs.c	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
  1316
+++ libibverbs-1.1.4/src/sysfs.c	Fri Feb 11 04:02:33 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1317
@@ -44,6 +44,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1318
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1319
 #include "ibverbs.h"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1320
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1321
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1322
+int sol_read_sysfs_file(char *path, char *buf, size_t size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1323
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1324
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1325
 static char *sysfs_path;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1326
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1327
 const char *ibv_get_sysfs_path(void)
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
  1328
@@ -79,12 +83,18 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1329
 			char *buf, size_t size)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1330
 {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1331
 	char *path;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1332
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1333
 	int fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1334
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1335
 	int len;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1336
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1337
 	if (asprintf(&path, "%s/%s", dir, file) < 0)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1338
 		return -1;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1339
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1340
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1341
+	len = sol_read_sysfs_file(path, buf, size);
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
  1342
+	free(path);
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1343
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1344
 	fd = open(path, O_RDONLY);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1345
 	if (fd < 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1346
 		free(path);
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
  1347
@@ -98,6 +108,7 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1348
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1349
 	if (len > 0 && buf[len - 1] == '\n')
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1350
 		buf[--len] = '\0';
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1351
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1352
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1353
 	return len;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1354
 }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1355
diff -r -u /tmp/846623/libibverbs-1.1.4/configure libibverbs-1.1.4/configure
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1356
--- /tmp/846623/libibverbs-1.1.4/configure	Thu Feb  3 01:53:23 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1357
+++ libibverbs-1.1.4/configure	Fri Feb 11 04:02:14 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1358
@@ -3173,6 +3173,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1359
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1360
 $as_echo_n "checking whether the C compiler works... " >&6; }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1361
 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1362
+ac_link_default=`$as_echo "$ac_link" | sed 's/ \$LIBS//'`
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1363
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1364
 # The possible output files:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1365
 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1366
@@ -3258,6 +3259,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1367
 ac_clean_files=$ac_clean_files_save
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1368
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1369
 $as_echo_n "checking for suffix of executables... " >&6; }
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1370
+ac_link_nolibs=`$as_echo "$ac_link" | sed 's/ \$LIBS//'`
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1371
 if { { ac_try="$ac_link"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1372
 case "(($ac_try" in
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1373
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1374
@@ -3265,7 +3267,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1375
 esac
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1376
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1377
 $as_echo "$ac_try_echo"; } >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1378
-  (eval "$ac_link") 2>&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1379
+  (eval "$ac_link_nolibs") 2>&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1380
   ac_status=$?
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1381
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1382
   test $ac_status = 0; }; then :
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1383
@@ -3321,7 +3323,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1384
 esac
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1385
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1386
 $as_echo "$ac_try_echo"; } >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1387
-  (eval "$ac_link") 2>&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1388
+  (eval "$ac_link_nolibs") 2>&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1389
   ac_status=$?
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1390
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1391
   test $ac_status = 0; }
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
  1392
@@ -3509,13 +3511,13 @@
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
  1393
   CFLAGS=$ac_save_CFLAGS
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
  1394
 elif test $ac_cv_prog_cc_g = yes; then
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
  1395
   if test "$GCC" = yes; then
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
  1396
-    CFLAGS="-g -O2"
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
  1397
+    CFLAGS="-g -O3"
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
  1398
   else
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
  1399
     CFLAGS="-g"
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
  1400
   fi
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
  1401
 else
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
  1402
   if test "$GCC" = yes; then
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
  1403
-    CFLAGS="-O2"
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
  1404
+    CFLAGS="-O3"
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
  1405
   else
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
  1406
     CFLAGS=
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
  1407
   fi
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1408
@@ -8721,6 +8723,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1409
 	;;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1410
       esac
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1411
       link_all_deplibs=yes
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1412
+	 hardcode_libdir_flag_spec=
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1413
       ;;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1414
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1415
     sunos4*)
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
  1416
@@ -10945,13 +10948,13 @@
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
  1417
   CFLAGS=$ac_save_CFLAGS
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
  1418
 elif test $ac_cv_prog_cc_g = yes; then
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
  1419
   if test "$GCC" = yes; then
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
  1420
-    CFLAGS="-g -O2"
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
  1421
+    CFLAGS="-g -O3"
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
  1422
   else
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
  1423
     CFLAGS="-g"
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
  1424
   fi
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
  1425
 else
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
  1426
   if test "$GCC" = yes; then
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
  1427
-    CFLAGS="-O2"
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
  1428
+    CFLAGS="-O3"
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
  1429
   else
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
  1430
     CFLAGS=
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
  1431
   fi
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1432
@@ -11198,7 +11201,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1433
   $as_echo_n "(cached) " >&6
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1434
 else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1435
   ac_check_lib_save_LIBS=$LIBS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1436
-LIBS="-ldl  $LIBS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1437
+LIBS="-ldl"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1438
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1439
 /* end confdefs.h.  */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1440
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1441
@@ -11245,7 +11248,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1442
   $as_echo_n "(cached) " >&6
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1443
 else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1444
   ac_check_lib_save_LIBS=$LIBS
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1445
-LIBS="-lpthread  $LIBS"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1446
+LIBS="-lpthread"
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1447
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1448
 /* end confdefs.h.  */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1449
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1450
diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/sa-kern-abi.h libibverbs-1.1.4/include/infiniband/sa-kern-abi.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1451
--- /tmp/846623/libibverbs-1.1.4/include/infiniband/sa-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
  1452
+++ libibverbs-1.1.4/include/infiniband/sa-kern-abi.h	Fri Feb 11 04:02:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1453
@@ -33,7 +33,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1454
 #ifndef INFINIBAND_SA_KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1455
 #define INFINIBAND_SA_KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1456
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1457
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1458
 #include <linux/types.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1459
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1460
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1461
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1462
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1463
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1464
  * Obsolete, deprecated names.  Will be removed in libibverbs 1.1.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1465
diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/kern-abi.h libibverbs-1.1.4/include/infiniband/kern-abi.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1466
--- /tmp/846623/libibverbs-1.1.4/include/infiniband/kern-abi.h	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
  1467
+++ libibverbs-1.1.4/include/infiniband/kern-abi.h	Fri Feb 11 04:02:20 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1468
@@ -35,7 +35,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1469
 #ifndef KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1470
 #define KERN_ABI_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1471
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1472
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1473
 #include <linux/types.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1474
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1475
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1476
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1477
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1478
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1479
  * This file must be kept in sync with the kernel's version of
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1480
@@ -94,6 +98,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1481
 	IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1482
 	IB_USER_VERBS_CMD_REG_XRC_RCV_QP,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1483
 	IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP,
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1484
+	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
  1485
+	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
  1486
+	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
  1487
+	IB_USER_VERBS_CMD_ALLOC_SHPD,
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1488
+	IB_USER_VERBS_CMD_SHARE_PD
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1489
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1490
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1491
 /*
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1492
@@ -160,6 +169,7 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1493
 struct ibv_query_device_resp {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1494
 	__u64 fw_ver;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1495
 	__u64 node_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1496
+	__u64 node_guid_external;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1497
 	__u64 sys_image_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1498
 	__u64 max_mr_size;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1499
 	__u64 page_size_cap;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1500
@@ -240,18 +250,70 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1501
 	__u16 in_words;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1502
 	__u16 out_words;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1503
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1504
+	__u64 user_handle;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1505
 	__u64 driver_data[0];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1506
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1507
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1508
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1509
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1510
+ * PD responses may pass opaque data to userspace drivers, we choose a value
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1511
+ * larger than what any HCA requires.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1512
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1513
+#define SOL_UVERBS_PD_DATA_OUT_SIZE          24
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1514
+typedef __u64 ofuv_pd_drv_data_out_t[SOL_UVERBS_PD_DATA_OUT_SIZE];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1515
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1516
 struct ibv_alloc_pd_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1517
+        __u32 pd_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1518
+        __u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1519
+        ofuv_pd_drv_data_out_t drv_out;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1520
+};
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1521
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1522
+struct ibv_alloc_pd_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1523
 	__u32 pd_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1524
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1525
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1526
 
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1527
+struct ibv_alloc_shpd {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1528
+	__u32 command;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1529
+	__u16 in_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1530
+	__u16 out_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1531
+	__u64 response;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1532
+	__u32 pd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1533
+	__u32 reserved;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1534
+	__u64 share_key;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1535
+	__u64 user_handle;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1536
+	__u64 driver_data[0];
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1537
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1538
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1539
+struct ibv_alloc_shpd_resp {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1540
+	__u32 shpd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1541
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1542
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1543
+struct ibv_share_pd {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1544
+	__u32 command;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1545
+	__u16 in_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1546
+	__u16 out_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1547
+	__u64 response;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1548
+	__u32 shpd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1549
+	__u32 reserved;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1550
+	__u64 share_key;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1551
+	__u64 user_handle;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1552
+	__u64 driver_data[0];
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1553
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1554
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1555
+struct ibv_share_pd_resp {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1556
+	__u32 pd_handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1557
+        __u32 reserved;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1558
+        ofuv_pd_drv_data_out_t drv_out;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1559
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1560
+
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1561
 struct ibv_dealloc_pd {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1562
 	__u32 command;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1563
 	__u16 in_words;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1564
 	__u16 out_words;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1565
 	__u32 pd_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1566
+	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1567
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1568
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1569
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1570
 struct ibv_reg_mr {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1571
@@ -264,6 +326,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1572
 	__u64 hca_va;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1573
 	__u32 pd_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1574
 	__u32 access_flags;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1575
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1576
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1577
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1578
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1579
@@ -278,8 +341,19 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1580
 	__u16 in_words;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1581
 	__u16 out_words;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1582
 	__u32 mr_handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1583
+	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1584
+	__u64 user_handle;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1585
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1586
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1587
+struct ibv_flush_relaxed_mr {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1588
+	__u32 command;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1589
+	__u16 in_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1590
+	__u16 out_words;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1591
+	__u32 pd_handle;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1592
+	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1593
+	__u64 user_handle;
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1594
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1595
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1596
 struct ibv_create_comp_channel {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1597
 	__u32 command;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1598
 	__u16 in_words;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1599
@@ -304,10 +378,25 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1600
 	__u64 driver_data[0];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1601
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1602
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1603
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1604
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1605
+ * CQ responses pass opaque data to userspace drivers, we choose a value
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1606
+ * larger than what any HCA requires.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1607
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1608
+#define SOL_UVERBS_CQ_DATA_OUT_SIZE          24
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1609
+typedef __u64 ofuv_cq_drv_data_out_t[SOL_UVERBS_CQ_DATA_OUT_SIZE];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1610
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1611
 struct ibv_create_cq_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1612
 	__u32 cq_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1613
 	__u32 cqe;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1614
+	ofuv_cq_drv_data_out_t   drv_out;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1615
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1616
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1617
+struct ibv_create_cq_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1618
+	__u32 cq_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1619
+	__u32 cqe;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1620
+};
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1621
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1622
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1623
 struct ibv_kern_wc {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1624
 	__u64  wr_id;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1625
@@ -334,6 +423,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1626
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1627
 	__u32 cq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1628
 	__u32 ne;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1629
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1630
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1631
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1632
 struct ibv_poll_cq_resp {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1633
@@ -348,6 +438,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1634
 	__u16 out_words;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1635
 	__u32 cq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1636
 	__u32 solicited;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1637
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1638
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1639
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1640
 struct ibv_resize_cq {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1641
@@ -357,6 +448,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1642
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1643
 	__u32 cq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1644
 	__u32 cqe;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1645
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1646
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1647
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1648
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1649
@@ -363,7 +455,11 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1650
 struct ibv_resize_cq_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1651
 	__u32 cqe;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1652
 	__u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1653
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1654
+        ofuv_cq_drv_data_out_t   drv_out;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1655
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1656
 	__u64 driver_data[0];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1657
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1658
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1659
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1660
 struct ibv_destroy_cq {
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1661
@@ -373,6 +469,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1662
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1663
 	__u32 cq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1664
 	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1665
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1666
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1667
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1668
 struct ibv_destroy_cq_resp {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1669
@@ -460,6 +557,14 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1670
 	__u64 driver_data[0];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1671
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1672
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1673
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1674
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1675
+ * QP responses pass opaque data to userspace drivers, we choose a value
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1676
+ * larger than what any HCA requires.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1677
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1678
+#define SOL_UVERBS_QP_DATA_OUT_SIZE          24
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1679
+typedef __u64 ofuv_qp_drv_data_out_t[SOL_UVERBS_QP_DATA_OUT_SIZE];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1680
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1681
 struct ibv_create_qp_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1682
 	__u32 qp_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1683
 	__u32 qpn;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1684
@@ -469,7 +574,20 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1685
 	__u32 max_recv_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1686
 	__u32 max_inline_data;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1687
 	__u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1688
+	ofuv_qp_drv_data_out_t drv_out;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1689
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1690
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1691
+struct ibv_create_qp_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1692
+	__u32 qp_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1693
+	__u32 qpn;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1694
+	__u32 max_send_wr;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1695
+	__u32 max_recv_wr;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1696
+	__u32 max_send_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1697
+	__u32 max_recv_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1698
+	__u32 max_inline_data;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1699
+	__u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1700
+};
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1701
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1702
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1703
 struct ibv_qp_dest {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1704
 	__u8  dgid[16];
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1705
@@ -493,6 +611,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1706
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1707
 	__u32 qp_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1708
 	__u32 attr_mask;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1709
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1710
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1711
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1712
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1713
@@ -560,6 +679,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1714
 	__u8  alt_port_num;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1715
 	__u8  alt_timeout;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1716
 	__u8  reserved[2];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1717
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1718
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1719
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1720
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1721
@@ -570,6 +690,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1722
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1723
 	__u32 qp_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1724
 	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1725
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1726
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1727
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1728
 struct ibv_destroy_qp_resp {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1729
@@ -775,6 +896,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1730
 	__u32 qp_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1731
 	__u16 mlid;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1732
 	__u16 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1733
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1734
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1735
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1736
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1737
@@ -786,6 +908,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1738
 	__u32 qp_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1739
 	__u16 mlid;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1740
 	__u16 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1741
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1742
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1743
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1744
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1745
@@ -817,12 +940,29 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1746
 	__u64 driver_data[0];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1747
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1748
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1749
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1750
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1751
+ * QP responses pass opaque data to userspace drivers, we choose a value
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1752
+ * larger than what any HCA requires.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1753
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1754
+#define SOL_UVERBS_SRQ_DATA_OUT_SIZE          24
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1755
+typedef __u64 ofuv_srq_drv_data_out_t[SOL_UVERBS_SRQ_DATA_OUT_SIZE];
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1756
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1757
 struct ibv_create_srq_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1758
 	__u32 srq_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1759
 	__u32 max_wr;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1760
 	__u32 max_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1761
 	__u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1762
+	ofuv_srq_drv_data_out_t drv_out;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1763
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1764
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1765
+struct ibv_create_srq_resp {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1766
+	__u32 srq_handle;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1767
+	__u32 max_wr;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1768
+	__u32 max_sge;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1769
+	__u32 reserved;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1770
+};
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1771
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1772
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1773
 struct ibv_modify_srq {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1774
 	__u32 command;
2761
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1775
@@ -832,6 +972,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1776
 	__u32 attr_mask;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1777
 	__u32 max_wr;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1778
 	__u32 srq_limit;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1779
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1780
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1781
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1782
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1783
@@ -842,6 +983,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1784
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1785
 	__u32 srq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1786
 	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1787
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1788
 	__u64 driver_data[0];
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1789
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1790
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1791
@@ -859,6 +1001,7 @@
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1792
 	__u64 response;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1793
 	__u32 srq_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1794
 	__u32 reserved;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1795
+	__u64 user_handle;
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1796
 };
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1797
 
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1798
 struct ibv_destroy_srq_resp {
91830550729b 17199356 The ibv_devinfo command cannot print the board_id of CX-3 IB-HCA (userland)
Boris Chiu <boris.chiu@oracle.com>
parents: 2567
diff changeset
  1799
@@ -946,6 +1089,11 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1800
 	IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1801
 	IB_USER_VERBS_CMD_REG_XRC_RCV_QP_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1802
 	IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1803
+	IB_USER_VERBS_CMD_REG_MR_RELAXED_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1804
+	IB_USER_VERBS_CMD_DEREG_MR_RELAXED_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1805
+	IB_USER_VERBS_CMD_FLUSH_RELAXED_MR_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1806
+  	IB_USER_VERBS_CMD_ALLOC_SHPD_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1807
+  	IB_USER_VERBS_CMD_SHARE_PD_V2 = -1,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1808
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1809
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1810
 struct ibv_destroy_cq_v1 {
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1811
diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h libibverbs-1.1.4/include/infiniband/driver.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1812
--- /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h	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
  1813
+++ libibverbs-1.1.4/include/infiniband/driver.h	Fri Feb 11 04:02:20 2011
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1814
@@ -74,6 +74,14 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1815
 int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1816
 		     struct ibv_alloc_pd *cmd, size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1817
 		     struct ibv_alloc_pd_resp *resp, size_t resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1818
+int ibv_cmd_alloc_shpd(struct ibv_context *context, struct ibv_pd *pd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1819
+		     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
  1820
+		     struct ibv_alloc_shpd *cmd, size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1821
+		     struct ibv_alloc_shpd_resp *resp, size_t resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1822
+int ibv_cmd_share_pd(struct ibv_context *context, struct ibv_shpd *shpd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1823
+		     uint64_t share_key, struct ibv_pd *pd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1824
+		     struct ibv_share_pd *cmd, size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1825
+		     struct ibv_share_pd_resp *resp, size_t resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1826
 int ibv_cmd_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
  1827
 #define IBV_CMD_REG_MR_HAS_RESP_PARAMS
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1828
 int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1829
@@ -81,7 +89,15 @@
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1830
 		   struct ibv_mr *mr, struct ibv_reg_mr *cmd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1831
 		   size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1832
 		   struct ibv_reg_mr_resp *resp, size_t resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1833
+#define IBV_CMD_REG_MR_RELAXED_HAS_RESP_PARAMS
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1834
+int ibv_cmd_reg_mr_relaxed(struct ibv_pd *pd, void *addr, size_t length,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1835
+		   uint64_t hca_va, int access,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1836
+		   struct ibv_mr *mr, struct ibv_reg_mr *cmd,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1837
+		   size_t cmd_size,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1838
+		   struct ibv_reg_mr_resp *resp, size_t resp_size);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1839
 int ibv_cmd_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
  1840
+int ibv_cmd_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
  1841
+int ibv_cmd_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
  1842
 int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1843
 		      struct ibv_comp_channel *channel,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1844
 		      int comp_vector, struct ibv_cq *cq,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1845
@@ -164,8 +180,8 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1846
 int ibv_read_sysfs_file(const char *dir, const char *file,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1847
 			char *buf, size_t size);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1848
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1849
-int ibv_resolve_eth_gid(const struct ibv_pd *pd, uint8_t port_num,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1850
-			union ibv_gid *dgid, uint8_t sgid_index,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1851
+int ibv_resolve_eth_gid(struct ibv_pd *pd, uint8_t port_num,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1852
+			const union ibv_gid *dgid, uint8_t sgid_index,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1853
 			uint8_t mac[], uint16_t *vlan, uint8_t *tagged,
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1854
 			uint8_t *is_mcast);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1855
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1856
diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/verbs.h libibverbs-1.1.4/include/infiniband/verbs.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1857
--- /tmp/846623/libibverbs-1.1.4/include/infiniband/verbs.h	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
  1858
+++ libibverbs-1.1.4/include/infiniband/verbs.h	Fri Feb 11 04:02:21 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1859
@@ -38,6 +38,9 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1860
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1861
 #include <stdint.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1862
 #include <pthread.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1863
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1864
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1865
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1866
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1867
 #ifdef __cplusplus
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1868
 #  define BEGIN_C_DECLS extern "C" {
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1869
@@ -105,6 +108,7 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1870
 struct ibv_device_attr {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1871
 	char			fw_ver[64];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1872
 	uint64_t		node_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1873
+	uint64_t		node_guid_external;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1874
 	uint64_t		sys_image_guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1875
 	uint64_t		max_mr_size;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1876
 	uint64_t		page_size_cap;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1877
@@ -297,7 +301,8 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1878
 	IBV_ACCESS_REMOTE_WRITE		= (1<<1),
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1879
 	IBV_ACCESS_REMOTE_READ		= (1<<2),
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1880
 	IBV_ACCESS_REMOTE_ATOMIC	= (1<<3),
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1881
-	IBV_ACCESS_MW_BIND		= (1<<4)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1882
+	IBV_ACCESS_MW_BIND		= (1<<4),
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1883
+	IBV_ACCESS_SO			= (1<<5)	/* Strong Order */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1884
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1885
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1886
 struct ibv_pd {
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1887
@@ -305,6 +310,10 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1888
 	uint32_t		handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1889
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1890
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1891
+struct ibv_shpd {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1892
+	uint32_t		handle;
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1893
+};
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1894
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1895
 enum ibv_rereg_mr_flags {
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1896
 	IBV_REREG_MR_CHANGE_TRANSLATION	= (1 << 0),
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1897
 	IBV_REREG_MR_CHANGE_PD		= (1 << 1),
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1898
@@ -425,6 +434,14 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1899
 	uint32_t		max_inline_data;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1900
 };
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1901
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1902
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1903
+/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1904
+ * The 31st bit of sq_sig_all is set for QPs allocated
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1905
+ * using librdmacm. Consumers use sq_sig_all 0 /1.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1906
+ */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1907
+#define LIB_RDMACM_QP_BIT	0x8000
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1908
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1909
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1910
 struct ibv_qp_init_attr {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1911
 	void		       *qp_context;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1912
 	struct ibv_cq	       *send_cq;
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1913
@@ -659,6 +676,7 @@
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1914
 	char			dev_path[IBV_SYSFS_PATH_MAX];
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1915
 	/* Path to infiniband class device in sysfs */
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1916
 	char			ibdev_path[IBV_SYSFS_PATH_MAX];
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1917
+	uint			blueflame_enabled;
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1918
 };
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1919
 
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1920
 struct ibv_more_ops {
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1921
@@ -743,6 +761,12 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1922
 	int			(*detach_mcast)(struct ibv_qp *qp, const union ibv_gid *gid,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1923
 						uint16_t lid);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1924
 	void			(*async_event)(struct ibv_async_event *event);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1925
+	struct ibv_mr *		(*reg_mr_relaxed)(struct ibv_pd *pd, void *addr, size_t length,
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1926
+					  int access);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1927
+	int			(*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
  1928
+	int			(*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
  1929
+	struct ibv_shpd *	(*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
  1930
+	struct ibv_pd *		(*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
  1931
 };
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1932
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1933
 struct ibv_context {
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1934
@@ -749,6 +773,13 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1935
 	struct ibv_device      *device;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1936
 	struct ibv_context_ops	ops;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1937
 	int			cmd_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1938
+#if defined(__SVR4) && defined(__sun)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1939
+	/*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1940
+	 * Solaris user libraries use this FD for mmap operations. It is an
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1941
+	 * open to the underlying kernel hardware specific driver.
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1942
+	 */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1943
+	int			mmap_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1944
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1945
 	int			async_fd;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1946
 	int			num_comp_vectors;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  1947
 	pthread_mutex_t		mutex;
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1948
@@ -797,6 +828,11 @@
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1949
 uint64_t ibv_get_device_guid(struct ibv_device *device);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1950
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1951
 /**
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1952
+ * ibv_get_device_guid_external - Return device's node external GUID
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1953
+ */
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1954
+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
  1955
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1956
+/**
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1957
  * ibv_open_device - Initialize device for use
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1958
  */
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  1959
 struct ibv_context *ibv_open_device(struct ibv_device *device);
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1960
@@ -858,6 +894,20 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1961
 struct ibv_pd *ibv_alloc_pd(struct ibv_context *context);
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1962
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1963
 /**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1964
+ * ibv_alloc_shpd - Mark given protection domain as shareable & return shpd structure
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1965
+ *                  that identify it.
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1966
+ *                  the storage for shpd structure needs to be provided by client.
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1967
+ */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1968
+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
  1969
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1970
+/**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1971
+ * ibv_share_pd - share the protection domain identified by given shpd struct & return a
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1972
+ *                process linked ibv_pd struct.
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1973
+ *                the share_key given should match with the share_key specifed in alloc_shpd().
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1974
+ */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1975
+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
  1976
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1977
+/**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1978
  * ibv_dealloc_pd - Free a protection domain
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1979
  */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1980
 int ibv_dealloc_pd(struct ibv_pd *pd);
2567
333785b27b31 16425070 Need a way to disable blueflame on sparc in OFUV libraries
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 2453
diff changeset
  1981
@@ -869,11 +919,27 @@
817
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1982
 			  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
  1983
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1984
 /**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1985
+ * ibv_reg_mr_relaxed - Register a memory region using FMR
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1986
+ */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1987
+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
  1988
+			  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
  1989
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1990
+/**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1991
  * ibv_dereg_mr - Deregister a memory region
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1992
  */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1993
 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
  1994
 
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1995
 /**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1996
+ * ibv_dereg_mr_relaxed - Deregister a memory region registered using FMR
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1997
+ */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  1998
+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
  1999
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2000
+/**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2001
+ * ibv_flush_relaxed_mr - Flush all free mr's in the protection domain
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2002
+ */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2003
+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
  2004
+
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2005
+/**
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2006
  * ibv_create_comp_channel - Create a completion event channel
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2007
  */
f45ca7242301 7154945 userland FMR and shared PD OFUV libraries support
Christophe Juhasz <Chris.Juhasz@Sun.COM>
parents: 741
diff changeset
  2008
 struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context);
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2009
diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.h libibverbs-1.1.4/include/infiniband/arch.h
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2010
--- /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.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
  2011
+++ libibverbs-1.1.4/include/infiniband/arch.h	Fri Feb 11 04:02:20 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2012
@@ -34,6 +34,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2013
 #define INFINIBAND_ARCH_H
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2014
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2015
 #include <stdint.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2016
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2017
 #include <endian.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2018
 #include <byteswap.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2019
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2020
@@ -46,6 +47,9 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2021
 #else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2022
 #error __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2023
 #endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2024
+#else
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2025
+#include <infiniband/ofa_solaris.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2026
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2027
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2028
 /*
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2029
  * Architecture-specific defines.  Currently, an architecture is
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2030
diff -r -u /tmp/846623/libibverbs-1.1.4/Makefile.in libibverbs-1.1.4/Makefile.in
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2031
--- /tmp/846623/libibverbs-1.1.4/Makefile.in	Thu Feb  3 01:53:23 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2032
+++ libibverbs-1.1.4/Makefile.in	Fri Feb 11 05:27:45 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2033
@@ -90,7 +90,8 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2034
 	src_libibverbs_la-compat-1_0.lo src_libibverbs_la-device.lo \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2035
 	src_libibverbs_la-init.lo src_libibverbs_la-marshall.lo \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2036
 	src_libibverbs_la-memory.lo src_libibverbs_la-sysfs.lo \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2037
-	src_libibverbs_la-verbs.lo src_libibverbs_la-enum_strs.lo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2038
+	src_libibverbs_la-verbs.lo src_libibverbs_la-enum_strs.lo \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2039
+	src_libibverbs_la-solaris.lo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2040
 src_libibverbs_la_OBJECTS = $(am_src_libibverbs_la_OBJECTS)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2041
 AM_V_lt = $(am__v_lt_$(V))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2042
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2043
@@ -313,11 +314,11 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2044
 INCLUDES = -I$(srcdir)/include
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2045
 lib_LTLIBRARIES = src/libibverbs.la
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2046
 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
  2047
-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
  2048
+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
  2049
 libibverbs_version_script = @LIBIBVERBS_VERSION_SCRIPT@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2050
 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
  2051
 			    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
  2052
-			    src/enum_strs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2053
+			    src/enum_strs.c src/solaris_compatability src/verbs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2054
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2055
 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
  2056
     $(libibverbs_version_script)
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2057
@@ -340,6 +341,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2058
 libibverbsincludedir = $(includedir)/infiniband
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2059
 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
  2060
     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
  2061
+	include/infiniband/ofa_solaris.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2062
     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
  2063
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2064
 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
  2065
@@ -368,6 +370,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2066
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2067
 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
  2068
     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
  2069
+	 include/infiniband/ofa_solaris.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2070
     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
  2071
     src/ibverbs.h examples/pingpong.h \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2072
     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
  2073
@@ -440,8 +443,8 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2074
 	  else :; fi; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2075
 	done; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2076
 	test -z "$$list2" || { \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2077
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2078
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2079
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2080
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2081
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2082
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2083
 uninstall-libLTLIBRARIES:
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2084
@@ -486,8 +489,8 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2085
 	while read type dir files; do \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2086
 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2087
 	    test -z "$$files" || { \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2088
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2089
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2090
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) -m 755 $$files '$(DESTDIR)$(bindir)$$dir'"; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2091
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) -m 755 $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2092
 	    } \
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2093
 	; done
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2094
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2095
@@ -554,6 +557,7 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2096
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/src_libibverbs_la-memory.Plo@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2097
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/src_libibverbs_la-sysfs.Plo@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2098
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/src_libibverbs_la-verbs.Plo@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2099
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/src_libibverbs_la-solaris.Plo@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2100
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srq_pingpong.Po@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2101
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uc_pingpong.Po@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2102
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ud_pingpong.Po@am__quote@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2103
@@ -654,6 +658,14 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2104
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2105
 @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libibverbs_la_CFLAGS) $(CFLAGS) -c -o src_libibverbs_la-enum_strs.lo `test -f 'src/enum_strs.c' || echo '$(srcdir)/'`src/enum_strs.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2106
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2107
+src_libibverbs_la-solaris.lo: src/solaris_compatibility.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2108
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libibverbs_la_CFLAGS) $(CFLAGS) -MT src_libibverbs_la-solaris.lo -MD -MP -MF $(DEPDIR)/src_libibverbs_la-solaris.Tpo -c -o src_libibverbs_la-solaris.lo `test -f 'src/solaris_compatibility.c' || echo '$(srcdir)/'`src/solaris_compatibility.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2109
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/src_libibverbs_la-solaris.Tpo $(DEPDIR)/src_libibverbs_la-solaris.Plo
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2110
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2111
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/solaris_compatibility.c' object='src_libibverbs_la-solaris.lo' libtool=yes @AMDEPBACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2112
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2113
+@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libibverbs_la_CFLAGS) $(CFLAGS) -c -o src_libibverbs_la-solaris.lo `test -f 'src/solaris_compatibility.c' || echo '$(srcdir)/'`src/solaris_compatibility.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2114
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2115
 asyncwatch.o: examples/asyncwatch.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2116
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT asyncwatch.o -MD -MP -MF $(DEPDIR)/asyncwatch.Tpo -c -o asyncwatch.o `test -f 'examples/asyncwatch.c' || echo '$(srcdir)/'`examples/asyncwatch.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2117
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/asyncwatch.Tpo $(DEPDIR)/asyncwatch.Po
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2118
@@ -669,7 +681,6 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2119
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='examples/asyncwatch.c' object='asyncwatch.obj' libtool=no @AMDEPBACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2120
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2121
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o asyncwatch.obj `if test -f 'examples/asyncwatch.c'; then $(CYGPATH_W) 'examples/asyncwatch.c'; else $(CYGPATH_W) '$(srcdir)/examples/asyncwatch.c'; fi`
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2122
-
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2123
 device_list.o: examples/device_list.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2124
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT device_list.o -MD -MP -MF $(DEPDIR)/device_list.Tpo -c -o device_list.o `test -f 'examples/device_list.c' || echo '$(srcdir)/'`examples/device_list.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2125
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/device_list.Tpo $(DEPDIR)/device_list.Po
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2126
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/asyncwatch.c libibverbs-1.1.4/examples/asyncwatch.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2127
--- /tmp/846623/libibverbs-1.1.4/examples/asyncwatch.c	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
  2128
+++ libibverbs-1.1.4/examples/asyncwatch.c	Fri Feb 11 04:02:18 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2129
@@ -35,8 +35,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2130
 #endif /* HAVE_CONFIG_H */
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2131
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2132
 #include <stdio.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2133
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2134
 #include <endian.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2135
 #include <byteswap.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2136
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2137
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2138
 #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2139
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2140
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/srq_pingpong.c libibverbs-1.1.4/examples/srq_pingpong.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2141
--- /tmp/846623/libibverbs-1.1.4/examples/srq_pingpong.c	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
  2142
+++ libibverbs-1.1.4/examples/srq_pingpong.c	Wed Jun  8 09:46:34 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2143
@@ -171,6 +171,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2144
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2145
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2146
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2147
+	if (n == EAI_NONAME) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2148
+		fprintf(stderr, "Name or service not known for %s:%d\n", servername, port);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2149
+		free(service);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2150
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2151
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2152
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2153
 	for (t = res; t; t = t->ai_next) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2154
 		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2155
 		if (sockfd >= 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2156
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/ud_pingpong.c libibverbs-1.1.4/examples/ud_pingpong.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2157
--- /tmp/846623/libibverbs-1.1.4/examples/ud_pingpong.c	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
  2158
+++ libibverbs-1.1.4/examples/ud_pingpong.c	Wed Jun  8 09:46:34 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2159
@@ -149,6 +149,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2160
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2161
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2162
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2163
+	if (n == EAI_NONAME) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2164
+		fprintf(stderr, "Name or service not known for %s:%d\n", servername, port);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2165
+		free(service);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2166
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2167
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2168
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2169
 	for (t = res; t; t = t->ai_next) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2170
 		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2171
 		if (sockfd >= 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2172
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/rc_pingpong.c libibverbs-1.1.4/examples/rc_pingpong.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2173
--- /tmp/846623/libibverbs-1.1.4/examples/rc_pingpong.c	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
  2174
+++ libibverbs-1.1.4/examples/rc_pingpong.c	Wed Jun  8 09:46:34 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2175
@@ -161,6 +161,12 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2176
 		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2177
 	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2178
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2179
+	if (n == EAI_NONAME) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2180
+		fprintf(stderr, "Name or service not known for %s:%d\n", servername, port);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2181
+		free(service);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2182
+		return NULL;
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2183
+	}
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2184
+
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2185
 	for (t = res; t; t = t->ai_next) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2186
 		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2187
 		if (sockfd >= 0) {
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2188
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/device_list.c libibverbs-1.1.4/examples/device_list.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2189
--- /tmp/846623/libibverbs-1.1.4/examples/device_list.c	Sun Nov  1 06:47:19 2009
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2190
+++ libibverbs-1.1.4/examples/device_list.c	Fri Feb 11 04:02:18 2011
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2191
@@ -36,16 +36,32 @@
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2192
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2193
 #include <stdio.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2194
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2195
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2196
 #include <endian.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2197
 #include <byteswap.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2198
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2199
 
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2200
+#include <stdlib.h>
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2201
+#include <string.h>
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2202
 #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2203
 #include <infiniband/arch.h>
851
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2204
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2205
+/*
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2206
+ * Structure to hold the data printed by ibv_devices.
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2207
+ */
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2208
+typedef struct dev_print_s {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2209
+	char			name[24];
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2210
+	unsigned long long	guid;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2211
+	uint8_t			is_pf;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2212
+} dev_print_t;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2213
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2214
 int main(int argc, char *argv[])
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2215
 {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2216
 	struct ibv_device **dev_list;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2217
 	int num_devices, i;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2218
+	unsigned long long	guid_external;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2219
+	dev_print_t	*dp;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2220
+	int	print_col = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2221
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2222
 	dev_list = ibv_get_device_list(&num_devices);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2223
 	if (!dev_list) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2224
@@ -53,15 +69,45 @@
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2225
 		return 1;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2226
 	}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2227
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2228
-	printf("    %-16s\t   node GUID\n", "device");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2229
-	printf("    %-16s\t----------------\n", "------");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2230
+	dp = (dev_print_t *)malloc(sizeof(dev_print_t) * num_devices);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2231
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2232
-	for (i = 0; i < num_devices; ++i) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2233
-		printf("    %-16s\t%016llx\n",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2234
-		       ibv_get_device_name(dev_list[i]),
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2235
-		       (unsigned long long) ntohll(ibv_get_device_guid(dev_list[i])));
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2236
+	for (i = (num_devices - 1); i >= 0; --i) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2237
+		strcpy(dp[i].name, ibv_get_device_name(dev_list[i]));
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2238
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2239
+		dp[i].guid = (unsigned long long) ntohll(ibv_get_device_guid(dev_list[i]));
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2240
+		guid_external = (unsigned long long) ntohll(ibv_get_device_guid_external(dev_list[i]));
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2241
+		if (dp[i].guid != guid_external) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2242
+			print_col = 1;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2243
+			dp[i].is_pf = 0;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2244
+		} else
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2245
+			dp[i].is_pf = 1;
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2246
 	}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2247
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2248
+	if (print_col) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2249
+		printf("    %-16s\t   node GUID\t        type\n", "device");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2250
+		printf("    %-16s\t----------------\t----\n", "------");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2251
+		/* First print PFs */
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2252
+		for (i = (num_devices - 1); i >= 0; --i) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2253
+			if (dp[i].is_pf)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2254
+				printf("    %-16s\t%016llx\t %s\n",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2255
+					dp[i].name, dp[i].guid, "PF");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2256
+		}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2257
+		/* print VFs */
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2258
+		for (i = (num_devices - 1); i >= 0; --i) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2259
+			if (!dp[i].is_pf)
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2260
+				printf("    %-16s\t%016llx\t %s\n",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2261
+					dp[i].name, dp[i].guid, "VF");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2262
+		}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2263
+	} else {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2264
+		printf("    %-16s\t   node GUID\n", "device");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2265
+		printf("    %-16s\t----------------\n", "------");
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2266
+		for (i = (num_devices - 1); i >= 0; --i) {
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2267
+			printf("    %-16s\t%016llx\n",
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2268
+				dp[i].name, dp[i].guid);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2269
+		}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2270
+	}
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2271
+	free(dp);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2272
+
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2273
 	ibv_free_device_list(dev_list);
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2274
 
5d9119e2b7e1 PSARC/2012/200 OFUV SR-IOV support
Alex Chiu <Alex.Chiu@Oracle.COM>
parents: 817
diff changeset
  2275
 	return 0;
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2276
diff -r -u /tmp/846623/libibverbs-1.1.4/examples/devinfo.c libibverbs-1.1.4/examples/devinfo.c
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2277
--- /tmp/846623/libibverbs-1.1.4/examples/devinfo.c	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
  2278
+++ libibverbs-1.1.4/examples/devinfo.c	Fri Feb 11 04:02:19 2011
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2279
@@ -41,8 +41,10 @@
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2280
 #include <string.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2281
 #include <getopt.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2282
 #include <netinet/in.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2283
+#if !(defined(__SVR4) && defined(__sun))
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2284
 #include <endian.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2285
 #include <byteswap.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2286
+#endif
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2287
 
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2288
 #include <infiniband/verbs.h>
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff changeset
  2289
 #include <infiniband/driver.h>