PSARC 2015/310 IBTF and OFUV updates s11u3-sru
authorboris.chiu@oracle.com
Thu, 22 Oct 2015 08:27:04 -0700
branchs11u3-sru
changeset 4996 739983ef315c
parent 4993 efe17d59c020
child 4998 ff50817e2da2
PSARC 2015/310 IBTF and OFUV updates 20889536 remove some compiler warnings in libibverbs 21351609 Some sol_uverbs <-> libibverbs cmd/resp API structs not 64 bit aligned 20888202 remove Mellanox specific code from libibverbs 20735273 libibverbs must support AH interfaces for PSIF 20549008 open-fabrics should move from gcc3 to gcc4 21055860 ib_write_bw/ib_send_bw not sending inline data for non-hermon hcas 21218536 qperf randomly cores when compiled with gcc 4.8.2 20449637 Open Fabrics tools/utilities should be LP64 only 21499287 open-fabrics ibutils-1.5.7 fails to build in 64 only environment 21747062 update libibverbs to handle EDR/FDR speeds 21834282 saquery should use default SA timeout of 1sec from upstream 21863393 qperf attempts to free the PD before freeing the MR associated with it 21863652 qperf cannot handle device name with IB port number as argument
components/open-fabrics/Makefile
components/open-fabrics/ibutils/Makefile
components/open-fabrics/ibutils/patches/base.patch
components/open-fabrics/infiniband-diags/Makefile
components/open-fabrics/infiniband-diags/patches/base.patch
components/open-fabrics/libibverbs/Makefile
components/open-fabrics/libibverbs/ofa_solaris.h
components/open-fabrics/libibverbs/patches/base.patch
components/open-fabrics/libibverbs/solaris_compatibility.c
components/open-fabrics/libmlx4/Makefile
components/open-fabrics/libmlx4/mlnx_umap.h
components/open-fabrics/libmlx4/patches/base.patch
components/open-fabrics/librdmacm/Makefile
components/open-fabrics/ofed.mk
components/open-fabrics/open-fabrics.p5m
components/open-fabrics/perftest/Makefile
components/open-fabrics/perftest/patches/base.patch
components/open-fabrics/qperf/Makefile
components/open-fabrics/qperf/patches/base.patch
components/open-fabrics/rds-tools/Makefile
--- a/components/open-fabrics/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -106,6 +106,7 @@
 REQUIRED_PACKAGES += shell/bash
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/library
-REQUIRED_PACKAGES += system/library/gcc-3-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/linker
--- a/components/open-fabrics/ibutils/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/ibutils/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -36,12 +36,18 @@
 
 LIBS +=	-lsocket -lnsl -lopensm -losmvendor -losmcomp -libumad -libmad
 
+LDFLAGS.64 +=	-L $(PROTO_DIR)/usr/lib/$(MACH64)
+
 # we want to use the libcheck here
 DISABLE_LIBCHECK=
 
 CONFIGURE_ENV +=	INSTALL_DATA="$(INSTALL) -m 644"
 
+CONFIGURE_OPTIONS +=	CXXFLAGS="$(CXXFLAGS)"
 CONFIGURE_OPTIONS +=	--with-osm=$(PROTO_DIR)/usr
+CONFIGURE_OPTIONS +=	--bindir=$(CONFIGURE_SBINDIR.$(BITS))
+
+CONFIGURE_SBINDIR.32 =	$(CONFIGURE_PREFIX)/sbin/$(MACH32)
 
 PROTOMAN =	$(PROTO_DIR)/$(CONFIGURE_MANDIR)
 
@@ -94,9 +100,9 @@
 	$(RM) -r $(CLEANUP_DIRS)
 
 # common targets
-build:		$(BUILD_32)
+build:		$(BUILD_32_and_64)
 
-install:	$(INSTALL_32)
+install:	$(INSTALL_32_and_64)
 
 
 test:		$(NO_TESTS)
--- a/components/open-fabrics/ibutils/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/ibutils/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -308,60 +308,15 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -96,7 +96,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(bindir)"
-+am__installdirs = "$(DESTDIR)$(sbindir)"
- SCRIPTS = $(bin_SCRIPTS)
- SOURCES =
- DIST_SOURCES =
-@@ -224,8 +224,8 @@
- $(am__aclocal_m4_deps):
- install-binSCRIPTS: $(bin_SCRIPTS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do \
- 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
-@@ -243,19 +243,19 @@
- 	while read type dir files; do \
+@@ -244,7 +244,7 @@
  	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
  	     test -z "$$files" || { \
--	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ 	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
 -	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-+	       $(INSTALL_SCRIPT) -m 755 $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
++	       $(INSTALL_SCRIPT) -m 755 $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
  	     } \
  	; done
  
- uninstall-binSCRIPTS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
-+	@list='$(bin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	       sed -e 's,.*/,,;$(transform)'`; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- tags: TAGS
- TAGS:
- 
-@@ -297,7 +297,7 @@
- check: check-am
- all-am: Makefile $(SCRIPTS)
- installdirs:
--	for dir in "$(DESTDIR)$(bindir)"; do \
-+	for dir in "$(DESTDIR)$(sbindir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 @@ -426,6 +426,7 @@
  	sed -e 's=%ibdiag_libdir%='$(DESTDIR)$(libdir)'=' \
  	    -e 's=%with_ibdm_lib%='$(with_ibdm_lib)'=' \
@@ -494,61 +449,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -105,7 +105,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
-+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" \
- 	"$(DESTDIR)$(pkgincludedir)"
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libibsysapi_la_DEPENDENCIES =
-@@ -369,8 +369,8 @@
- 	$(libibsysapi_la_LINK) -rpath $(libdir) $(libibsysapi_la_OBJECTS) $(libibsysapi_la_LIBADD) $(LIBS)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do echo "$$p $$p"; done | \
- 	sed 's/$(EXEEXT)$$//' | \
- 	while read p p1; do if test -f $$p || test -f $$p1; \
-@@ -387,20 +387,20 @@
- 	while read type dir files; do \
- 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- 	    test -z "$$files" || { \
--	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
--	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- 	    } \
- 	; done
- 
- uninstall-binPROGRAMS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- 	      -e 's/$$/$(EXEEXT)/' `; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- 
- clean-binPROGRAMS:
- 	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-@@ -573,7 +573,7 @@
- install-binPROGRAMS: install-libLTLIBRARIES
- 
- installdirs:
--	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \
-+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgincludedir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 diff -r -u /tmp/ibutils-1.5.7/ibdm/Makefile.in ibutils-1.5.7/ibdm/Makefile.in
 --- /tmp/ibutils-1.5.7/ibdm/Makefile.in	Tue Mar  8 03:09:42 2011
 +++ ibutils-1.5.7/ibdm/Makefile.in	Thu Feb 24 16:51:16 2011
@@ -561,16 +461,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-diff -r -u /tmp/ibutils-1.5.7/ibdm/scripts/Makefile.am ibutils-1.5.7/ibdm/scripts/Makefile.am
---- /tmp/ibutils-1.5.7/ibdm/scripts/Makefile.am	Mon Nov  1 16:03:44 2010
-+++ ibutils-1.5.7/ibdm/scripts/Makefile.am	Thu Feb 24 16:51:17 2011
-@@ -37,5 +37,5 @@
- EXTRA_DIST = $(pkgdata_DATA)
- 
- install-data-am:
--	for s in $(pkgdata_DATA); do cp $$s $(DESTDIR)$(bindir)/; done
-+	for s in $(pkgdata_DATA); do cp $$s $(DESTDIR)$(sbindir)/; done
- 
 diff -r -u /tmp/ibutils-1.5.7/ibdm/scripts/Makefile.in ibutils-1.5.7/ibdm/scripts/Makefile.in
 --- /tmp/ibutils-1.5.7/ibdm/scripts/Makefile.in	Tue Mar  8 03:09:41 2011
 +++ ibutils-1.5.7/ibdm/scripts/Makefile.in	Thu Feb 24 16:51:17 2011
@@ -583,15 +473,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -447,7 +447,7 @@
- 
- 
- install-data-am:
--	for s in $(pkgdata_DATA); do cp $$s $(DESTDIR)$(bindir)/; done
-+	for s in $(pkgdata_DATA); do cp $$s $(DESTDIR)$(sbindir)/; done
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
 diff -r -u /tmp/ibutils-1.5.7/ibdm/ibdm/Fabric.cpp ibutils-1.5.7/ibdm/ibdm/Fabric.cpp
 --- /tmp/ibutils-1.5.7/ibdm/ibdm/Fabric.cpp	Thu Oct  7 07:29:56 2010
 +++ ibutils-1.5.7/ibdm/ibdm/Fabric.cpp	Mon Sep 19 12:03:07 2011
@@ -648,15 +529,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -102,7 +102,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
-+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" \
- 	"$(DESTDIR)$(pkgincludedir)"
- LTLIBRARIES = $(lib_LTLIBRARIES)
- am__DEPENDENCIES_1 =
 @@ -316,7 +316,7 @@
  AM_CFLAGS = $(DBG) $(IBNL_PATH) $(TCL_CFLAGS)
  lib_LTLIBRARIES = libibdmcom.la libibdm.la
@@ -666,52 +538,6 @@
  libibdmcom_la_LDFLAGS = -version-info $(LIB_VER_TRIPLET)
  libibdm_la_SOURCES = ibdm_wrap.cpp ibdm.i $(common_SOURCES)
  libibdm_la_LIBADD = $(TCL_LIBS) 
-@@ -402,8 +402,8 @@
- 	$(libibdmcom_la_LINK) -rpath $(libdir) $(libibdmcom_la_OBJECTS) $(libibdmcom_la_LIBADD) $(LIBS)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do echo "$$p $$p"; done | \
- 	sed 's/$(EXEEXT)$$//' | \
- 	while read p p1; do if test -f $$p || test -f $$p1; \
-@@ -420,20 +420,20 @@
- 	while read type dir files; do \
- 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- 	    test -z "$$files" || { \
--	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
--	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- 	    } \
- 	; done
- 
- uninstall-binPROGRAMS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- 	      -e 's/$$/$(EXEEXT)/' `; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- 
- clean-binPROGRAMS:
- 	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-@@ -628,7 +628,7 @@
- install-binPROGRAMS: install-libLTLIBRARIES
- 
- installdirs:
--	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \
-+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgincludedir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 diff -r -u /tmp/ibutils-1.5.7/ibdm/ibdm/ibdm_wrap.cpp ibutils-1.5.7/ibdm/ibdm/ibdm_wrap.cpp
 --- /tmp/ibutils-1.5.7/ibdm/ibdm/ibdm_wrap.cpp	Thu Oct  7 07:28:58 2010
 +++ ibutils-1.5.7/ibdm/ibdm/ibdm_wrap.cpp	Thu Feb 24 16:51:17 2011
@@ -861,61 +687,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -113,7 +113,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
-+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)"
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libibis_la_LIBADD =
- am_libibis_la_OBJECTS = ibis_wrap.lo ibbbm.lo ibcr.lo ibis.lo \
-@@ -420,8 +420,8 @@
- 	$(libibis_la_LINK) -rpath $(libdir) $(libibis_la_OBJECTS) $(libibis_la_LIBADD) $(LIBS)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do echo "$$p $$p"; done | \
- 	sed 's/$(EXEEXT)$$//' | \
- 	while read p p1; do if test -f $$p || test -f $$p1; \
-@@ -438,20 +438,20 @@
- 	while read type dir files; do \
- 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- 	    test -z "$$files" || { \
--	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
--	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- 	    } \
- 	; done
- 
- uninstall-binPROGRAMS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- 	      -e 's/$$/$(EXEEXT)/' `; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- 
- clean-binPROGRAMS:
- 	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-@@ -754,7 +754,7 @@
- install-binPROGRAMS: install-libLTLIBRARIES
- 
- installdirs:
--	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \
-+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 diff -r -u /tmp/ibutils-1.5.7/ibis/src/ibbbm_base.h ibutils-1.5.7/ibis/src/ibbbm_base.h
 --- /tmp/ibutils-1.5.7/ibis/src/ibbbm_base.h	Wed Feb 24 02:09:25 2010
 +++ ibutils-1.5.7/ibis/src/ibbbm_base.h	Thu Feb 24 16:51:18 2011
@@ -996,6 +767,117 @@
  
    /* TODO - define a Vendor Specific CR Read/Write attributes to use VL15 */
  
+@@ -35180,7 +35180,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_sys_guid_set(_swigobj,_swigval)  _ibsm_node_info_sys_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_sys_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->sys_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->sys_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_sys_guid_set(_swigobj,_swigval) (_swigobj->sys_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_sys_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35238,7 +35249,17 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_sys_guid_get(_swigobj)  _ibsm_node_info_sys_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_sys_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->sys_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->sys_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_sys_guid_get(_swigobj) (&_swigobj->sys_guid)
++#endif
+ static int _wrap_smNodeInfo_sys_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35290,7 +35311,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_node_guid_set(_swigobj,_swigval)  _ibsm_node_info_node_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_node_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->node_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->node_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_node_guid_set(_swigobj,_swigval) (_swigobj->node_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_node_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35348,7 +35380,17 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_node_guid_get(_swigobj)  _ibsm_node_info_node_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_node_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->node_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->node_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_node_guid_get(_swigobj) (&_swigobj->node_guid)
++#endif
+ static int _wrap_smNodeInfo_node_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35400,7 +35442,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_port_guid_set(_swigobj,_swigval)  _ibsm_node_info_port_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_port_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->port_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->port_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_port_guid_set(_swigobj,_swigval) (_swigobj->port_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_port_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35458,7 +35511,17 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_port_guid_get(_swigobj)  _ibsm_node_info_port_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_port_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->port_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->port_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_port_guid_get(_swigobj) (&_swigobj->port_guid)
++#endif
+ static int _wrap_smNodeInfo_port_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
 diff -r -u /tmp/ibutils-1.5.7/ibis/src/ibpm_base.h ibutils-1.5.7/ibis/src/ibpm_base.h
 --- /tmp/ibutils-1.5.7/ibis/src/ibpm_base.h	Wed Feb 24 02:09:25 2010
 +++ ibutils-1.5.7/ibis/src/ibpm_base.h	Thu Feb 24 16:51:18 2011
@@ -1097,6 +979,126 @@
  
    /* TODO - define a Vendor Specific CR Read/Write attributes to use VL15 */
  
+@@ -35242,7 +35251,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_sys_guid_set(_swigobj,_swigval)  _ibsm_node_info_sys_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_sys_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->sys_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->sys_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_sys_guid_set(_swigobj,_swigval) (_swigobj->sys_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_sys_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35300,7 +35320,18 @@
+ }
+     return TCL_OK;
+ }
++
++#ifdef __sparc
++#define _ibsm_node_info_sys_guid_get(_swigobj)  _ibsm_node_info_sys_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_sys_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->sys_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->sys_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_sys_guid_get(_swigobj) (&_swigobj->sys_guid)
++#endif
+ static int _wrap_smNodeInfo_sys_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35340,6 +35371,7 @@
+   ibis_tcl_error = 0;
+       _result = (ib_net64_t *)_ibsm_node_info_sys_guid_get(_arg0);
+ ;
++
+   if (ibis_tcl_error) {
+ 	 Tcl_SetStringObj(Tcl_GetObjResult(interp), ibis_tcl_error_msg, -1);
+ 	 return TCL_ERROR;
+@@ -35352,7 +35384,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_node_guid_set(_swigobj,_swigval)  _ibsm_node_info_node_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_node_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->node_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->node_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_node_guid_set(_swigobj,_swigval) (_swigobj->node_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_node_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35410,7 +35453,17 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_node_guid_get(_swigobj)  _ibsm_node_info_node_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_node_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->node_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->node_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_node_guid_get(_swigobj) (&_swigobj->node_guid)
++#endif
+ static int _wrap_smNodeInfo_node_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35462,7 +35515,18 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_port_guid_set(_swigobj,_swigval)  _ibsm_node_info_port_guid_set_64(_swigobj, _swigval)
++static inline ib_net64_t *
++_ibsm_node_info_port_guid_set_64(smNodeInfo *_swigobj, ib_net64_t *swigval)
++{
++        *(ib_net32_t *)&(_swigobj->port_guid) = *((ib_net32_t *)swigval);
++        *((ib_net32_t *)&(_swigobj->port_guid) + 1) = *((ib_net32_t *)swigval +1);
++        return ((ib_net64_t *)swigval);
++}
++#else
+ #define _ibsm_node_info_port_guid_set(_swigobj,_swigval) (_swigobj->port_guid = *(_swigval),_swigval)
++#endif
+ static int _wrap_smNodeInfo_port_guid_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
+@@ -35520,7 +35584,17 @@
+ }
+     return TCL_OK;
+ }
++#ifdef __sparc
++#define _ibsm_node_info_port_guid_get(_swigobj)  _ibsm_node_info_port_guid_get_64(_swigobj)
++static inline ib_net64_t * _ibsm_node_info_port_guid_get_64(smNodeInfo *_swigobj){
++	static uint32_t	val[2];
++	val[0] = *(ib_net32_t *)&(_swigobj->port_guid);
++	val[1] = *((ib_net32_t *)&(_swigobj->port_guid) + 1);
++	return ((ib_net64_t *)&val);
++}
++#else
+ #define _ibsm_node_info_port_guid_get(_swigobj) (&_swigobj->port_guid)
++#endif
+ static int _wrap_smNodeInfo_port_guid_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ 
+     ib_net64_t * _result;
 diff -r -u /tmp/ibutils-1.5.7/ibis/tests/Makefile.in ibutils-1.5.7/ibis/tests/Makefile.in
 --- /tmp/ibutils-1.5.7/ibis/tests/Makefile.in	Tue Mar  8 03:09:51 2011
 +++ ibutils-1.5.7/ibis/tests/Makefile.in	Thu Feb 24 16:51:18 2011
@@ -1158,17 +1160,26 @@
          ;;
  
      sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-@@ -15295,7 +15297,8 @@
+@@ -15284,8 +15286,8 @@
+       else
+          osm_lib_dir=lib
+       fi
++      with_osm_libs=$with_osm/$osm_lib_dir
+    fi
+-   with_osm_libs=$with_osm/$osm_lib_dir
+ 
+       if test -d $with_osm/include/infiniband; then
+       OSM_BUILD=openib
+@@ -15295,7 +15297,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: OSM: build type $OSM_BUILD" >&5
  $as_echo "$as_me: OSM: build type $OSM_BUILD" >&6;}
  
 -   OSM_LDFLAGS="-Wl,-rpath -Wl,$with_osm_libs -L$with_osm_libs"
-+   with_osm_libs=`echo "$with_osm_libs" | $SED -e "s/\/lib64$/\/lib/g"`
 +   OSM_LDFLAGS="-L$with_osm_libs"
           if test $OSM_BUILD = openib; then
              osm_include_dir="$with_osm/include/infiniband"
        osm_extra_includes="-I$with_osm/include"
-@@ -15378,7 +15381,7 @@
+@@ -15378,7 +15380,7 @@
        osm_debug_flags=
     fi
  
@@ -1213,52 +1224,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -103,7 +103,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
-+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" \
- 	"$(DESTDIR)$(pkgincludedir)"
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libibmscli_la_LIBADD =
-@@ -430,8 +430,8 @@
- 	$(libibmscli_la_LINK) -rpath $(libdir) $(libibmscli_la_OBJECTS) $(libibmscli_la_LIBADD) $(LIBS)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do echo "$$p $$p"; done | \
- 	sed 's/$(EXEEXT)$$//' | \
- 	while read p p1; do if test -f $$p || test -f $$p1; \
-@@ -455,13 +455,13 @@
- 
- uninstall-binPROGRAMS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-+	@list='$(bin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- 	      -e 's/$$/$(EXEEXT)/' `; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- 
- clean-binPROGRAMS:
- 	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-@@ -693,7 +693,7 @@
- install-binPROGRAMS: install-libLTLIBRARIES
- 
- installdirs:
--	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \
-+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgincludedir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 diff -r -u /tmp/ibutils-1.5.7/ibmgtsim/tests/Makefile.in ibutils-1.5.7/ibmgtsim/tests/Makefile.in
 --- /tmp/ibutils-1.5.7/ibmgtsim/tests/Makefile.in	Tue Mar  8 03:10:01 2011
 +++ ibutils-1.5.7/ibmgtsim/tests/Makefile.in	Thu Feb 24 16:51:19 2011
@@ -1283,60 +1248,6 @@
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
  INSTALL_HEADER = $(INSTALL_DATA)
-@@ -99,7 +99,7 @@
- am__base_list = \
-   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
--am__installdirs = "$(DESTDIR)$(bindir)"
-+am__installdirs = "$(DESTDIR)$(sbindir)"
- SCRIPTS = $(bin_SCRIPTS)
- SOURCES =
- DIST_SOURCES =
-@@ -275,8 +275,8 @@
- $(am__aclocal_m4_deps):
- install-binSCRIPTS: $(bin_SCRIPTS)
- 	@$(NORMAL_INSTALL)
--	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
--	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
-+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-+	@list='$(bin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
- 	for p in $$list; do \
- 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
-@@ -294,19 +294,19 @@
- 	while read type dir files; do \
- 	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- 	     test -z "$$files" || { \
--	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
--	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- 	     } \
- 	; done
- 
- uninstall-binSCRIPTS:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
-+	@list='$(bin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
- 	files=`for p in $$list; do echo "$$p"; done | \
- 	       sed -e 's,.*/,,;$(transform)'`; \
- 	test -n "$$list" || exit 0; \
--	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
--	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
- 
- mostlyclean-libtool:
- 	-rm -f *.lo
-@@ -354,7 +354,7 @@
- check: check-am
- all-am: Makefile $(SCRIPTS)
- installdirs:
--	for dir in "$(DESTDIR)$(bindir)"; do \
-+	for dir in "$(DESTDIR)$(sbindir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
 diff -r -u /tmp/ibutils-1.5.7/ibmgtsim/Makefile.in ibutils-1.5.7/ibmgtsim/Makefile.in
 --- /tmp/ibutils-1.5.7/ibmgtsim/Makefile.in	Tue Mar  8 03:10:02 2011
 +++ ibutils-1.5.7/ibmgtsim/Makefile.in	Thu Feb 24 16:51:18 2011
--- a/components/open-fabrics/infiniband-diags/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/infiniband-diags/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -55,6 +55,8 @@
 COMPONENT_POST_CONFIGURE_ACTION=\
 	$(SYMLINK) ../../../$(COMPONENT_SRC)/scripts/IBswcountlimits.pm $(@D)/scripts
 
+CONFIGURE_SBINDIR.32 =	$(CONFIGURE_PREFIX)/sbin/$(MACH32)
+
 PROTOMAN = $(PROTO_DIR)/$(CONFIGURE_MANDIR)
 
 CLEANUP_FILES =\
@@ -77,9 +79,9 @@
 	$(INSTALL) -m 644 manpages/set_nodedesc.sh.1m $(PROTOMAN)/man1m
 
 # common targets
-build:		$(BUILD_32)
+build:		$(BUILD_32_and_64)
 
-install:	$(INSTALL_32) $(PROTOMAN1MFILES)
+install:	$(INSTALL_32_and_64) $(PROTOMAN1MFILES)
 
 
 test:		$(NO_TESTS)
--- a/components/open-fabrics/infiniband-diags/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/infiniband-diags/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -1806,16 +1806,14 @@
 diff -r -u /tmp/infiniband-diags-1.5.8/src/saquery.c infiniband-diags-1.5.8/src/saquery.c
 --- /tmp/infiniband-diags-1.5.8/src/saquery.c	Wed Feb 16 02:13:21 2011
 +++ infiniband-diags-1.5.8/src/saquery.c	Thu Jun 23 10:36:40 2011
-@@ -104,8 +104,7 @@
+@@ -104,7 +104,6 @@
  /**
   * Declare some globals because I don't want this to be too complex.
   */
 -#define MAX_PORTS (8)
--#define DEFAULT_SA_TIMEOUT_MS (1000)
-+#define DEFAULT_SA_TIMEOUT_MS (10000)
+ #define DEFAULT_SA_TIMEOUT_MS (1000)
  static struct query_res result;
  
- enum {
 @@ -1757,7 +1756,7 @@
  			requested_lid = (uint16_t) strtoul(argv[0], NULL, 0);
  			requested_lid_flag++;
--- a/components/open-fabrics/libibverbs/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libibverbs/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -48,6 +48,8 @@
 
 LIBS +=	-lsocket -lnsl -lkstat
 
+CONFIGURE_OPTIONS +=	--bindir=$(USRBINDIR)
+
 # --disable-libcheck is not a supported option for this component
 DISABLE_LIBCHECK=
 
@@ -59,14 +61,7 @@
 
 COMPONENT_POST_INSTALL_ACTION = \
 	$(RM) $(PROTO_DIR)/$(CONFIGURE_BINDIR.$(BITS))/ibv_uc_pingpong; \
-	$(RM) $(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_devices \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_devinfo \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_asyncwatch \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_rc_pingpong \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_uc_pingpong \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_ud_pingpong \
-	$(PROTO_DIR)/$(CONFIGURE_BINDIR.64)/ibv_srq_pingpong \
-	$(PROTO_DIR)/$(CONFIGURE_MANDIR)/man1/ibv_uc_pingpong.1 \
+	$(RM) $(PROTO_DIR)/$(CONFIGURE_MANDIR)/man1/ibv_uc_pingpong.1 \
 	$(PROTO_DIR)/$(CONFIGURE_MANDIR)/man3/ibv_reg_xrc_rcv_qp.3 \
 	$(PROTO_DIR)/$(CONFIGURE_MANDIR)/man3/ibv_create_xrc_srq.3 \
 	$(PROTO_DIR)/$(CONFIGURE_MANDIR)/man3/ibv_open_xrc_domain.3 \
--- a/components/open-fabrics/libibverbs/ofa_solaris.h	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libibverbs/ofa_solaris.h	Thu Oct 22 08:27:04 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -45,6 +45,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 #include <alloca.h>
+#include <string.h>
 
 #ifdef __cplusplus
 extern "C" {
--- a/components/open-fabrics/libibverbs/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libibverbs/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -1,5 +1,5 @@
-# This patch was developed in-house. Since it is Solaris-specific,
-# it is not suitable for upstream.
+#This patch was developed in-house. We plan to submit it upstream, but do
+# not yet have a target date for doing so
 #
 diff -r -u /tmp/846623/libibverbs-1.1.4/Makefile.am libibverbs-1.1.4/Makefile.am
 --- /tmp/846623/libibverbs-1.1.4/Makefile.am	Thu Feb  3 01:53:17 2011
@@ -559,7 +559,62 @@
  int ibv_rate_to_mult(enum ibv_rate rate)
  {
  	switch (rate) {
-@@ -93,6 +108,12 @@
+@@ -76,6 +91,54 @@
+ 	}
+ }
+ 
++int ibv_rate_to_mbps(enum ibv_rate rate)
++{
++	switch (rate) {
++	case IBV_RATE_2_5_GBPS: return 2500;
++	case IBV_RATE_5_GBPS:   return 5000;
++	case IBV_RATE_10_GBPS:  return 10000;
++	case IBV_RATE_20_GBPS:  return 20000;
++	case IBV_RATE_30_GBPS:  return 30000;
++	case IBV_RATE_40_GBPS:  return 40000;
++	case IBV_RATE_60_GBPS:  return 60000;
++	case IBV_RATE_80_GBPS:  return 80000;
++	case IBV_RATE_120_GBPS: return 120000;
++	case IBV_RATE_14_GBPS:  return 14062;
++	case IBV_RATE_56_GBPS:  return 56250;
++	case IBV_RATE_112_GBPS: return 112500;
++	case IBV_RATE_168_GBPS: return 168750;
++	case IBV_RATE_25_GBPS:  return 25781;
++	case IBV_RATE_100_GBPS: return 103125;
++	case IBV_RATE_200_GBPS: return 206250;
++	case IBV_RATE_300_GBPS: return 309375;
++	default:               return -1;
++	}
++}
++
++enum ibv_rate mbps_to_ibv_rate(int mbps)
++{
++	switch (mbps) {
++	case 2500:   return IBV_RATE_2_5_GBPS;
++	case 5000:   return IBV_RATE_5_GBPS;
++	case 10000:  return IBV_RATE_10_GBPS;
++	case 20000:  return IBV_RATE_20_GBPS;
++	case 30000:  return IBV_RATE_30_GBPS;
++	case 40000:  return IBV_RATE_40_GBPS;
++	case 60000:  return IBV_RATE_60_GBPS;
++	case 80000:  return IBV_RATE_80_GBPS;
++	case 120000: return IBV_RATE_120_GBPS;
++	case 14062:  return IBV_RATE_14_GBPS;
++	case 56250:  return IBV_RATE_56_GBPS;
++	case 112500: return IBV_RATE_112_GBPS;
++	case 168750: return IBV_RATE_168_GBPS;
++	case 25781:  return IBV_RATE_25_GBPS;
++	case 103125: return IBV_RATE_100_GBPS;
++	case 206250: return IBV_RATE_200_GBPS;
++	case 309375: return IBV_RATE_300_GBPS;
++	default:     return IBV_RATE_MAX;
++	}
++}
++
+ int __ibv_query_device(struct ibv_context *context,
+ 		       struct ibv_device_attr *device_attr)
+ {
+@@ -93,6 +156,12 @@
  int __ibv_query_gid(struct ibv_context *context, uint8_t port_num,
  		    int index, union ibv_gid *gid)
  {
@@ -572,7 +627,7 @@
  	char name[24];
  	char attr[41];
  	uint16_t val;
-@@ -112,6 +133,7 @@
+@@ -112,6 +181,7 @@
  	}
  
  	return 0;
@@ -580,7 +635,7 @@
  }
  default_symver(__ibv_query_gid, ibv_query_gid);
  
-@@ -118,6 +140,12 @@
+@@ -118,6 +188,12 @@
  int __ibv_query_pkey(struct ibv_context *context, uint8_t port_num,
  		     int index, uint16_t *pkey)
  {
@@ -593,7 +648,7 @@
  	char name[24];
  	char attr[8];
  	uint16_t val;
-@@ -133,9 +161,159 @@
+@@ -133,9 +209,159 @@
  
  	*pkey = htons(val);
  	return 0;
@@ -753,7 +808,7 @@
  struct ibv_pd *__ibv_alloc_pd(struct ibv_context *context)
  {
  	struct ibv_pd *pd;
-@@ -148,6 +326,27 @@
+@@ -148,6 +374,27 @@
  }
  default_symver(__ibv_alloc_pd, ibv_alloc_pd);
  
@@ -781,7 +836,7 @@
  int __ibv_dealloc_pd(struct ibv_pd *pd)
  {
  	return pd->context->ops.dealloc_pd(pd);
-@@ -175,6 +374,27 @@
+@@ -175,6 +422,27 @@
  }
  default_symver(__ibv_reg_mr, ibv_reg_mr);
  
@@ -809,7 +864,7 @@
  int __ibv_dereg_mr(struct ibv_mr *mr)
  {
  	int ret;
-@@ -189,6 +409,26 @@
+@@ -189,6 +457,26 @@
  }
  default_symver(__ibv_dereg_mr, ibv_dereg_mr);
  
@@ -836,7 +891,7 @@
  static struct ibv_comp_channel *ibv_create_comp_channel_v2(struct ibv_context *context)
  {
  	struct ibv_abi_compat_v2 *t = context->abi_compat;
-@@ -212,6 +452,10 @@
+@@ -212,6 +500,10 @@
  	struct ibv_comp_channel            *channel;
  	struct ibv_create_comp_channel      cmd;
  	struct ibv_create_comp_channel_resp resp;
@@ -847,7 +902,7 @@
  
  	if (abi_ver <= 2)
  		return ibv_create_comp_channel_v2(context);
-@@ -221,7 +465,23 @@
+@@ -221,7 +513,23 @@
  		return NULL;
  
  	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_COMP_CHANNEL, &resp, sizeof resp);
@@ -871,7 +926,7 @@
  		free(channel);
  		return NULL;
  	}
-@@ -228,6 +488,9 @@
+@@ -228,6 +536,9 @@
  
  	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
  
@@ -1092,7 +1147,7 @@
  
  	t = malloc(sizeof *t);
  	if (!t)
-@@ -67,12 +96,36 @@
+@@ -67,12 +96,45 @@
  
  	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
  	cmd->cq_fd_tab = (uintptr_t) &cq_fd;
@@ -1103,8 +1158,17 @@
 +	if (fstat(event_fd, &fstat_buf))
 +		return (errno);
 +	resp->async_fd = minor(fstat_buf.st_rdev);
+ 
++	/*
++	 * Open the underlying kernel hardware driver that will
++	 * provide the mmap function for this context.
++	 */
++	context->mmap_fd = ibv_open_mmap_driver(context->device->dev_name);
++	if (context->mmap_fd < 0) {
++		fprintf(stderr, PFX "ibv_cmd_get_context: Mmap open failed\n");
++	}
 +#endif
- 
++
  	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
 +#if defined(__SVR4) && defined(__sun)
@@ -1129,7 +1193,7 @@
  	context->async_fd         = resp->async_fd;
  	context->num_comp_vectors = 1;
  	t->channel.context        = context;
-@@ -87,19 +140,53 @@
+@@ -87,19 +149,50 @@
  			size_t cmd_size, struct ibv_get_context_resp *resp,
  			size_t resp_size)
  {
@@ -1148,8 +1212,16 @@
 +	if (fstat(event_fd, &fstat_buf))
 +		return (errno);
 +	resp->async_fd = minor(fstat_buf.st_rdev);
+ 
++	/*
++	 * Open the underlying kernel hardware driver that will
++	 * provide the mmap function for this context.
++	 */
++	context->mmap_fd = ibv_open_mmap_driver(context->device->dev_name);
++	if (context->mmap_fd < 0) {
++		fprintf(stderr, PFX "ibv_cmd_get_context: Mmap open failed\n");
++	}
 +#endif
- 
  	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
 +#if defined(__SVR4) && defined(__sun)
@@ -1169,21 +1241,11 @@
 +
  	context->async_fd         = resp->async_fd;
  	context->num_comp_vectors = resp->num_comp_vectors;
- 
-+#if defined(__SVR4) && defined(__sun)
-+	/*
-+	 * Open the underlying kernel hardware driver that will
-+	 * provide the mmap function for this context.
-+	 */
-+	context->mmap_fd = ibv_open_mmap_driver(context->device->dev_name);
-+	if (context->mmap_fd < 0) {
-+		fprintf(stderr, PFX "ibv_cmd_get_context: Mmap open failed\n");
-+	}
-+#endif
+-
  	return 0;
  }
  
-@@ -120,6 +207,7 @@
+@@ -120,6 +213,7 @@
  	memset(device_attr->fw_ver, 0, sizeof device_attr->fw_ver);
  	*raw_fw_ver			       = resp.fw_ver;
  	device_attr->node_guid 		       = resp.node_guid;
@@ -1191,7 +1253,7 @@
  	device_attr->sys_image_guid 	       = resp.sys_image_guid;
  	device_attr->max_mr_size 	       = resp.max_mr_size;
  	device_attr->page_size_cap 	       = resp.page_size_cap;
-@@ -207,6 +295,8 @@
+@@ -207,6 +301,8 @@
  {
  	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_PD, resp, resp_size);
  
@@ -1200,7 +1262,7 @@
  	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
  
-@@ -218,6 +308,47 @@
+@@ -218,6 +314,47 @@
  	return 0;
  }
  
@@ -1248,7 +1310,7 @@
  int ibv_cmd_dealloc_pd(struct ibv_pd *pd)
  {
  	struct ibv_dealloc_pd cmd;
-@@ -224,6 +355,7 @@
+@@ -224,6 +361,7 @@
  
  	IBV_INIT_CMD(&cmd, sizeof cmd, DEALLOC_PD);
  	cmd.pd_handle = pd->handle;
@@ -1256,7 +1318,7 @@
  
  	if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
  		return errno;
-@@ -244,6 +376,7 @@
+@@ -244,6 +382,7 @@
  	cmd->length 	  = length;
  	cmd->hca_va 	  = hca_va;
  	cmd->pd_handle 	  = pd->handle;
@@ -1264,7 +1326,7 @@
  	cmd->access_flags = access;
  
  	if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
-@@ -259,6 +392,35 @@
+@@ -259,6 +398,35 @@
  	return 0;
  }
  
@@ -1300,7 +1362,7 @@
  int ibv_cmd_dereg_mr(struct ibv_mr *mr)
  {
  	struct ibv_dereg_mr cmd;
-@@ -265,6 +427,7 @@
+@@ -265,6 +433,7 @@
  
  	IBV_INIT_CMD(&cmd, sizeof cmd, DEREG_MR);
  	cmd.mr_handle = mr->handle;
@@ -1308,7 +1370,7 @@
  
  	if (write(mr->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
  		return errno;
-@@ -272,6 +435,34 @@
+@@ -272,6 +441,34 @@
  	return 0;
  }
  
@@ -1343,7 +1405,7 @@
  static int ibv_cmd_create_cq_v2(struct ibv_context *context, int cqe,
  				struct ibv_cq *cq,
  				struct ibv_create_cq *new_cmd, size_t new_cmd_size,
-@@ -315,7 +506,19 @@
+@@ -315,7 +512,19 @@
  	cmd->user_handle   = (uintptr_t) cq;
  	cmd->cqe           = cqe;
  	cmd->comp_vector   = comp_vector;
@@ -1363,7 +1425,7 @@
  	cmd->reserved      = 0;
  
  	if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
-@@ -346,6 +549,7 @@
+@@ -346,6 +555,7 @@
  	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, POLL_CQ, resp, rsize);
  	cmd.cq_handle = ibcq->handle;
  	cmd.ne        = ne;
@@ -1371,7 +1433,7 @@
  
  	if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) {
  		ret = -1;
-@@ -384,6 +588,7 @@
+@@ -384,6 +594,7 @@
  	IBV_INIT_CMD(&cmd, sizeof cmd, REQ_NOTIFY_CQ);
  	cmd.cq_handle = ibcq->handle;
  	cmd.solicited = !!solicited_only;
@@ -1379,7 +1441,7 @@
  
  	if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
  		return errno;
-@@ -399,6 +604,7 @@
+@@ -399,6 +610,7 @@
  	IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
  	cmd->cq_handle = cq->handle;
  	cmd->cqe       = cqe;
@@ -1387,7 +1449,7 @@
  
  	if (write(cq->context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
-@@ -434,6 +640,7 @@
+@@ -434,6 +646,7 @@
  	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_CQ, &resp, sizeof resp);
  	cmd.cq_handle = cq->handle;
  	cmd.reserved  = 0;
@@ -1395,7 +1457,7 @@
  
  	if (write(cq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
  		return errno;
-@@ -555,6 +762,7 @@
+@@ -555,6 +768,7 @@
  	cmd->attr_mask	= srq_attr_mask;
  	cmd->max_wr	= srq_attr->max_wr;
  	cmd->srq_limit	= srq_attr->srq_limit;
@@ -1403,7 +1465,7 @@
  
  	if (write(srq->context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
-@@ -569,6 +777,7 @@
+@@ -569,6 +783,7 @@
  
  	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_SRQ, &resp, sizeof resp);
  	cmd->srq_handle = srq->handle;
@@ -1411,7 +1473,7 @@
  	cmd->reserved   = 0;
  
  	if (write(srq->context->cmd_fd, cmd, cmd_size) != cmd_size)
-@@ -606,6 +815,7 @@
+@@ -606,6 +821,7 @@
  
  	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_SRQ, &resp, sizeof resp);
  	cmd.srq_handle = srq->handle;
@@ -1419,7 +1481,7 @@
  	cmd.reserved   = 0;
  
  	if (write(srq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
-@@ -637,7 +847,20 @@
+@@ -637,7 +853,20 @@
  	cmd->max_send_sge    = attr->cap.max_send_sge;
  	cmd->max_recv_sge    = attr->cap.max_recv_sge;
  	cmd->max_inline_data = attr->cap.max_inline_data;
@@ -1440,7 +1502,7 @@
  	cmd->qp_type 	     = attr->qp_type;
  	cmd->is_srq 	     = !!attr->srq;
  	cmd->srq_handle      = attr->qp_type == IBV_QPT_XRC ?
-@@ -691,6 +914,7 @@
+@@ -691,6 +920,7 @@
  	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_QP, &resp, sizeof resp);
  	cmd->qp_handle = qp->handle;
  	cmd->attr_mask = attr_mask;
@@ -1448,7 +1510,7 @@
  
  	if (write(qp->context->cmd_fd, cmd, cmd_size) != cmd_size)
  		return errno;
-@@ -772,6 +996,7 @@
+@@ -772,6 +1002,7 @@
  	IBV_INIT_CMD(cmd, cmd_size, MODIFY_QP);
  
  	cmd->qp_handle 		 = qp->handle;
@@ -1456,7 +1518,85 @@
  	cmd->attr_mask 		 = attr_mask;
  	cmd->qkey 		 = attr->qkey;
  	cmd->rq_psn 		 = attr->rq_psn;
-@@ -1292,6 +1517,7 @@
+@@ -1236,38 +1467,47 @@
+ 	return ret;
+ }
+ 
+-int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
+-		      struct ibv_ah_attr *attr)
++int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
++			 struct ibv_create_ah *cmd, size_t cmd_size,
++			 struct ibv_create_ah_resp *resp, size_t resp_size)
+ {
+-	struct ibv_create_ah      cmd;
+-	struct ibv_create_ah_resp resp;
++	IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
++	cmd->user_handle            = (uintptr_t) ah;
++	cmd->pd_handle              = pd->handle;
++	cmd->reserved               = 0;
++	cmd->attr.dlid              = attr->dlid;
++	cmd->attr.sl                = attr->sl;
++	cmd->attr.src_path_bits     = attr->src_path_bits;
++	cmd->attr.static_rate       = attr->static_rate;
++	cmd->attr.is_global         = attr->is_global;
++	cmd->attr.port_num          = attr->port_num;
++	cmd->attr.grh.flow_label    = attr->grh.flow_label;
++	cmd->attr.grh.sgid_index    = attr->grh.sgid_index;
++	cmd->attr.grh.hop_limit     = attr->grh.hop_limit;
++	cmd->attr.grh.traffic_class = attr->grh.traffic_class;
++	cmd->attr.grh.reserved      = 0;
++	cmd->attr.reserved          = 0;
++	memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
+ 
+-	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
+-	cmd.user_handle            = (uintptr_t) ah;
+-	cmd.pd_handle              = pd->handle;
+-	cmd.attr.dlid              = attr->dlid;
+-	cmd.attr.sl                = attr->sl;
+-	cmd.attr.src_path_bits     = attr->src_path_bits;
+-	cmd.attr.static_rate       = attr->static_rate;
+-	cmd.attr.is_global         = attr->is_global;
+-	cmd.attr.port_num          = attr->port_num;
+-	cmd.attr.grh.flow_label    = attr->grh.flow_label;
+-	cmd.attr.grh.sgid_index    = attr->grh.sgid_index;
+-	cmd.attr.grh.hop_limit     = attr->grh.hop_limit;
+-	cmd.attr.grh.traffic_class = attr->grh.traffic_class;
+-	memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
+-
+-	if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
++	if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
+ 		return errno;
+ 
+-	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
++	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
+ 
+-	ah->handle  = resp.handle;
++	ah->handle  = resp->handle;
+ 	ah->context = pd->context;
+ 
+ 	return 0;
+ }
+ 
++int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
++		      struct ibv_ah_attr *attr)
++{
++	struct ibv_create_ah      cmd;
++	struct ibv_create_ah_resp resp;
++	return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
++}
++
+ int ibv_cmd_destroy_ah(struct ibv_ah *ah)
+ {
+ 	struct ibv_destroy_ah cmd;
+@@ -1274,6 +1514,7 @@
+ 
+ 	IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_AH);
+ 	cmd.ah_handle = ah->handle;
++	cmd.user_handle            = (uintptr_t) ah;
+ 
+ 	if (write(ah->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+ 		return errno;
+@@ -1292,6 +1533,7 @@
  	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
  	cmd.qp_handle = qp->handle;
  	cmd.reserved  = 0;
@@ -1464,7 +1604,7 @@
  
  	if (write(qp->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
  		return errno;
-@@ -1313,6 +1539,7 @@
+@@ -1313,6 +1555,7 @@
  	IBV_INIT_CMD(&cmd, sizeof cmd, ATTACH_MCAST);
  	memcpy(cmd.gid, gid->raw, sizeof cmd.gid);
  	cmd.qp_handle = qp->handle;
@@ -1472,7 +1612,7 @@
  	cmd.mlid      = lid;
  	cmd.reserved  = 0;
  
-@@ -1329,6 +1556,7 @@
+@@ -1329,6 +1572,7 @@
  	IBV_INIT_CMD(&cmd, sizeof cmd, DETACH_MCAST);
  	memcpy(cmd.gid, gid->raw, sizeof cmd.gid);
  	cmd.qp_handle = qp->handle;
@@ -1480,7 +1620,7 @@
  	cmd.mlid      = lid;
  	cmd.reserved  = 0;
  
-@@ -1406,4 +1634,3 @@
+@@ -1406,4 +1650,3 @@
  		return errno;
  	return 0;
  }
@@ -1809,7 +1949,7 @@
  	__u64 sys_image_guid;
  	__u64 max_mr_size;
  	__u64 page_size_cap;
-@@ -235,23 +250,103 @@
+@@ -235,23 +250,89 @@
  	__u8  reserved[2];
  };
  
@@ -1850,24 +1990,10 @@
  	__u64 driver_data[0];
  };
  
-+#if defined(__SVR4) && defined(__sun)
-+/*
-+ * PD responses may pass opaque data to userspace drivers, we choose a value
-+ * larger than what any HCA requires.
-+ */
-+#define SOL_UVERBS_PD_DATA_OUT_SIZE          24
-+typedef __u64 ofuv_pd_drv_data_out_t[SOL_UVERBS_PD_DATA_OUT_SIZE];
-+
  struct ibv_alloc_pd_resp {
-+        __u32 pd_handle;
-+        __u32 reserved;
-+        ofuv_pd_drv_data_out_t drv_out;
-+};
-+#else
-+struct ibv_alloc_pd_resp {
  	__u32 pd_handle;
++	__u32 reserved;
  };
-+#endif
  
 +struct ibv_alloc_shpd {
 +	__u32 command;
@@ -1883,6 +2009,7 @@
 +
 +struct ibv_alloc_shpd_resp {
 +	__u32 shpd_handle;
++	__u32 reserved;
 +};
 +
 +struct ibv_share_pd {
@@ -1900,7 +2027,6 @@
 +struct ibv_share_pd_resp {
 +	__u32 pd_handle;
 +        __u32 reserved;
-+        ofuv_pd_drv_data_out_t drv_out;
 +};
 +
  struct ibv_dealloc_pd {
@@ -1913,7 +2039,7 @@
  };
  
  struct ibv_reg_mr {
-@@ -264,6 +359,7 @@
+@@ -264,6 +345,7 @@
  	__u64 hca_va;
  	__u32 pd_handle;
  	__u32 access_flags;
@@ -1921,7 +2047,15 @@
  	__u64 driver_data[0];
  };
  
-@@ -278,8 +374,19 @@
+@@ -271,6 +353,7 @@
+ 	__u32 mr_handle;
+ 	__u32 lkey;
+ 	__u32 rkey;
++	__u32 reserved;
+ };
+ 
+ struct ibv_dereg_mr {
+@@ -278,8 +361,19 @@
  	__u16 in_words;
  	__u16 out_words;
  	__u32 mr_handle;
@@ -1941,33 +2075,15 @@
  struct ibv_create_comp_channel {
  	__u32 command;
  	__u16 in_words;
-@@ -304,10 +411,25 @@
- 	__u64 driver_data[0];
+@@ -289,6 +383,7 @@
+ 
+ struct ibv_create_comp_channel_resp {
+ 	__u32 fd;
++	__u32 reserved;
  };
  
-+#if defined(__SVR4) && defined(__sun)
-+/*
-+ * CQ responses pass opaque data to userspace drivers, we choose a value
-+ * larger than what any HCA requires.
-+ */
-+#define SOL_UVERBS_CQ_DATA_OUT_SIZE          24
-+typedef __u64 ofuv_cq_drv_data_out_t[SOL_UVERBS_CQ_DATA_OUT_SIZE];
-+
- struct ibv_create_cq_resp {
- 	__u32 cq_handle;
- 	__u32 cqe;
-+	ofuv_cq_drv_data_out_t   drv_out;
- };
-+#else
-+struct ibv_create_cq_resp {
-+	__u32 cq_handle;
-+	__u32 cqe;
-+};
-+#endif
- 
- struct ibv_kern_wc {
- 	__u64  wr_id;
-@@ -334,6 +456,7 @@
+ struct ibv_create_cq {
+@@ -334,6 +429,7 @@
  	__u64 response;
  	__u32 cq_handle;
  	__u32 ne;
@@ -1975,7 +2091,7 @@
  };
  
  struct ibv_poll_cq_resp {
-@@ -348,6 +471,7 @@
+@@ -348,6 +444,7 @@
  	__u16 out_words;
  	__u32 cq_handle;
  	__u32 solicited;
@@ -1983,7 +2099,7 @@
  };
  
  struct ibv_resize_cq {
-@@ -357,6 +481,7 @@
+@@ -357,6 +454,7 @@
  	__u64 response;
  	__u32 cq_handle;
  	__u32 cqe;
@@ -1991,19 +2107,7 @@
  	__u64 driver_data[0];
  };
  
-@@ -363,7 +488,11 @@
- struct ibv_resize_cq_resp {
- 	__u32 cqe;
- 	__u32 reserved;
-+#if defined(__SVR4) && defined(__sun)
-+        ofuv_cq_drv_data_out_t   drv_out;
-+#else
- 	__u64 driver_data[0];
-+#endif
- };
- 
- struct ibv_destroy_cq {
-@@ -373,6 +502,7 @@
+@@ -373,6 +471,7 @@
  	__u64 response;
  	__u32 cq_handle;
  	__u32 reserved;
@@ -2011,43 +2115,7 @@
  };
  
  struct ibv_destroy_cq_resp {
-@@ -460,6 +590,14 @@
- 	__u64 driver_data[0];
- };
- 
-+#if defined(__SVR4) && defined(__sun)
-+/*
-+ * QP responses pass opaque data to userspace drivers, we choose a value
-+ * larger than what any HCA requires.
-+ */
-+#define SOL_UVERBS_QP_DATA_OUT_SIZE          24
-+typedef __u64 ofuv_qp_drv_data_out_t[SOL_UVERBS_QP_DATA_OUT_SIZE];
-+
- struct ibv_create_qp_resp {
- 	__u32 qp_handle;
- 	__u32 qpn;
-@@ -469,7 +607,20 @@
- 	__u32 max_recv_sge;
- 	__u32 max_inline_data;
- 	__u32 reserved;
-+	ofuv_qp_drv_data_out_t drv_out;
- };
-+#else
-+struct ibv_create_qp_resp {
-+	__u32 qp_handle;
-+	__u32 qpn;
-+	__u32 max_send_wr;
-+	__u32 max_recv_wr;
-+	__u32 max_send_sge;
-+	__u32 max_recv_sge;
-+	__u32 max_inline_data;
-+	__u32 reserved;
-+};
-+#endif
- 
- struct ibv_qp_dest {
- 	__u8  dgid[16];
-@@ -493,6 +644,7 @@
+@@ -493,6 +592,7 @@
  	__u64 response;
  	__u32 qp_handle;
  	__u32 attr_mask;
@@ -2055,7 +2123,7 @@
  	__u64 driver_data[0];
  };
  
-@@ -560,6 +712,7 @@
+@@ -560,6 +660,7 @@
  	__u8  alt_port_num;
  	__u8  alt_timeout;
  	__u8  reserved[2];
@@ -2063,7 +2131,7 @@
  	__u64 driver_data[0];
  };
  
-@@ -570,6 +723,7 @@
+@@ -570,10 +671,12 @@
  	__u64 response;
  	__u32 qp_handle;
  	__u32 reserved;
@@ -2071,15 +2139,53 @@
  };
  
  struct ibv_destroy_qp_resp {
-@@ -775,6 +929,7 @@
- 	__u32 qp_handle;
- 	__u16 mlid;
- 	__u16 reserved;
-+	__u64 user_handle;
- 	__u64 driver_data[0];
+ 	__u32 events_reported;
++	__u32 reserved;
+ };
+ 
+ struct ibv_create_xrc_rcv_qp {
+@@ -705,6 +808,7 @@
+ 
+ struct ibv_post_send_resp {
+ 	__u32 bad_wr;
++	__u32 reserved;
+ };
+ 
+ struct ibv_kern_recv_wr {
+@@ -727,6 +831,7 @@
+ 
+ struct ibv_post_recv_resp {
+ 	__u32 bad_wr;
++	__u32 reserved;
  };
  
-@@ -786,6 +941,7 @@
+ struct ibv_post_srq_recv {
+@@ -743,6 +848,7 @@
+ 
+ struct ibv_post_srq_recv_resp {
+ 	__u32 bad_wr;
++	__u32 reserved;
+ };
+ 
+ struct ibv_create_ah {
+@@ -758,6 +864,7 @@
+ 
+ struct ibv_create_ah_resp {
+ 	__u32 handle;
++	__u32 reserved;
+ };
+ 
+ struct ibv_destroy_ah {
+@@ -765,6 +872,8 @@
+ 	__u16 in_words;
+ 	__u16 out_words;
+ 	__u32 ah_handle;
++	__u32 reserved;
++	__u64 user_handle;
+ };
+ 
+ struct ibv_attach_mcast {
+@@ -775,6 +884,7 @@
  	__u32 qp_handle;
  	__u16 mlid;
  	__u16 reserved;
@@ -2087,37 +2193,15 @@
  	__u64 driver_data[0];
  };
  
-@@ -817,12 +973,29 @@
+@@ -786,6 +896,7 @@
+ 	__u32 qp_handle;
+ 	__u16 mlid;
+ 	__u16 reserved;
++	__u64 user_handle;
  	__u64 driver_data[0];
  };
  
-+#if defined(__SVR4) && defined(__sun)
-+/*
-+ * QP responses pass opaque data to userspace drivers, we choose a value
-+ * larger than what any HCA requires.
-+ */
-+#define SOL_UVERBS_SRQ_DATA_OUT_SIZE          24
-+typedef __u64 ofuv_srq_drv_data_out_t[SOL_UVERBS_SRQ_DATA_OUT_SIZE];
-+
- struct ibv_create_srq_resp {
- 	__u32 srq_handle;
- 	__u32 max_wr;
- 	__u32 max_sge;
- 	__u32 reserved;
-+	ofuv_srq_drv_data_out_t drv_out;
- };
-+#else
-+struct ibv_create_srq_resp {
-+	__u32 srq_handle;
-+	__u32 max_wr;
-+	__u32 max_sge;
-+	__u32 reserved;
-+};
-+#endif
- 
- struct ibv_modify_srq {
- 	__u32 command;
-@@ -832,6 +1005,7 @@
+@@ -832,6 +943,7 @@
  	__u32 attr_mask;
  	__u32 max_wr;
  	__u32 srq_limit;
@@ -2125,7 +2209,7 @@
  	__u64 driver_data[0];
  };
  
-@@ -842,6 +1016,7 @@
+@@ -842,6 +954,7 @@
  	__u64 response;
  	__u32 srq_handle;
  	__u32 reserved;
@@ -2133,7 +2217,7 @@
  	__u64 driver_data[0];
  };
  
-@@ -859,6 +1034,7 @@
+@@ -859,10 +972,12 @@
  	__u64 response;
  	__u32 srq_handle;
  	__u32 reserved;
@@ -2141,7 +2225,20 @@
  };
  
  struct ibv_destroy_srq_resp {
-@@ -946,6 +1122,14 @@
+ 	__u32 events_reported;
++	__u32 reserved;
+ };
+ 
+ struct ibv_open_xrc_domain {
+@@ -877,6 +992,7 @@
+ 
+ struct ibv_open_xrc_domain_resp {
+ 	__u32 xrcd_handle;
++	__u32 reserved;
+ };
+ 
+ struct ibv_close_xrc_domain {
+@@ -946,6 +1062,14 @@
  	IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP_V2 = -1,
  	IB_USER_VERBS_CMD_REG_XRC_RCV_QP_V2 = -1,
  	IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP_V2 = -1,
@@ -2190,7 +2287,18 @@
  int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
  		      struct ibv_comp_channel *channel,
  		      int comp_vector, struct ibv_cq *cq,
-@@ -164,8 +180,8 @@
+@@ -133,6 +149,10 @@
+ 			  struct ibv_recv_wr **bad_wr);
+ int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
+ 		      struct ibv_ah_attr *attr);
++int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
++			struct ibv_ah_attr *attr,
++			struct ibv_create_ah *cmd, size_t cmd_size,
++			struct ibv_create_ah_resp *resp, size_t resp_size);
+ int ibv_cmd_destroy_ah(struct ibv_ah *ah);
+ int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
+ int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
+@@ -164,8 +184,8 @@
  int ibv_read_sysfs_file(const char *dir, const char *file,
  			char *buf, size_t size);
  
@@ -2275,7 +2383,45 @@
  enum ibv_rereg_mr_flags {
  	IBV_REREG_MR_CHANGE_TRANSLATION	= (1 << 0),
  	IBV_REREG_MR_CHANGE_PD		= (1 << 1),
-@@ -425,6 +448,14 @@
+@@ -360,7 +383,15 @@
+ 	IBV_RATE_40_GBPS  = 7,
+ 	IBV_RATE_60_GBPS  = 8,
+ 	IBV_RATE_80_GBPS  = 9,
+-	IBV_RATE_120_GBPS = 10
++	IBV_RATE_120_GBPS = 10,
++	IBV_RATE_14_GBPS  = 11,
++	IBV_RATE_56_GBPS  = 12,
++	IBV_RATE_112_GBPS = 13,
++	IBV_RATE_168_GBPS = 14,
++	IBV_RATE_25_GBPS  = 15,
++	IBV_RATE_100_GBPS = 16,
++	IBV_RATE_200_GBPS = 17,
++	IBV_RATE_300_GBPS = 18
+ };
+ 
+ /**
+@@ -377,6 +408,20 @@
+  */
+ enum ibv_rate mult_to_ibv_rate(int mult) __attribute_const;
+ 
++/**
++ * ibv_rate_to_mbps - Convert the IB rate enum to Mbit/sec.
++ * For example, IBV_RATE_5_GBPS will return the value 5000.
++ * @rate: rate to convert.
++ */
++int ibv_rate_to_mbps(enum ibv_rate rate) __attribute_const;
++
++/**
++ * mbps_to_ibv_rate - Convert a Mbit/sec value to an IB rate enum.
++ * @mbps: value to convert.
++ */
++enum ibv_rate mbps_to_ibv_rate(int mbps) __attribute_const;
++
++
+ struct ibv_ah_attr {
+ 	struct ibv_global_route	grh;
+ 	uint16_t		dlid;
+@@ -425,6 +470,14 @@
  	uint32_t		max_inline_data;
  };
  
@@ -2290,7 +2436,7 @@
  struct ibv_qp_init_attr {
  	void		       *qp_context;
  	struct ibv_cq	       *send_cq;
-@@ -659,6 +690,7 @@
+@@ -659,6 +712,7 @@
  	char			dev_path[IBV_SYSFS_PATH_MAX];
  	/* Path to infiniband class device in sysfs */
  	char			ibdev_path[IBV_SYSFS_PATH_MAX];
@@ -2298,7 +2444,7 @@
  };
  
  struct ibv_more_ops {
-@@ -743,6 +775,12 @@
+@@ -743,6 +797,12 @@
  	int			(*detach_mcast)(struct ibv_qp *qp, const union ibv_gid *gid,
  						uint16_t lid);
  	void			(*async_event)(struct ibv_async_event *event);
@@ -2311,7 +2457,7 @@
  };
  
  struct ibv_context {
-@@ -749,6 +787,13 @@
+@@ -749,6 +809,13 @@
  	struct ibv_device      *device;
  	struct ibv_context_ops	ops;
  	int			cmd_fd;
@@ -2325,7 +2471,7 @@
  	int			async_fd;
  	int			num_comp_vectors;
  	pthread_mutex_t		mutex;
-@@ -797,6 +842,11 @@
+@@ -797,6 +864,11 @@
  uint64_t ibv_get_device_guid(struct ibv_device *device);
  
  /**
@@ -2337,7 +2483,7 @@
   * ibv_open_device - Initialize device for use
   */
  struct ibv_context *ibv_open_device(struct ibv_device *device);
-@@ -853,11 +903,44 @@
+@@ -853,11 +925,44 @@
  		   int index, uint16_t *pkey);
  
  /**
@@ -2382,7 +2528,7 @@
   * ibv_dealloc_pd - Free a protection domain
   */
  int ibv_dealloc_pd(struct ibv_pd *pd);
-@@ -869,11 +952,27 @@
+@@ -869,11 +974,27 @@
  			  size_t length, int access);
  
  /**
@@ -3123,3 +3269,13 @@
  
  #include <infiniband/verbs.h>
  #include <infiniband/driver.h>
+@@ -140,6 +142,9 @@
+ 	case 1:  return "2.5 Gbps";
+ 	case 2:  return "5.0 Gbps";
+ 	case 4:  return "10.0 Gbps";
++	case 8:  return "10.0 Gbps";
++	case 16: return "14.0 Gbps";
++	case 32: return "25.0 Gbps";
+ 	default: return "invalid speed";
+ 	}
+ }
--- a/components/open-fabrics/libibverbs/solaris_compatibility.c	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libibverbs/solaris_compatibility.c	Thu Oct 22 08:27:04 2015 -0700
@@ -47,12 +47,8 @@
 #include <stdlib.h>
 #include <strings.h>
 #include <sys/param.h>
-#include <sys/ib/adapters/hermon/hermon_ioctl.h>
-#include <sys/ib/adapters/tavor/tavor_ioctl.h>
 #include <sys/ib/clients/of/sol_uverbs/sol_uverbs_ioctl.h>
 #include <sys/ib/clients/of/sol_umad/sol_umad_ioctl.h>
-#include <sys/ib/adapters/MELLANOX.h>
-
 #include <alloca.h>
 #include "../include/infiniband/arch.h"
 #include "../include/infiniband/verbs.h"
@@ -64,58 +60,23 @@
 
 #define	min(a, b)	((a) < (b) ? (a) : (b))
 
-
-/*
- * The followings will be removed when changes in hermon_ioctl.h
- * are delivered through ON.
- */
-#ifndef	HERMON_GET_HWINFO_IOCTL_SUP
-#define	HERMON_IOCTL_GET_HWINFO	(('t' << 8) | 0x32)
-#pragma	pack(1)
-
-/* Structure used for getting HW info */
-typedef struct hermon_hw_info_ioctl_s {
-	uint32_t	af_hw_info_version;
-	uint32_t	af_padding1;	/* Padding for af_hwpn to be on */
-					/* 64 byte boundary */
-	char		af_hwpn[64];
-	uint16_t	af_pn_len;
-	uint64_t	af_padding2:48;	/* Padding for af_psid to be on */
-					/* 64 byte boundary */
-	char		af_psid[16];
-	uint16_t	af_psid_len;
-	uint32_t	af_padding3;	/* Padding for reserved to be on */
-					/* 64 byte boundary */
-	uint8_t		reserved[64];
-} hermon_hw_info_ioctl_t;
-#pragma	pack()
-#endif
-
-
 /*
  * duplicate ABI definitions for HCAs as the HCA abi headers are not
  * installed in proto.
  */
-#define	MLX4_UVERBS_MAX_ABI_VERSION	3 /* mlx4-abi.h */
 #define	RDMA_USER_CM_MIN_ABI_VERSION	3 /* rdma_cma_abi.h */
 #define	RDMA_USER_CM_MAX_ABI_VERSION	4 /* rdma_cma_abi.h */
 
-#define	MLX4	0
+/*
+ * Some useful definitions.
+ */
 #define	HW_DRIVER_MAX_NAME_LEN			20
 #define	UVERBS_KERNEL_SYSFS_NAME_BASE		"uverbs"
 #define	UMAD_KERNEL_SYSFS_NAME_BASE		"umad"
 #define	IB_HCA_DEVPATH_PREFIX			"/dev/infiniband/hca"
 #define	IB_OFS_DEVPATH_PREFIX			"/dev/infiniband/ofs"
-#define	CONNECTX_NAME				"mlx4_"
-
-#define	MELLANOX_VENDOR_ID			0x15b3
-#define	PCI_DEVICE_ID_MELLANOX_HERMON_SDR	0x6340
-#define	PCI_DEVICE_ID_MELLANOX_HERMON_DDR	0x634a
-#define	PCI_DEVICE_ID_MELLANOX_HERMON_QDR	0x6354
-#define	PCI_DEVICE_ID_MELLANOX_HERMON_DDR_PCIE2	0x6732
-#define	PCI_DEVICE_ID_MELLANOX_HERMON_QDR_PCIE2	0x673c
-#define	INFINIHOST_DEVICE_ID_2			0x5a45
-#define	INFINIHOST_DEVICE_ID_4			0x6279
+#define	IB_HCA_DEVPATH_SZ			64
+#define	MAX_OFS_DEVPATH_LEN			64
 
 #define	MAX_HCAS				(64*16)
 #define	MAX_PORTS				(MAX_HCAS*2)
@@ -133,6 +94,71 @@
 static int sol_uverbs_minor_dev = -1;
 
 /*
+ * Ugly, evil and rest of the names that qualify for it.
+ * This is a side definition for the uverbs hca_info till the
+ * new header file can appear in the userland build environment once that
+ * happens this code will go.
+ */
+#if	(IB_USER_VERBS_SOLARIS_ABI_VERSION == 2)
+#undef	IB_USER_VERBS_SOLARIS_ABI_VERSION
+#define	IB_USER_VERBS_SOLARIS_ABI_VERSION	3
+#define	__VERBS_COMPAT_MODE	1
+
+/*
+ * Some useful definitions.
+ */
+#define	PSID_STR_SZ		40
+#define	IBDEV_NAME_SZ		64
+#define	HCA_DRIVER_NAME_SZ	40
+#define	DEVID_STR_SZ		40
+
+/*
+ * These are duplicate definitions to help the build complete on userland
+ * build machines till the header files are populated with the new versions.
+ * Once the new header file is available in the build system this code will
+ * be removed.
+ */
+typedef struct sol_uverbs_hca_infov3_s {
+	char		uverbs_hca_psid_string[PSID_STR_SZ];
+	char		uverbs_hca_ibdev_name[IBDEV_NAME_SZ];
+	char		uverbs_hca_driver_name[HCA_DRIVER_NAME_SZ];
+	uint32_t	uverbs_hca_driver_instance;
+	uint32_t	uverbs_hca_vendorid;
+	uint16_t	uverbs_hca_deviceid;
+	uint16_t	uverbs_hca_devidx;
+	int32_t		uverbs_hca_abi_version;
+	uint64_t	uverbs_hca_fw_ver;
+	uint64_t	uverbs_hca_node_guid;
+	uint64_t	uverbs_hca_node_external_guid;
+	uint64_t	uverbs_hca_sys_image_guid;
+	uint32_t	uverbs_hca_hw_version;
+	uint8_t		uverbs_hca_pad1[4];
+	char		uverbs_hca_devid_string[DEVID_STR_SZ];
+} sol_uverbs_hca_infov3_t;
+
+typedef struct sol_uverbs_info_v3_s {
+	int32_t			uverbs_abi_version;
+	int32_t			uverbs_solaris_abi_version;
+	int16_t			uverbs_hca_cnt;
+	int8_t			uverbs_pad1[6]; /* Padding for alignment */
+	sol_uverbs_hca_infov3_t uverbs_hca_info[];
+} sol_uverbs_infov3_t;
+
+#define	SIZEOF_UVERBS_INFO	(sizeof (sol_uverbs_infov3_t))
+#define	SIZEOF_HCA_INFO		(sizeof (sol_uverbs_hca_infov3_t))
+#define	UVERBS_INFO(x)		((sol_uverbs_infov3_t *)x)
+#define	HCA_INFO(x)		((sol_uverbs_hca_infov3_t *)x)
+
+#else /* (IB_USER_VERBS_SOLARIS_ABI_VERSION == 3) */
+
+#define	SIZEOF_UVERBS_INFO	(sizeof (sol_uverbs_info_t))
+#define	SIZEOF_HCA_INFO		(sizeof (sol_uverbs_hca_info_t))
+#define	UVERBS_INFO(x)		((sol_uverbs_info_t *)x)
+#define	HCA_INFO(x)		((sol_uverbs_hca_info_t *)x)
+
+#endif /* END */
+
+/*
  * check_path() prefixs
  */
 typedef enum cp_prefix_e {
@@ -141,17 +167,16 @@
 	CP_D			= 3,
 	CP_GIDS			= 4,
 	CP_PKEYS		= 5,
-	CP_MLX4			= 6,
-	CP_PORTS		= 7,
-	CP_UMAD			= 8,
-	CP_SLASH		= 9,
-	CP_SYS			= 10,
-	CP_CLASS		= 11,
-	CP_INFINIBAND_VERBS	= 12,
-	CP_INFINIBAND		= 13,
-	CP_INFINIBAND_MAD	= 14,
-	CP_MISC			= 15,
-	CP_RDMA_CM		= 16
+	CP_PORTS		= 6,
+	CP_UMAD			= 7,
+	CP_SLASH		= 8,
+	CP_SYS			= 9,
+	CP_CLASS		= 10,
+	CP_INFINIBAND_VERBS	= 11,
+	CP_INFINIBAND		= 12,
+	CP_INFINIBAND_MAD	= 13,
+	CP_MISC			= 14,
+	CP_RDMA_CM		= 15
 } cp_prefix_t;
 
 /*
@@ -159,30 +184,23 @@
  * work. This will speed up the sysfs emulation.
  */
 typedef struct ibdev_cache_info_s {
-	uint_t		ibd_valid;
-	uint_t		ibd_hw_rev;
-	char		ibd_node_guid_str[20];
-	char		ibd_node_guid_external_str[20];
-	char		ibd_sys_image_guid[20];
-	char		ibd_fw_ver[16];
-	char		ibd_name[16];
-	int		ibd_boardid_index;
-	uint_t		ibd_device_id;
+	boolean_t			ibd_valid;
+	uint_t				ibd_hw_rev;
+	uint_t				ibd_abi_version;
+	uint_t				ibd_vendor_id;
+	uint_t				ibd_device_id;
+	char				ibd_hca_path[IB_HCA_DEVPATH_SZ];
+	char				ibd_node_guid_str[20];
+	char				ibd_node_guid_external_str[20];
+	char				ibd_sys_image_guid[20];
+	char				ibd_fw_ver[16];
+	char				ibd_name[IBDEV_NAME_SZ];
+	char				ibd_boardid_string[PSID_STR_SZ];
+	char				ibd_devid_string[DEVID_STR_SZ];
 } ibdev_cache_info_t;
 
-/* hermon - hence 2 */
-static ibdev_cache_info_t ibdev_cache[2][MAX_HCAS];
-
-typedef struct uverbs_cache_info_s {
-	uint_t		uvc_valid;
-	uint_t		uvc_ibdev_abi_version;
-	uint_t		uvc_vendor_id;
-	uint_t		uvc_device_id;
-	int		uvc_hca_instance;
-	char		uvc_ibdev_name[16];
-	char		uvc_ibdev_hca_path[MAXPATHLEN];
-} uverbs_cache_info_t;
-static uverbs_cache_info_t	uverbs_dev_cache[MAX_HCAS];
+/* IB device info cache */
+static ibdev_cache_info_t	ibdev_cache[MAX_HCAS];
 static int			uverbs_abi_version = -1;
 
 typedef struct umad_cache_info_s {
@@ -195,15 +213,11 @@
 
 pthread_once_t		oneTimeInit = PTHREAD_ONCE_INIT;
 static int 		umad_cache_cnt = 0;
-static int 		ibdev_cache_cnt = 0;
-static int 		uverbs_cache_cnt = 0;
 static boolean_t	initialized = B_FALSE;
 static boolean_t	umad_cache_initialized = B_FALSE;
 static boolean_t	ibdev_cache_initialized = B_FALSE;
-static boolean_t	uverbs_cache_initialized = B_FALSE;
 static pthread_mutex_t	umad_cache_mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_mutex_t	ibdev_cache_mutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t	uverbs_cache_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 int sol_ibv_query_gid(struct ibv_context *, uint8_t, int, union ibv_gid *);
 int sol_ibv_query_pkey(struct ibv_context *, uint8_t, int, uint16_t *);
@@ -215,7 +229,6 @@
 
 int sol_ibv_query_port(struct ibv_context *, uint8_t, struct ibv_port_attr *);
 
-
 void
 solaris_init(void)
 {
@@ -234,6 +247,218 @@
 	(void) kstat_close(kc);
 }
 
+#define	isdigit(c)	((c) >= '0' && (c) <= '9')
+
+/*
+ * Given a device name of the form <driver-prefix><instance>,
+ * get the device number. Device name is of the form
+ * for example:- mlx4_0, mlx4_2 etc. Function will return the device instance
+ * extracted from the name.
+ * for example:- mlx4_0 will return 0 and mlx4_2 will return 2.
+ */
+static int
+get_device_num(const char *device_name)
+{
+	const char *temp;
+	const char *end;
+	const char *start = device_name;
+	int len;
+	int devnum;
+
+	if (!start)
+		return (-1);
+
+	len = strlen(device_name);
+	end = &device_name[len - 1];
+
+	for (temp = end; temp >= start && isdigit(*temp); temp--)
+		/* Null body */;
+
+	/*
+	 * Check if the device number is invalid.
+	 */
+	if (temp == end || temp < start)
+		return (-1);
+
+	devnum = atoi(temp + 1);
+	if (devnum < 0 || devnum >= MAX_HCAS)
+		return (-1);
+
+	return (devnum);
+}
+
+/*
+ * For usages where ibdev cache needs to be read based on the IB device
+ * name instead of uverbs device name a simple compare against the cache
+ * entries is used to retrieve the corresponding ibdev cache entry.
+ */
+static ibdev_cache_info_t *
+ibdev_cache_read_by_devname(const char *devname)
+{
+	int idx;
+	ibdev_cache_info_t *cache = NULL;
+
+	if (!devname)
+		return (NULL);
+
+	for (idx = 0; idx < MAX_HCAS; idx++) {
+		cache = &ibdev_cache[idx];
+		if (strcmp(cache->ibd_name, devname) == 0)
+			break;
+	}
+
+	/*
+	 * If we failed to find an entry return NULL.
+	 */
+	if (idx == MAX_HCAS)
+		cache = NULL;
+
+	return (cache);
+}
+
+/*
+ * Helper function to update the ibdev cache entries with the values obtained
+ * from the uverbs HCA info ioctl.
+ */
+static int
+ibdev_cache_init()
+{
+	ibdev_cache_info_t		*info;
+	int				fd, i, hca_cnt;
+	char				uverbs_devpath[MAX_OFS_DEVPATH_LEN];
+#ifdef	__VERBS_COMPAT_MODE
+	sol_uverbs_infov3_t		*uverbs_infop;
+	sol_uverbs_hca_infov3_t		*hca_infop;
+#else
+	sol_uverbs_info_t		*uverbs_infop;
+	sol_uverbs_hca_info_t		*hca_infop;
+#endif /* END __VERBS_COMPAT_MODE */
+	char 				*buf;
+	size_t				bufsize;
+	uint16_t			major, minor, sub_minor;
+	uint64_t			raw_fw_ver;
+	uint64_t			guid;
+
+	snprintf(uverbs_devpath, MAX_OFS_DEVPATH_LEN, "%s/%s%d",
+	    IB_OFS_DEVPATH_PREFIX, UVERBS_KERNEL_SYSFS_NAME_BASE,
+	    sol_uverbs_minor_dev);
+
+	/*
+	 * using the first sol_uverbs minor node that can be opened to get
+	 * all the HCA information
+	 */
+	if ((fd = open(uverbs_devpath, O_RDWR)) < 0) {
+		fprintf(stderr, "sol_uverbs failed to open: %s\n",
+		    strerror(errno));
+		return (-1);
+	}
+
+	bufsize = SIZEOF_UVERBS_INFO + (MAX_HCAS * SIZEOF_HCA_INFO);
+	buf = malloc(bufsize);
+	if (!buf) {
+		fprintf(stderr, "ibdev_cache_update() failed to alloc\n");
+		close(fd);
+		return (-1);
+	}
+	memset(buf, 0, bufsize);
+
+	uverbs_infop = UVERBS_INFO(buf);
+	uverbs_infop->uverbs_hca_cnt = MAX_HCAS;
+
+	if (ioctl(fd, UVERBS_IOCTL_GET_HCA_INFO, uverbs_infop) != 0) {
+		fprintf(stderr, "sol_uverbs ioctl failed: %s\n",
+		    strerror(errno));
+
+		goto error_exit1;
+	}
+
+	if (uverbs_infop->uverbs_solaris_abi_version !=
+	    IB_USER_VERBS_SOLARIS_ABI_VERSION) {
+		fprintf(stderr, "sol_uverbs solaris_abi_version !="
+		    "IB_USER_VERBS_SOLARIS_ABI_VERSION : %d\n",
+		    uverbs_infop->uverbs_solaris_abi_version);
+		goto error_exit1;
+	}
+
+	hca_cnt = uverbs_infop->uverbs_hca_cnt;	/* hca count returned */
+	hca_infop = uverbs_infop->uverbs_hca_info;
+
+	if (hca_cnt > MAX_HCAS) {
+		fprintf(stderr, "Number of HCAs returned exceeds max\n");
+		goto error_exit1;
+	}
+
+	if (uverbs_abi_version == -1)
+		uverbs_abi_version = uverbs_infop->uverbs_abi_version;
+
+	for (i = 0; i < hca_cnt; i++, hca_infop++) {
+
+		/*
+		 * Update the cache.
+		 */
+		info = &ibdev_cache[hca_infop->uverbs_hca_devidx];
+
+		(void) strncpy(info->ibd_name,
+		    hca_infop->uverbs_hca_ibdev_name, IBDEV_NAME_SZ);
+
+		guid = hca_infop->uverbs_hca_node_guid;
+		sprintf(info->ibd_node_guid_str, "%04x:%04x:%04x:%04x",
+		    (unsigned)(guid >> 48) & 0xffff,
+		    (unsigned)(guid >> 32) & 0xffff,
+		    (unsigned)(guid >> 16) & 0xffff,
+		    (unsigned)(guid >>  0) & 0xffff);
+
+		guid = hca_infop->uverbs_hca_node_external_guid;
+		sprintf(info->ibd_node_guid_external_str, "%04x:%04x:%04x:%04x",
+		    (unsigned)(guid >> 48) & 0xffff,
+		    (unsigned)(guid >> 32) & 0xffff,
+		    (unsigned)(guid >> 16) & 0xffff,
+		    (unsigned)(guid >>  0) & 0xffff);
+
+		guid = hca_infop->uverbs_hca_sys_image_guid;
+		sprintf(info->ibd_sys_image_guid, "%04x:%04x:%04x:%04x",
+		    (unsigned)(guid >> 48) & 0xffff,
+		    (unsigned)(guid >> 32) & 0xffff,
+		    (unsigned)(guid >> 16) & 0xffff,
+		    (unsigned)(guid >>  0) & 0xffff);
+
+		raw_fw_ver = hca_infop->uverbs_hca_fw_ver;
+		major	   = (raw_fw_ver >> 32) & 0xffff;
+		minor	   = (raw_fw_ver >> 16) & 0xffff;
+		sub_minor  = raw_fw_ver & 0xffff;
+
+		snprintf(info->ibd_fw_ver, sizeof (info->ibd_fw_ver),
+		    "%d.%d.%03d", major, minor, sub_minor);
+
+		info->ibd_hw_rev	= hca_infop->uverbs_hca_hw_version;
+		info->ibd_vendor_id	= hca_infop->uverbs_hca_vendorid;
+		info->ibd_device_id	= hca_infop->uverbs_hca_deviceid;
+		info->ibd_abi_version	= hca_infop->uverbs_hca_abi_version;
+
+		snprintf(info->ibd_hca_path, sizeof (info->ibd_hca_path),
+		    "%s/%s%d", IB_HCA_DEVPATH_PREFIX,
+		    hca_infop->uverbs_hca_driver_name,
+		    hca_infop->uverbs_hca_driver_instance);
+
+		strncpy(info->ibd_boardid_string,
+		    hca_infop->uverbs_hca_psid_string, PSID_STR_SZ);
+
+		strncpy(info->ibd_devid_string,
+		    hca_infop->uverbs_hca_devid_string, DEVID_STR_SZ);
+
+		info->ibd_valid = B_TRUE;
+	}
+
+	free(buf);
+	close(fd);
+	return (0);
+
+error_exit1:
+	free(buf);
+	close(fd);
+	return (-1);
+}
+
 static int
 umad_cache_add(uint_t dev_num, int port, char *ibdev)
 {
@@ -250,228 +475,17 @@
 }
 
 static int
-ibdev_cache_add(uint_t dev_num, ibdev_cache_info_t *info_p)
-{
-	if ((dev_num >= MAX_HCAS) || (ibdev_cache_cnt >= (MAX_HCAS * 2))) {
-		fprintf(stderr, "dev %d: exceeds hca cache size\n", dev_num);
-		return (1);
-	}
-
-	if (!(strncmp(info_p->ibd_name, "mlx4", 4))) {
-		memcpy(&(ibdev_cache[MLX4][dev_num]), info_p,
-		    sizeof (ibdev_cache_info_t));
-		ibdev_cache[MLX4][dev_num].ibd_valid = 1;
-	} else {
-		fprintf(stderr, "dev %d: has no proper ibdev name\n", dev_num);
-		return (1);
-	}
-
-	ibdev_cache_cnt++;
-	return (0);
-}
-
-static int
-uverbs_cache_add(uint_t dev_num, uverbs_cache_info_t *info_p)
-{
-	if ((dev_num >= MAX_HCAS) || (uverbs_cache_cnt >= MAX_HCAS)) {
-		fprintf(stderr, "dev %d: exceeds uverbs cache size\n", dev_num);
-		return (1);
-	}
-
-	memcpy(&(uverbs_dev_cache[dev_num]), info_p,
-	    sizeof (uverbs_cache_info_t));
-
-	uverbs_dev_cache[dev_num].uvc_valid = 1;
-	uverbs_cache_cnt++;
-	return (0);
-}
-
-static int
-ibdev_cache_init()
-{
-	ibdev_cache_info_t	info;
-	struct ibv_device	**root_dev_list, **dev_list = NULL;
-	struct ibv_device_attr	device_attr;
-	int			i, num_dev, dev_num, ret = 1;
-	uint64_t		guid;
-	const char		*p, *ibdev;
-
-
-	root_dev_list = dev_list = ibv_get_device_list(&num_dev);
-	if (!dev_list) {
-		fprintf(stderr, "No HCA devices found");
-		goto error_exit1;
-	}
-
-	for (i = 0; i < num_dev; i++, dev_list++) {
-
-		if (sol_ibv_query_device(*dev_list, &device_attr)) {
-			fprintf(stderr, "failed to query device %p\n",
-			    *dev_list);
-			goto error_exit2;
-		}
-
-		guid = ntohll(device_attr.node_guid);
-		sprintf(info.ibd_node_guid_str, "%04x:%04x:%04x:%04x",
-		    (unsigned)(guid >> 48) & 0xffff,
-		    (unsigned)(guid >> 32) & 0xffff,
-		    (unsigned)(guid >> 16) & 0xffff,
-		    (unsigned)(guid >>  0) & 0xffff);
-
-		guid = ntohll(device_attr.node_guid_external);
-		sprintf(info.ibd_node_guid_external_str, "%04x:%04x:%04x:%04x",
-		    (unsigned)(guid >> 48) & 0xffff,
-		    (unsigned)(guid >> 32) & 0xffff,
-		    (unsigned)(guid >> 16) & 0xffff,
-		    (unsigned)(guid >>  0) & 0xffff);
-
-		guid = ntohll(device_attr.sys_image_guid);
-		sprintf(info.ibd_sys_image_guid, "%04x:%04x:%04x:%04x",
-		    (unsigned)(guid >> 48) & 0xffff,
-		    (unsigned)(guid >> 32) & 0xffff,
-		    (unsigned)(guid >> 16) & 0xffff,
-		    (unsigned)(guid >>  0) & 0xffff);
-
-		(void) strcpy(info.ibd_fw_ver, device_attr.fw_ver);
-		info.ibd_hw_rev = device_attr.hw_ver;
-		info.ibd_device_id = device_attr.vendor_part_id;
-
-		ibdev = ibv_get_device_name(*dev_list);
-		if (strncmp(ibdev, "mlx4_", 5) == 0) {
-			p = ibdev + (strlen("mlx4_"));
-		} else {
-			fprintf(stderr, "Invalid device %s\n", ibdev);
-			goto error_exit2;
-		}
-		dev_num = atoi(p);
-		(void) strcpy(info.ibd_name, ibdev);
-
-		info.ibd_boardid_index = -1;
-
-		if (ibdev_cache_add(dev_num, &info)) {
-			fprintf(stderr, "failed to add dev %d to ibdev cache\n",
-			    dev_num);
-			goto error_exit2;
-		}
-	}
-
-	ret = 0;
-
-	/* clean up and Return */
-error_exit2:
-	if (root_dev_list)
-		ibv_free_device_list(root_dev_list);
-error_exit1:
-	return (ret);
-}
-
-static int
-uverbs_cache_init()
-{
-	uverbs_cache_info_t	info;
-	int			dev_num, fd, i, bufsize, hca_cnt;
-	char			uverbs_devpath[MAXPATHLEN];
-	sol_uverbs_info_t	*uverbs_infop;
-	sol_uverbs_hca_info_t	*hca_infop;
-	char *buf;
-
-	snprintf(uverbs_devpath, MAXPATHLEN, "%s/%s%d",
-	    IB_OFS_DEVPATH_PREFIX, UVERBS_KERNEL_SYSFS_NAME_BASE,
-	    sol_uverbs_minor_dev);
-
-	/*
-	 * using the first sol_uverbs minor node that can be opened to get
-	 * all the HCA information
-	 */
-	if ((fd = open(uverbs_devpath, O_RDWR)) < 0) {
-		fprintf(stderr, "sol_uverbs failed to open: %s\n",
-		    strerror(errno));
-		goto error_exit1;
-	}
-
-	bufsize = sizeof (sol_uverbs_info_t) + sizeof (sol_uverbs_hca_info_t) *
-	    MAX_HCAS;
-	buf = malloc(bufsize);
-	memset(buf, 0, bufsize);
-	uverbs_infop = (sol_uverbs_info_t *)buf;
-	uverbs_infop->uverbs_hca_cnt = MAX_HCAS;
-
-	if (ioctl(fd, UVERBS_IOCTL_GET_HCA_INFO, uverbs_infop) != 0) {
-		fprintf(stderr, "sol_uverbs ioctl failed: %s\n",
-		    strerror(errno));
-
-		goto error_exit2;
-	}
-
-	if (uverbs_infop->uverbs_solaris_abi_version !=
-	    IB_USER_VERBS_SOLARIS_ABI_VERSION) {
-		fprintf(stderr, "sol_uverbs solaris_abi_version !="
-		    "IB_USER_VERBS_SOLARIS_ABI_VERSION : %d\n",
-		    uverbs_infop->uverbs_solaris_abi_version);
-		goto error_exit2;
-	}
-
-	hca_cnt = uverbs_infop->uverbs_hca_cnt;	/* hca count returned */
-	hca_infop = uverbs_infop->uverbs_hca_info;
-
-	if (uverbs_abi_version == -1)
-		uverbs_abi_version = uverbs_infop->uverbs_abi_version;
-
-	for (i = 0; i < hca_cnt; i++, hca_infop++) {
-		info.uvc_vendor_id = hca_infop->uverbs_hca_vendorid;
-		info.uvc_device_id = hca_infop->uverbs_hca_deviceid;
-		info.uvc_hca_instance =
-		    hca_infop->uverbs_hca_driver_instance;
-
-		snprintf(info.uvc_ibdev_hca_path,
-		    sizeof (info.uvc_ibdev_hca_path),
-		    "%s/%s%d", IB_HCA_DEVPATH_PREFIX,
-		    hca_infop->uverbs_hca_driver_name,
-		    hca_infop->uverbs_hca_driver_instance);
-
-		if (strncmp(hca_infop->uverbs_hca_ibdev_name, "mlx4_", 5) == 0)
-			info.uvc_ibdev_abi_version =
-			    MLX4_UVERBS_MAX_ABI_VERSION;
-		else {
-			fprintf(stderr, "libibverbs: sol_uverbs unsupported "
-			    "device: %s\n", hca_infop->uverbs_hca_ibdev_name);
-			goto error_exit2;
-		}
-
-		strcpy(info.uvc_ibdev_name, hca_infop->uverbs_hca_ibdev_name);
-
-		dev_num = hca_infop->uverbs_hca_devidx;
-		if (uverbs_cache_add(dev_num, &info)) {
-			fprintf(stderr, "failed to add dev %d to uverbs "
-			    "cache\n", dev_num);
-			goto error_exit2;
-		}
-	}
-
-	free(buf);
-	close(fd);
-	return (1);
-
-error_exit2:
-	free(buf);
-	close(fd);
-
-error_exit1:
-	return (0);
-}
-
-static int
 umad_cache_init()
 {
 	int				i, fd, minor;
 	int				save_errno = 0;
 	int				port_cnt, bufsize;
-	char				umad_devpath[MAXPATHLEN], *buf;
+	char				umad_devpath[MAX_OFS_DEVPATH_LEN], *buf;
 	sol_umad_ioctl_info_t		*umad_infop;
 	sol_umad_ioctl_port_info_t	*port_infop;
 
 	for (minor = 0; minor < MAX_PORTS; minor++) {
-		snprintf(umad_devpath, MAXPATHLEN, "%s/%s%d",
+		snprintf(umad_devpath, MAX_OFS_DEVPATH_LEN, "%s/%s%d",
 		    IB_OFS_DEVPATH_PREFIX, UMAD_KERNEL_SYSFS_NAME_BASE,
 		    minor);
 
@@ -487,7 +501,7 @@
 			save_errno = errno;
 		fprintf(stderr, "failed to open sol_umad: %s\n",
 		    strerror(save_errno));
-		return (0);
+		return (-1);
 	}
 
 	bufsize = sizeof (sol_umad_ioctl_info_t) +
@@ -534,26 +548,26 @@
 
 	free(buf);
 	close(fd);
-	return (1);
+	return (0);
 
 error_exit:
 	free(buf);
 	close(fd);
-	return (0);
+	return (-1);
 }
 
 void
 initialize(void)
 {
 	int		fd, minor;
-	char		uverbs_devpath[MAXPATHLEN];
+	char		uverbs_devpath[MAX_OFS_DEVPATH_LEN];
 
 	/*
 	 * find the first sol_uverbs minor node that can be opened successfully
 	 * and set sol_uverbs_mino_dev to that minor no.
 	 */
 	for (minor = 0; minor < MAX_HCAS; minor++) {
-		snprintf(uverbs_devpath, MAXPATHLEN, "%s/%s%d",
+		snprintf(uverbs_devpath, MAX_OFS_DEVPATH_LEN, "%s/%s%d",
 		    IB_OFS_DEVPATH_PREFIX, UVERBS_KERNEL_SYSFS_NAME_BASE,
 		    minor);
 
@@ -576,8 +590,7 @@
 		return;
 	}
 
-	memset(&uverbs_dev_cache, 0, (sizeof (uverbs_cache_info_t) * MAX_HCAS));
-	memset(&ibdev_cache, 0, (sizeof (ibdev_cache_info_t) * MAX_HCAS * 2));
+	memset(&ibdev_cache, 0, (sizeof (ibdev_cache_info_t) * MAX_HCAS));
 	memset(&umad_dev_cache, 0,
 	    (sizeof (umad_cache_info_t) * MAX_PORTS));
 
@@ -588,6 +601,37 @@
  * Some sysfs emulation software
  */
 
+/*
+ * Extract the HCA dev name from the path and remove it from the path.
+ * Given a path extract the HCA dev name of the form <dev-prefix><dev-instance>
+ * During parsing the device instance number is validated to make sure it is
+ * within MAX_HCAS limit, the routine also skips over the duplicate slashes.
+ */
+static int
+check_path_for_hca(char *path, char *device_name)
+{
+	int pos = 0;
+	int len;
+
+	while ((path[pos] != '/') || (path[pos] == '\0'))
+		pos++;
+
+	if (path[pos] != '/')
+		return (0);
+
+	strncpy(device_name, path, (pos + 1));
+	device_name[pos] = '\0';
+
+	if (get_device_num(device_name) < 0)
+		return (0);
+
+	while (path[pos] == '/')
+		pos++;
+
+	len = strlen(path);
+	memmove(path, &path[pos], (len - pos) + 1);
+	return (1);
+}
 
 /*
  * Check whether a path starts with prefix, and if it does, remove it
@@ -615,9 +659,6 @@
 		case CP_PKEYS:
 			ret = sscanf(path, "pkeys%n/", &pos);
 			break;
-		case CP_MLX4:
-			ret = sscanf(path, "mlx4_%d%n/", arg, &pos);
-			break;
 		case CP_PORTS:
 			ret = sscanf(path, "ports%n/", &pos);
 			break;
@@ -669,8 +710,6 @@
 get_device_info(const char *devname)
 {
 	ibdev_cache_info_t 	*info = NULL;
-	const char		*p = devname;
-	int			dev_num;
 
 	if (pthread_mutex_lock(&ibdev_cache_mutex) != 0) {
 		fprintf(stderr, "failed: to acquire ibdev_cache_mutex %s\n",
@@ -678,41 +717,17 @@
 		return (NULL);
 	}
 
-	if (!ibdev_cache_initialized) {
-		if (ibdev_cache_init()) {
+	if (ibdev_cache_initialized == B_FALSE) {
+		if (ibdev_cache_init() != 0) {
 			(void) pthread_mutex_unlock(&ibdev_cache_mutex);
 			fprintf(stderr, "failed to init ibdev_cache\n");
 			return (NULL);
-		} else {
-			ibdev_cache_initialized = B_TRUE;
 		}
+		ibdev_cache_initialized = B_TRUE;
 	}
 	(void) pthread_mutex_unlock(&ibdev_cache_mutex);
 
-	if (strncmp(p, "mlx4_", 5) == 0) {
-		p = p+(strlen("mlx4_"));
-	} else {
-		fprintf(stderr, "libibverbs: sol_uverbs unsupported "
-		    "device: %s\n", p);
-		return (NULL);
-	}
-	dev_num = atoi(p);
-
-	if (dev_num >= MAX_HCAS) {
-		fprintf(stderr, "Invalid device %s\n", devname);
-		return (NULL);
-	}
-
-	if (strncmp(devname, "mlx4", 4) == 0) {
-		if (ibdev_cache[MLX4][dev_num].ibd_valid)
-			info = &(ibdev_cache[MLX4][dev_num]);
-		else
-			info = NULL;
-	} else {
-		fprintf(stderr, "libibverbs: sol_uverbs unsupported "
-		    "device: %s\n", devname);
-		info = NULL;
-	}
+	info = ibdev_cache_read_by_devname(devname);
 
 	return (info);
 }
@@ -736,7 +751,7 @@
 	union ibv_gid 		*gids = NULL;
 	uint16_t		*pkeys = NULL;
 	int 			i, num_dev, rv, ret = 1;
-	char			uverbs_devpath[MAXPATHLEN];
+	char			uverbs_devpath[MAX_OFS_DEVPATH_LEN];
 
 	root_dev_list = dev_list = ibv_get_device_list(&num_dev);
 	if (!dev_list) {
@@ -755,8 +770,8 @@
 		goto error_exit2;
 	}
 
-	snprintf(uverbs_devpath, MAXPATHLEN, "%s/%s", IB_OFS_DEVPATH_PREFIX,
-	    (*dev_list)->dev_name);
+	snprintf(uverbs_devpath, MAX_OFS_DEVPATH_LEN, "%s/%s",
+	    IB_OFS_DEVPATH_PREFIX, (*dev_list)->dev_name);
 
 	ctx.device = *dev_list;
 
@@ -839,25 +854,26 @@
 #ifndef _LP64
 	int			tmpfd;
 #endif
-	int			uverbs_indx;
+	int			indx;
 
 	/*
 	 * Map the user verbs device (uverbs) to the associated
-	 * hca device.
+	 * hca device. ibdev_cache is indexed by uverbs device minor number
+	 * so extracting the index here to refer to the ibdev_cache value,
 	 */
-	uverbs_indx = strtol(dev_name + strlen(UVERBS_KERNEL_SYSFS_NAME_BASE),
+	indx = strtol(dev_name + strlen(UVERBS_KERNEL_SYSFS_NAME_BASE),
 	    NULL, 0);
-	if (uverbs_indx >= MAX_HCAS) {
+	if (indx >= MAX_HCAS) {
 		fprintf(stderr, "Invalid device %s\n", dev_name);
 		goto err_dev;
 	}
 
-	if (!uverbs_dev_cache[uverbs_indx].uvc_valid) {
+	if (!ibdev_cache[indx].ibd_valid) {
 		fprintf(stderr, "Invalid Device %s\n", dev_name);
 		goto err_dev;
 	}
 
-	fd = open(uverbs_dev_cache[uverbs_indx].uvc_ibdev_hca_path, O_RDWR);
+	fd = open(ibdev_cache[indx].ibd_hca_path, O_RDWR);
 	if (fd < 0) {
 		goto err_dev;
 	}
@@ -892,27 +908,27 @@
 {
 	unsigned int		device_num;
 	int 			len = -1;
-	uverbs_cache_info_t	*info_p;
+	ibdev_cache_info_t	*info_p;
 
-	if (pthread_mutex_lock(&uverbs_cache_mutex) != 0) {
-		fprintf(stderr, "failed: to acquire uverbs_cache_mutex %s\n",
+	if (pthread_mutex_lock(&ibdev_cache_mutex) != 0) {
+		fprintf(stderr, "failed: to acquire ibdev_cache_mutex %s\n",
 		    strerror(errno));
 		goto exit;
 	}
 
-	if (!uverbs_cache_initialized) {
-		if (uverbs_cache_init())
-			uverbs_cache_initialized = B_TRUE;
+	if (ibdev_cache_initialized == B_FALSE) {
+		if (ibdev_cache_init() == 0)
+			ibdev_cache_initialized = B_TRUE;
 		else {
-			(void) pthread_mutex_unlock(&uverbs_cache_mutex);
+			(void) pthread_mutex_unlock(&ibdev_cache_mutex);
 #ifdef	DEBUG
-			fprintf(stderr, "failed: to init uverbs cache %s\n",
+			fprintf(stderr, "failed: to init ibdev cache %s\n",
 			    strerror(errno));
 #endif
 			goto exit;
 		}
 	}
-	(void) pthread_mutex_unlock(&uverbs_cache_mutex);
+	(void) pthread_mutex_unlock(&ibdev_cache_mutex);
 
 	if (check_path(path, CP_SOL_UVERBS, &device_num)) {
 
@@ -921,11 +937,10 @@
 			goto exit;
 		}
 
-		if (!uverbs_dev_cache[device_num].uvc_valid) {
+		if (!ibdev_cache[device_num].ibd_valid)
 			goto exit;
-		}
 
-		info_p = &uverbs_dev_cache[device_num];
+		info_p = &ibdev_cache[device_num];
 
 		if (check_path(path, CP_DEVICE, NULL)) {
 			/*
@@ -934,17 +949,15 @@
 			 */
 			if (strcmp(path, "vendor") == 0) {
 				len = 1 + sprintf(buf, "0x%x",
-				    info_p->uvc_vendor_id);
+				    info_p->ibd_vendor_id);
 			} else if (strcmp(path, "device") == 0) {
 				len = 1 + sprintf(buf, "0x%x",
-				    info_p->uvc_device_id);
+				    info_p->ibd_device_id);
 			}
 		} else if (strcmp(path, "ibdev") == 0) {
-			len = 1 + sprintf(buf, "%s",
-			    info_p->uvc_ibdev_name);
+			len = 1 + sprintf(buf, "%s", info_p->ibd_name);
 		} else if (strcmp(path, "abi_version") == 0) {
-			len = 1 + sprintf(buf, "%d",
-			    info_p->uvc_ibdev_abi_version);
+			len = 1 + sprintf(buf, "%d", info_p->ibd_abi_version);
 		}
 	} else if (strcmp(path, "abi_version") == 0) {
 
@@ -1108,8 +1121,16 @@
 				rate = 5;
 				break;
 			case 4:
+				/* FALLTHROUGH */
+			case 8:
 				rate = 10;
 				break;
+			case 16:
+				rate = 14.0625;
+				break;
+			case 32:
+				rate = 25.78125;
+				break;
 			default:
 				rate = 0;
 			}
@@ -1151,181 +1172,17 @@
 	return (len);
 }
 
-/*
- * This function passes the HW PSID / HWPN string obtained from
- * driver HERMON_IOCTL_GET_HWINFO IOCTL. The memory for "hca_hwpsid"
- * & "hca_hwpn" argument has to be passed by the caller and has to
- * be at least 16 bytes & 64 bytes in size.
- */
-static int
-get_hca_psid_pn(char *ibd_name, int fd, char *hca_hwpsid,
-    char *hca_hwpn)
-{
-	hermon_hw_info_ioctl_t		hermon_hw_info;
-	int				rc;
-
-	if (strncmp(ibd_name, "mlx4_", 5) == 0) {
-		if ((rc = ioctl(fd, HERMON_IOCTL_GET_HWINFO,
-		    &hermon_hw_info)) != 0)
-			return (rc);
-
-		strncpy(hca_hwpsid, hermon_hw_info.af_psid, 16);
-		strncpy(hca_hwpn, hermon_hw_info.af_hwpn, 64);
-	} else {
-		fprintf(stderr, "libibverbs: sol_uverbs unsupported "
-		    "device: %s\n", ibd_name);
-		return (1);
-	}
-	return (0);
-}
-
-/*
- * This function passes the HW Part number string obtained from driver
- * IOCTL. The memory for "hca_hwpn" argument has to be passed by the
- * caller and has to be at least 64 bytes in size.
- */
-static int
-get_hca_hwpn_str(char *ibd_name, int fd, char *hca_hwpn)
-{
-	hermon_flash_init_ioctl_t	hermon_flash_info;
-	int				rc;
-
-	if (strncmp(ibd_name, "mlx4_", 5) == 0) {
-		if ((rc = ioctl(fd, HERMON_IOCTL_FLASH_INIT,
-		    &hermon_flash_info)) != 0)
-			return (rc);
-		strncpy(hca_hwpn, hermon_flash_info.af_hwpn, 64);
-	} else {
-		fprintf(stderr, "libibverbs: sol_uverbs unsupported "
-		    "device: %s\n", ibd_name);
-		return (1);
-	}
-	return (0);
-}
-
-static void
-init_boardid_index(ibdev_cache_info_t *ibd_info)
-{
-	int		i;
-	int		fd;
-	char		hca_hwpsid[16];
-	char		hca_hwpn[64];
-	char		*pn_psidp;
-	boolean_t	psid_valid, pn_valid;
-
-	if (pthread_mutex_lock(&uverbs_cache_mutex) != 0) {
-		fprintf(stderr, "failed: to acquire "
-		    "uverbs_cache_mutex %s\n",
-		    strerror(errno));
-		goto boardid_err;
-	}
-	if (!uverbs_cache_initialized) {
-		if (uverbs_cache_init())
-			uverbs_cache_initialized = B_TRUE;
-		else {
-			(void) pthread_mutex_unlock(&uverbs_cache_mutex);
-#ifdef	DEBUG
-			fprintf(stderr, "failed: to init uverbs cache %s\n",
-			    strerror(errno));
-#endif
-			goto boardid_err;
-		}
-	}
-	(void) pthread_mutex_unlock(&uverbs_cache_mutex);
-
-	for (i = 0; i < MAX_HCAS; i++) {
-		if (uverbs_dev_cache[i].uvc_valid &&
-		    strcmp(uverbs_dev_cache[i].uvc_ibdev_name,
-		    ibd_info->ibd_name) == 0) {
-			break;
-		}
-	}
-
-	if (i == MAX_HCAS) {
-		fprintf(stderr, "failed to find uverbs_dev for %s\n",
-		    ibd_info->ibd_name);
-		goto boardid_err;
-	}
-
-	fd = open(uverbs_dev_cache[i].uvc_ibdev_hca_path, O_RDWR);
-	if (fd < 0) {
-		goto boardid_err;
-	}
-
-	psid_valid = pn_valid = B_FALSE;
-	if (get_hca_psid_pn(ibd_info->ibd_name, fd,
-	    hca_hwpsid, hca_hwpn)) {
-		if (get_hca_hwpn_str(ibd_info->ibd_name, fd, hca_hwpn)) {
-			close(fd);
-			goto boardid_err;
-		} else {
-			if (hca_hwpn[0]) {
-				if ((pn_psidp = strchr(
-				    hca_hwpn, ' ')) != NULL)
-					*pn_psidp = '\0';
-				pn_valid = B_TRUE;
-			}
-		}
-	} else {
-		if (hca_hwpsid[0]) {
-			if ((pn_psidp = strchr(
-			    hca_hwpsid, ' ')) != NULL)
-				*pn_psidp = '\0';
-			psid_valid = B_TRUE;
-		} else if (hca_hwpn[0]) {
-			if ((pn_psidp = strchr(
-			    hca_hwpn, ' ')) != NULL)
-				*pn_psidp = '\0';
-			pn_valid = B_TRUE;
-		}
-	}
-	close(fd);
-
-	if (pn_valid == B_FALSE && psid_valid == B_FALSE)
-		goto boardid_err;
-
-	for (i = 0; i < MLX_MAX_ID; i++) {
-		/*
-		 * Find PSID number, set the boardid_index,
-		 * Skip index 0, as it is for failure "unknown"
-		 * case
-		 */
-		if ((psid_valid == B_TRUE &&
-		    strncmp(mlx_mdr[i].mlx_psid,
-		    (const char *)hca_hwpsid,
-		    min(strlen(hca_hwpsid),
-		    strlen(mlx_mdr[i].mlx_psid))) == 0) ||
-		    (pn_valid == B_TRUE &&
-		    strncmp(mlx_mdr[i].mlx_pn,
-		    (const char *)hca_hwpn,
-		    min(strlen(hca_hwpn),
-		    strlen(mlx_mdr[i].mlx_pn))) == 0)) {
-			/* Set boardid_index */
-			ibd_info->ibd_boardid_index = i;
-			return;
-		}
-	}
-
-boardid_err:
-	/* Failure case, default to "unknown" */
-	ibd_info->ibd_boardid_index = -2;
-}
-
 static int
 infiniband(char *path, char *buf, size_t size)
 {
 	int			len = -1;
-	unsigned int		device_num;
-	char			dev_name[10];
+	char			dev_name[MAXNAMELEN];
 	ibdev_cache_info_t	*info;
 
-	memset(dev_name, 0, 10);
+	memset(dev_name, 0, MAXNAMELEN);
 
-	if (check_path(path, CP_MLX4, &device_num)) {
-		sprintf(dev_name, "mlx4_%d", device_num);
-	} else {
+	if (!check_path_for_hca(path, dev_name))
 		goto exit;
-	}
 
 	if (check_path(path, CP_PORTS, NULL)) {
 		len = infiniband_ports(path, buf, size, dev_name);
@@ -1347,22 +1204,9 @@
 		} else if (strcmp(path, "hw_rev") == 0) {
 			len = 1 + sprintf(buf, "%d", info->ibd_hw_rev);
 		} else if (strcmp(path, "hca_type") == 0) {
-			if (!(strncmp(info->ibd_name, "mlx4", 4)))
-				len = 1 + sprintf(buf, "MT%d",
-				    info->ibd_device_id);
-			else
-				len = 1 + sprintf(buf, "unavailable");
+			len = 1 + sprintf(buf, "%s", info->ibd_devid_string);
 		} else if (strcmp(path, "board_id") == 0) {
-			if (info->ibd_boardid_index == -1)
-				init_boardid_index(info);
-
-			if (info->ibd_boardid_index >= 0) {
-				len = 1 + sprintf(buf, "%s",
-				    mlx_mdr[info->ibd_boardid_index].mlx_psid);
-			} else {
-				len = 1 + sprintf(buf, "%s",
-				    "unknown");
-			}
+			len = 1 + sprintf(buf, "%s", info->ibd_boardid_string);
 		}
 	}
 exit:
@@ -1380,8 +1224,8 @@
 		    strerror(errno));
 		goto exit;
 	}
-	if (!umad_cache_initialized) {
-		if (umad_cache_init())
+	if (umad_cache_initialized == B_FALSE) {
+		if (umad_cache_init() == 0)
 			umad_cache_initialized = B_TRUE;
 		else {
 			(void) pthread_mutex_unlock(&umad_cache_mutex);
@@ -1539,7 +1383,7 @@
 	kstat_t		*ksp;
 	kstat_named_t	*knp;
 
-	memset(stats, 0, sizeof (stats));
+	memset(stats, 0, sizeof (sol_cpu_stats_t));
 	nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
 	/* Aggregate the value of all CPUs */
@@ -1735,8 +1579,8 @@
 {
 	struct ibv_query_device cmd;
 	struct ibv_context	context;
-	char			uverbs_devpath[MAXPATHLEN];
-	int			uverbs_fd, ret;
+	char			uverbs_devpath[MAX_OFS_DEVPATH_LEN];
+	int			ret;
 	uint64_t		raw_fw_ver;
 	unsigned		major, minor, sub_minor;
 
@@ -1745,8 +1589,8 @@
 	if (!device || !attr)
 		return (-1);
 
-	snprintf(uverbs_devpath, MAXPATHLEN, "%s/%s", IB_OFS_DEVPATH_PREFIX,
-	    device->dev_name);
+	snprintf(uverbs_devpath, MAX_OFS_DEVPATH_LEN, "%s/%s",
+	    IB_OFS_DEVPATH_PREFIX, device->dev_name);
 
 	if ((context.cmd_fd = open(uverbs_devpath, O_RDWR)) <  0)
 		return (-1);
--- a/components/open-fabrics/libmlx4/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libmlx4/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -49,6 +49,7 @@
 		else \
 		cp mlx4.driver.sparc $(@D)/mlx4.driver; \
 		fi; \
+		cp mlnx_umap.h $(@D)/src ; \
 		cd $(@D) ; \
 		aclocal --force ; \
 		libtoolize --copy --force --ltdl ; \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/open-fabrics/libmlx4/mlnx_umap.h	Thu Oct 22 08:27:04 2015 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ */
+
+#ifndef	_SYS_IB_ADAPTERS_MLNX_UMAP_H
+#define	_SYS_IB_ADAPTERS_MLNX_UMAP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * mlnx_umap.h
+ *	Contains all of the definions necessary for communicating the data
+ *	needed for direct userland access to resources on Mellanox HCAs.
+ */
+
+/*
+ * Note: The structs in this file are used in the interface(s)
+ *	between kernel service drivers, e.g. daplt, and the libraries
+ *	on top of them, e.g. udapl_tavor.so.1.  When any of the
+ *	structs in this file change, any version control between the
+ *	kernel service driver and the library will need to change.
+ *
+ * There is a version control on the structs defined here.  The library
+ * (consumer of structs from ibt_ci_data_out()) must verify a version
+ * field to correctly read the data provided by the kernel driver
+ * (tavor, arbel, and hermon).
+ */
+
+#define	MLNX_UMAP_IF_VERSION	3
+
+/*
+ * The following defines are used in the database type field for each database
+ * entry.  They specify the type of object (UAR pages, PIDs, CQ, QP, and MR
+ * umemcookie) that corresponds to the database key value.  On database queries,
+ * this type value must match the search criterion.
+ */
+#define	MLNX_UMAP_UARPG_RSRC		0x11
+#define	MLNX_UMAP_BLUEFLAMEPG_RSRC	0x12
+#define	MLNX_UMAP_PID_RSRC		0x22
+#define	MLNX_UMAP_CQMEM_RSRC		0x33
+#define	MLNX_UMAP_QPMEM_RSRC		0x44
+#define	MLNX_UMAP_MRMEM_RSRC		0x55
+#define	MLNX_UMAP_SRQMEM_RSRC		0x66
+#define	MLNX_UMAP_DBRMEM_RSRC		0x77
+#define	MLNX_UMAP_MRMEM_MAHDL		0x88
+#define	MLNX_UMAP_RSRC_TYPE_MASK	0xFF
+#define	MLNX_UMAP_RSRC_TYPE_SHIFT	8
+
+/* umap structures */
+
+typedef struct mlnx_umap_cq_data_out_s {
+	uint32_t	mcq_rev;
+	uint32_t	mcq_cqnum;
+	uint64_t	mcq_mapoffset;
+	uint64_t	mcq_maplen;
+	uint32_t	mcq_numcqe;
+	uint32_t	mcq_cqesz;
+
+	/* Arbel/Hermon doorbell records */
+	uint64_t	mcq_armdbr_mapoffset;
+	uint64_t	mcq_armdbr_maplen;
+	uint64_t	mcq_polldbr_mapoffset;
+	uint64_t	mcq_polldbr_maplen;
+	uint32_t	mcq_armdbr_offset;
+	uint32_t	mcq_polldbr_offset;
+} mlnx_umap_cq_data_out_t;
+
+typedef struct mlnx_umap_qp_data_out_s {
+	uint32_t	mqp_rev;
+	uint32_t	mqp_qpnum;
+	uint64_t	mqp_mapoffset;
+	uint64_t	mqp_maplen;
+
+	uint32_t	mqp_rq_off;
+	uint32_t	mqp_rq_desc_addr;
+	uint32_t	mqp_rq_numwqe;
+	uint32_t	mqp_rq_wqesz;
+
+	uint32_t	mqp_sq_off;
+	uint32_t	mqp_sq_desc_addr;
+	uint32_t	mqp_sq_numwqe;
+	uint32_t	mqp_sq_wqesz;
+
+	/* Arbel/Hermon doorbell records */
+	uint64_t	mqp_sdbr_mapoffset;
+	uint64_t	mqp_sdbr_maplen;
+	uint64_t	mqp_rdbr_mapoffset;
+	uint64_t	mqp_rdbr_maplen;
+	uint32_t	mqp_sdbr_offset;
+	uint32_t	mqp_rdbr_offset;
+
+	/* Hermon send queue headroom, in units of wqes */
+	uint32_t	mqp_sq_headroomwqes;
+	uint32_t	mqp_reserved;
+} mlnx_umap_qp_data_out_t;
+
+typedef struct mlnx_umap_srq_data_out_s {
+	uint32_t	msrq_rev;
+	uint32_t	msrq_srqnum;
+	uint64_t	msrq_mapoffset;
+	uint64_t	msrq_maplen;
+	uint32_t	msrq_desc_addr;
+	uint32_t	msrq_numwqe;
+	uint32_t	msrq_wqesz;
+	uint32_t	msrq_pad1;	/* reserved */
+
+	/* Arbel/Hermon doorbell records */
+	uint64_t	msrq_rdbr_mapoffset;
+	uint64_t	msrq_rdbr_maplen;
+	uint32_t	msrq_rdbr_offset;
+	uint32_t	msrq_reserved;
+} mlnx_umap_srq_data_out_t;
+
+typedef struct mlnx_umap_pd_data_out_s {
+	uint32_t	mpd_pdnum;
+	uint32_t	mpd_rev;
+} mlnx_umap_pd_data_out_t;
+
+/*
+ * The following structure is used currently to pass data back to
+ * libmlx4 on user allocation context.
+ */
+typedef struct mlnx_umap_ucontext_data_out_s {
+	uint32_t	muc_qp_tab_size;
+	uint16_t	muc_bf_reg_size;
+	uint16_t	muc_bf_regs_per_page;
+	uint32_t	muc_rev;
+	uint32_t	muc_reserved;
+} mlnx_umap_ucontext_data_out_t;
+
+/*
+ * Information for ibt_ci_data_in() for memory regions.
+ *
+ * MLNX_UMAP_MMR_DATA_IN_IF_VERSION is the value used in the mmr_rev member.
+ * mmr_func is the callback handler.  mmr_arg1 and mmr_arg2 are its arguments.
+ */
+#define	MLNX_UMAP_MMR_DATA_IN_IF_VERSION	1
+typedef struct mlnx_umap_mr_data_in_s {
+	uint32_t  mmr_rev;
+	uint32_t  mmr_reserved;
+	void    (*mmr_func)(void *, void *);
+	void    *mmr_arg1;
+	void    *mmr_arg2;
+} mlnx_umap_mr_data_in_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* _SYS_IB_ADAPTERS_MLNX_UMAP_H */
--- a/components/open-fabrics/libmlx4/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/libmlx4/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -1,5 +1,5 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+#This patch was developed in-house. We plan to submit it upstream, but do
+# not yet have a target date for doing so
 #
 diff -r -u /tmp/839450/libmlx4-1.0.1/Makefile.am libmlx4-1.0.1/Makefile.am
 --- /tmp/839450/libmlx4-1.0.1/Makefile.am	Tue Sep  8 06:40:35 2009
@@ -16,30 +16,121 @@
 diff -r -u /tmp/839450/libmlx4-1.0.1/src/mlx4-abi.h libmlx4-1.0.1/src/mlx4-abi.h
 --- /tmp/839450/libmlx4-1.0.1/src/mlx4-abi.h	Thu Mar 10 04:48:34 2011
 +++ libmlx4-1.0.1/src/mlx4-abi.h	Fri Feb 11 03:49:51 2011
-@@ -35,6 +35,10 @@
+@@ -35,6 +35,14 @@
  
  #include <infiniband/kern-abi.h>
  
 +#if defined(__SVR4) && defined(__sun)
-+#include <sys/ib/adapters/mlnx_umap.h>   /* Opaque CI data out definitions */
++/* Restore once build systems are in sync
++   See 21170572 - libmlx4 should be built with the system mlnx_umap.h
++#include <sys/ib/adapters/mlnx_umap.h>   / * Opaque CI data out definitions * /
++*/
++#include "mlnx_umap.h"   /* Opaque CI data out definitions */
 +#endif
 +
  #define MLX4_UVERBS_MIN_ABI_VERSION	2
  #define MLX4_UVERBS_MAX_ABI_VERSION	3
  
-@@ -49,6 +53,12 @@
- 	struct ibv_alloc_pd_resp	ibv_resp;
- 	__u32				pdn;
+@@ -43,6 +51,10 @@
+ 	__u32				qp_tab_size;
+ 	__u16				bf_reg_size;
+ 	__u16				bf_regs_per_page;
++#if defined(__SVR4) && defined(__sun)
++	uint32_t			muc_rev;
++	uint32_t			muc_reserved;
++#endif
+ };
+ 
+ struct mlx4_alloc_pd_resp {
+@@ -51,23 +63,45 @@
  	__u32				reserved;
-+};
-+
+ };
+ 
 +struct mlx4_share_pd_resp {
 +	struct ibv_share_pd_resp	ibv_resp;
 +	__u32				pdn;
 +	__u32				reserved;
++};
++
+ struct mlx4_create_cq {
+ 	struct ibv_create_cq		ibv_cmd;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u64				buf_addr;
+ 	__u64				db_addr;
++#endif
+ };
+ 
+ struct mlx4_create_cq_resp {
+ 	struct ibv_create_cq_resp	ibv_resp;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u32				cqn;
+ 	__u32				reserved;
++#else
++	mlnx_umap_cq_data_out_t		mdd;
++#endif
+ };
+ 
+ struct mlx4_resize_cq {
+ 	struct ibv_resize_cq		ibv_cmd;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u64				buf_addr;
++#endif
  };
  
- struct mlx4_create_cq {
++#if defined(__SVR4) && defined(__sun)
++struct mlx4_resize_cq_resp {
++	struct ibv_resize_cq_resp	ibv_resp;
++	mlnx_umap_cq_data_out_t		mdd;
++};
++#endif
++
++
+ #ifdef HAVE_IBV_XRC_OPS
+ struct mlx4_create_xrc_srq {
+ 	struct ibv_create_xrc_srq	ibv_cmd;
+@@ -78,18 +112,25 @@
+ 
+ struct mlx4_create_srq {
+ 	struct ibv_create_srq		ibv_cmd;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u64				buf_addr;
+ 	__u64				db_addr;
++#endif
+ };
+ 
+ struct mlx4_create_srq_resp {
+ 	struct ibv_create_srq_resp	ibv_resp;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u32				srqn;
+ 	__u32				reserved;
++#else
++	mlnx_umap_srq_data_out_t	mdd;
++#endif
+ };
+ 
+ struct mlx4_create_qp {
+ 	struct ibv_create_qp		ibv_cmd;
++#if !(defined(__SVR4) && defined(__sun))
+ 	__u64				buf_addr;
+ 	__u64				db_addr;
+ 	__u8				log_sq_bb_count;
+@@ -96,8 +137,16 @@
+ 	__u8				log_sq_stride;
+ 	__u8				sq_no_prefetch;	/* was reserved in ABI 2 */
+ 	__u8				reserved[5];
++#endif
+ };
+ 
++#if defined(__SVR4) && defined(__sun)
++struct mlx4_create_qp_resp {
++	struct ibv_create_qp_resp	ibv_resp;
++	mlnx_umap_qp_data_out_t		mdd;
++};
++#endif
++
+ #ifdef HAVE_IBV_XRC_OPS
+ struct mlx4_open_xrc_domain_resp {
+ 	struct ibv_open_xrc_domain_resp	ibv_resp;
 diff -r -u /tmp/839450/libmlx4-1.0.1/src/verbs.c libmlx4-1.0.1/src/verbs.c
 --- /tmp/839450/libmlx4-1.0.1/src/verbs.c	Thu Mar 10 04:48:34 2011
 +++ libmlx4-1.0.1/src/verbs.c	Fri Mar 11 14:40:18 2011
@@ -58,31 +149,7 @@
  	major     = (raw_fw_ver >> 32) & 0xffff;
  	minor     = (raw_fw_ver >> 16) & 0xffff;
  	sub_minor = raw_fw_ver & 0xffff;
-@@ -79,6 +87,9 @@
- 	struct ibv_alloc_pd       cmd;
- 	struct mlx4_alloc_pd_resp resp;
- 	struct mlx4_pd		 *pd;
-+#if defined(__SVR4) && defined(__sun)
-+	mlnx_umap_pd_data_out_t   *mdd;
-+#endif
- 
- 	pd = malloc(sizeof *pd);
- 	if (!pd)
-@@ -90,11 +101,67 @@
- 		return NULL;
- 	}
- 
-+#if defined(__SVR4) && defined(__sun)
-+	/*
-+	 * kernel driver passes back the PD table index as opaque data.  This
-+	 * is required for specifying the PD in user space address vectors.
-+	 */
-+	mdd     = (mlnx_umap_pd_data_out_t *) &resp.ibv_resp.drv_out;
-+	pd->pdn = mdd->mpd_pdnum;
-+#else
- 	pd->pdn = resp.pdn;
-+#endif
- 
+@@ -95,6 +103,39 @@
  	return &pd->ibv_pd;
  }
  
@@ -105,9 +172,6 @@
 +	struct ibv_share_pd       cmd;
 +	struct mlx4_share_pd_resp resp;
 +	struct mlx4_pd		 *pd;
-+#if defined(__SVR4) && defined(__sun)
-+	mlnx_umap_pd_data_out_t   *mdd;
-+#endif
 +
 +	pd = malloc(sizeof *pd);
 +	if (!pd)
@@ -118,25 +182,14 @@
 +		free(pd);
 +		return NULL;
 +	}
-+
-+#if defined(__SVR4) && defined(__sun)
-+	/*
-+	 * kernel driver passes back the PD table index as opaque data.  This
-+	 * is required for specifying the PD in user space address vectors.
-+	 */
-+	mdd     = (mlnx_umap_pd_data_out_t *) &resp.ibv_resp.drv_out;
-+	pd->pdn = mdd->mpd_pdnum;
-+#else
 +	pd->pdn = resp.pdn;
-+#endif
-+
 +	return &pd->ibv_pd;
 +}
 +
  int mlx4_free_pd(struct ibv_pd *pd)
  {
  	int ret;
-@@ -138,6 +205,37 @@
+@@ -138,6 +179,37 @@
  	return mr;
  }
  
@@ -174,7 +227,7 @@
  int mlx4_dereg_mr(struct ibv_mr *mr)
  {
  	int ret;
-@@ -150,6 +248,29 @@
+@@ -150,6 +222,29 @@
  	return 0;
  }
  
@@ -204,18 +257,17 @@
  static int align_queue_size(int req)
  {
  	int nent;
-@@ -168,6 +289,10 @@
+@@ -168,6 +263,9 @@
  	struct mlx4_create_cq_resp resp;
  	struct mlx4_cq		  *cq;
  	int			   ret;
 +#if defined(__SVR4) && defined(__sun)
 +	void                      *cqbuf;
-+	mlnx_umap_cq_data_out_t   *mdd;
 +#endif
  
  	/* Sanity check CQ size before proceeding */
  	if (cqe > 0x3fffff)
-@@ -184,7 +309,8 @@
+@@ -184,7 +282,8 @@
  
  	cqe = align_queue_size(cqe + 1);
  
@@ -225,7 +277,7 @@
  		goto err;
  
  	cq->set_ci_db  = mlx4_alloc_db(to_mctx(context), MLX4_DB_TYPE_CQ);
-@@ -198,15 +324,78 @@
+@@ -198,15 +297,73 @@
  
  	cmd.buf_addr = (uintptr_t) cq->buf.buf;
  	cmd.db_addr  = (uintptr_t) cq->set_ci_db;
@@ -239,30 +291,26 @@
  	ret = ibv_cmd_create_cq(context, cqe - 1, channel, comp_vector,
  				&cq->ibv_cq, &cmd.ibv_cmd, sizeof cmd,
  				&resp.ibv_resp, sizeof resp);
-+#if defined(__SVR4) && defined(__sun)
  	if (ret)
-+		goto err;
-+#else
-+	if (ret)
++#if !(defined(__SVR4) && defined(__sun))
  		goto err_db;
-+#endif
- 
+-
  	cq->cqn = resp.cqn;
++#else
++		goto err;
  
-+#if defined(__SVR4) && defined(__sun)
 +        /*
 +         * For Solaris the kernel driver passes back mmap information for
 +	 *  mapping the CQ memory it allocated.
 +         */
-+        mdd = (mlnx_umap_cq_data_out_t *) &resp.ibv_resp.drv_out;
-+	if (mdd->mcq_rev < MLNX_UMAP_IF_VERSION) {
++	if (resp.mdd.mcq_rev < MLNX_UMAP_IF_VERSION) {
 +		fprintf(stderr, PFX "libmlx4_create_cq: libmlx4/hermon umap "
-+				"rev mismatch (kernel rev=%d)\n", mdd->mcq_rev);
++		    "rev mismatch (kernel rev=%d)\n", resp.mdd.mcq_rev);
 +		goto err_destroy;
 +	}
 +
-+        cqbuf = mmap64((void *)0, mdd->mcq_maplen, (PROT_READ | PROT_WRITE),
-+                    MAP_SHARED, context->mmap_fd, mdd->mcq_mapoffset);
++        cqbuf = mmap64((void *)0, resp.mdd.mcq_maplen, (PROT_READ | PROT_WRITE),
++	    MAP_SHARED, context->mmap_fd, resp.mdd.mcq_mapoffset);
 +
 +        if (cqbuf == MAP_FAILED)
 +                goto err_destroy;
@@ -271,29 +319,29 @@
 +         * Extract hardware driver values for the number of CQEs and the
 +	 * hardware CQ number to use (needed for user space doorbells).
 +         */
-+	cqe            = mdd->mcq_numcqe;
-+	cq->cqn        = mdd->mcq_cqnum;
++	cqe            = resp.mdd.mcq_numcqe;
++	cq->cqn        = resp.mdd.mcq_cqnum;
 +	cq->buf.buf    = cqbuf;
-+	cq->buf.length = mdd->mcq_maplen;
++	cq->buf.length = resp.mdd.mcq_maplen;
 +	cq->ibv_cq.cqe = cqe-1;
 +
 +	/*
 +	 * We map both poll and arm as seperate doorbells (OFED assumes 1 word
-+	 * offset and just bumpts the address) since Solaris provides a
++	 * offset and just bumps the address) since Solaris provides a
 +	 * separate offst. This will amount to the same thing (a second
 +	 * reference to the first doorbell is added) but is more flexible.
 +	 */
 +	cq->set_ci_db = mlx4_alloc_db(to_mctx(context),
-+	                              mdd->mcq_polldbr_mapoffset,
-+	                              mdd->mcq_polldbr_maplen,
-+	                              mdd->mcq_polldbr_offset);
++	    resp.mdd.mcq_polldbr_mapoffset, resp.mdd.mcq_polldbr_maplen,
++	    resp.mdd.mcq_polldbr_offset);
++
 +        if (cq->set_ci_db == NULL)
 +                goto err_buf;
 +
 +	cq->arm_db = mlx4_alloc_db(to_mctx(context),
-+	                           mdd->mcq_armdbr_mapoffset,
-+	                           mdd->mcq_armdbr_maplen,
-+	                           mdd->mcq_armdbr_offset);
++	    resp.mdd.mcq_armdbr_mapoffset, resp.mdd.mcq_armdbr_maplen,
++	    resp.mdd.mcq_armdbr_offset);
++
 +        if (cq->arm_db == NULL)
 +                goto err_db;
 +
@@ -304,7 +352,7 @@
  	return &cq->ibv_cq;
  
  err_db:
-@@ -215,6 +404,21 @@
+@@ -215,6 +372,21 @@
  err_buf:
  	mlx4_free_buf(&cq->buf);
  
@@ -326,17 +374,16 @@
  err:
  	free(cq);
  
-@@ -225,12 +429,16 @@
- {
- 	struct mlx4_cq *cq = to_mcq(ibcq);
+@@ -227,10 +399,15 @@
  	struct mlx4_resize_cq cmd;
-+	struct ibv_resize_cq_resp resp;
  	struct mlx4_buf buf;
  	int old_cqe, outst_cqe, ret;
 -
-+#if defined(__SVR4) && defined(__sun)
-+	void			*cqbuf;
-+	mlnx_umap_cq_data_out_t	*mdd;
++#if !(defined(__SVR4) && defined(__sun))
++	struct ibv_resize_cq_resp resp;
++#else
++	struct mlx4_resize_cq_resp	resp;
++	void				*cqbuf;
 +#endif
  	/* Sanity check CQ size before proceeding */
  	if (cqe > 0x3fffff)
@@ -345,7 +392,7 @@
  
  	pthread_spin_lock(&cq->lock);
  
-@@ -247,32 +455,76 @@
+@@ -247,32 +424,79 @@
  		goto out;
  	}
  
@@ -364,9 +411,13 @@
 -		struct ibv_resize_cq_resp resp;
 -		ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd,
 +	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd,
++#if !(defined(__SVR4) && defined(__sun))
  					&resp, sizeof resp);
 -	}
  #else
++					&resp.ibv_resp, sizeof resp);
++#endif
++#else
  	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd);
  #endif
 -	if (ret) {
@@ -406,16 +457,15 @@
 +	 * For Solaris the kernel driver passes back mmap information for
 +	 * mapping the CQ memory it allocated.
 +	 */
-+	mdd = (mlnx_umap_cq_data_out_t *) &resp.drv_out;
-+	if (mdd->mcq_rev < MLNX_UMAP_IF_VERSION) {
++	if (resp.mdd.mcq_rev < MLNX_UMAP_IF_VERSION) {
 +		fprintf(stderr, PFX "libmlx4_resize_cq: libmlx4/hermon umap "
-+		    "rev mismatch (kernel rev=%d)\n", mdd->mcq_rev);
++		    "rev mismatch (kernel rev=%d)\n", resp.mdd.mcq_rev);
 +		ret = EINVAL;
 +		goto out;
 +	}
  
-+	cqbuf = mmap64((void *)0, mdd->mcq_maplen, (PROT_READ | PROT_WRITE),
-+	     MAP_SHARED, ibcq->context->mmap_fd, mdd->mcq_mapoffset);
++	cqbuf = mmap64((void *)0, resp.mdd.mcq_maplen, (PROT_READ | PROT_WRITE),
++	     MAP_SHARED, ibcq->context->mmap_fd, resp.mdd.mcq_mapoffset);
 +
 +	if (cqbuf == MAP_FAILED) {
 +		ret = EINVAL;
@@ -425,15 +475,15 @@
 +	cq->buf.length = buf.length;
 +	mlx4_cq_resize_copy_cqes(cq, cqbuf, old_cqe);
 +	cq->buf.buf    = cqbuf;
-+	cq->buf.length = mdd->mcq_maplen;
++	cq->buf.length = resp.mdd.mcq_maplen;
 +	free(buf.buf);
-+	cq->ibv_cq.cqe =  mdd->mcq_numcqe - 1;
-+	cq->cqn        = mdd->mcq_cqnum;
++	cq->ibv_cq.cqe =  resp.mdd.mcq_numcqe - 1;
++	cq->cqn        = resp.mdd.mcq_cqnum;
 +#endif
  out:
  	pthread_spin_unlock(&cq->lock);
  	return ret;
-@@ -287,6 +539,9 @@
+@@ -287,6 +511,9 @@
  		return ret;
  
  	mlx4_free_db(to_mctx(cq->context), MLX4_DB_TYPE_CQ, to_mcq(cq)->set_ci_db);
@@ -443,18 +493,17 @@
  	mlx4_free_buf(&to_mcq(cq)->buf);
  	free(to_mcq(cq));
  
-@@ -300,6 +555,10 @@
+@@ -300,6 +527,9 @@
  	struct mlx4_create_srq_resp resp;
  	struct mlx4_srq		   *srq;
  	int			    ret;
 +#if defined(__SVR4) && defined(__sun)
-+	mlnx_umap_srq_data_out_t   *mdd;
 +	void                       *srqbuf;
 +#endif
  
  	/* Sanity check SRQ size before proceeding */
  	if (attr->attr.max_wr > 1 << 16 || attr->attr.max_sge > 64)
-@@ -312,6 +571,7 @@
+@@ -312,6 +542,7 @@
  	if (pthread_spin_init(&srq->lock, PTHREAD_PROCESS_PRIVATE))
  		goto err;
  
@@ -462,10 +511,10 @@
  	srq->max     = align_queue_size(attr->attr.max_wr + 1);
  	srq->max_gs  = attr->attr.max_sge;
  	srq->counter = 0;
-@@ -324,7 +584,23 @@
- 		goto err_free;
+@@ -327,23 +558,118 @@
  
- 	*srq->db = 0;
+ 	cmd.buf_addr = (uintptr_t) srq->buf.buf;
+ 	cmd.db_addr  = (uintptr_t) srq->db;
 +#else
 +	/*
 +	 * Solaris SRQ WQE memory is supplied by the kernel; we'll update
@@ -483,10 +532,7 @@
 +	 */
 +	attr->attr.max_wr += 1;
 +#endif
- 	cmd.buf_addr = (uintptr_t) srq->buf.buf;
- 	cmd.db_addr  = (uintptr_t) srq->db;
- 
-@@ -331,19 +607,97 @@
++
  	ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr,
  				 &cmd.ibv_cmd, sizeof cmd,
  				 &resp.ibv_resp, sizeof resp);
@@ -500,31 +546,30 @@
 +         * SRQ work queue memory it allocated and the doorbell for
 +	 * for posting.
 +         */
-+	mdd = (mlnx_umap_srq_data_out_t *) &resp.ibv_resp.drv_out;
-+	if (mdd->msrq_rev < 1) {
++	if (resp.mdd.msrq_rev < 1) {
 +		fprintf(stderr, PFX "libmlx4_create_srq libmlx4/hermon umap "
-+			"rev mismatch (kernel rev=%d)\n", mdd->msrq_rev);
++			"rev mismatch (kernel rev=%d)\n", resp.mdd.msrq_rev);
 +		goto err_destroy;
 +	}
 +
-+        srqbuf = mmap64((void *)0, mdd->msrq_maplen, (PROT_READ | PROT_WRITE),
-+                    MAP_SHARED, pd->context->mmap_fd, mdd->msrq_mapoffset);
++        srqbuf = mmap64((void *)0, resp.mdd.msrq_maplen,
++	    (PROT_READ | PROT_WRITE), MAP_SHARED, pd->context->mmap_fd,
++	    resp.mdd.msrq_mapoffset);
 +
 +        if (srqbuf == MAP_FAILED) {
 +                goto err_destroy;
 +        }
 +
 +	srq->buf.buf    = srqbuf;
-+	srq->buf.length = mdd->msrq_maplen;
++	srq->buf.length = resp.mdd.msrq_maplen;
 +	srq->max	= resp.ibv_resp.max_wr;
 +	srq->max_gs	= resp.ibv_resp.max_sge;
-+	srq->srqn       = mdd->msrq_srqnum;
++	srq->srqn       = resp.mdd.msrq_srqnum;
 +	srq->counter 	= 0;
 +
 +	srq->db = mlx4_alloc_db(to_mctx(pd->context),
-+	                        mdd->msrq_rdbr_mapoffset,
-+	                        mdd->msrq_rdbr_maplen,
-+	                        mdd->msrq_rdbr_offset);
++	    resp.mdd.msrq_rdbr_mapoffset, resp.mdd.msrq_rdbr_maplen,
++	    resp.mdd.msrq_rdbr_offset);
 +	if (srq->db == NULL) {
 +                goto err_unmap;
 +	}
@@ -534,7 +579,8 @@
 +	 * it utilizes the memory allocated by the kernel.
 +	 * It also allocates the srq->wrid memory.
 +	 */
-+	if (mlx4_set_srq_buf(pd, srq, mdd->msrq_wqesz, mdd->msrq_numwqe)) {
++	if (mlx4_set_srq_buf(pd, srq, resp.mdd.msrq_wqesz,
++	    resp.mdd.msrq_numwqe)) {
 +		goto err_db;
 +	}
 +
@@ -584,7 +630,7 @@
  
  err:
  	free(srq);
-@@ -357,7 +711,16 @@
+@@ -357,7 +683,16 @@
  {
  	struct ibv_modify_srq cmd;
  
@@ -601,7 +647,7 @@
  }
  
  int mlx4_query_srq(struct ibv_srq *srq,
-@@ -365,7 +728,17 @@
+@@ -365,7 +700,17 @@
  {
  	struct ibv_query_srq cmd;
  
@@ -619,18 +665,26 @@
  }
  
  int mlx4_destroy_srq(struct ibv_srq *ibsrq)
-@@ -447,6 +820,10 @@
+@@ -443,12 +788,16 @@
+ struct ibv_qp *mlx4_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
+ {
+ 	struct mlx4_create_qp     cmd;
+-	struct ibv_create_qp_resp resp;
  	struct mlx4_qp		 *qp;
  	int			  ret;
  	struct mlx4_context	 *context = to_mctx(pd->context);
-+#if defined(__SVR4) && defined(__sun)
-+	mlnx_umap_qp_data_out_t	*mdd;
-+	void			*qpbuf;
++#if !(defined(__SVR4) && defined(__sun))
++	struct ibv_create_qp_resp resp;
++#else
++	struct mlx4_create_qp_resp	resp;
++	void				*qpbuf;
 +#endif
  
- 
+-
  	/* Sanity check QP size before proceeding */
-@@ -457,6 +834,7 @@
+ 	if (verify_sizes(attr, context))
+ 		return NULL;
+@@ -457,6 +806,7 @@
  	if (!qp)
  		return NULL;
  
@@ -638,7 +692,7 @@
  	mlx4_calc_sq_wqe_size(&attr->cap, attr->qp_type, qp);
  
  	/*
-@@ -466,6 +844,7 @@
+@@ -466,6 +816,7 @@
  	qp->sq_spare_wqes = (2048 >> qp->sq.wqe_shift) + 1;
  	qp->sq.wqe_cnt = align_queue_size(attr->cap.max_send_wr + qp->sq_spare_wqes);
  	qp->rq.wqe_cnt = align_queue_size(attr->cap.max_recv_wr);
@@ -646,7 +700,7 @@
  
  	if (attr->srq || attr->qp_type == IBV_QPT_XRC)
  		attr->cap.max_recv_wr = qp->rq.wqe_cnt = 0;
-@@ -476,6 +855,22 @@
+@@ -476,6 +827,22 @@
  			attr->cap.max_recv_wr = 1;
  	}
  
@@ -669,7 +723,7 @@
  	if (mlx4_alloc_qp_buf(pd, &attr->cap, attr->qp_type, qp))
  		goto err;
  
-@@ -505,17 +900,84 @@
+@@ -505,10 +872,12 @@
  		; /* nothing */
  	cmd.sq_no_prefetch = 0;	/* OK for ABI 2: just a reserved field */
  	memset(cmd.reserved, 0, sizeof cmd.reserved);
@@ -678,23 +732,30 @@
  	pthread_mutex_lock(&to_mctx(pd->context)->qp_table_mutex);
  
  	ret = ibv_cmd_create_qp(pd, &qp->ibv_qp, attr, &cmd.ibv_cmd, sizeof cmd,
++#if !(defined(__SVR4) && defined(__sun))
  				&resp, sizeof resp);
-+#if defined(__SVR4) && defined(__sun)
+ 	if (ret)
+ 		goto err_rq_db;
+@@ -516,6 +885,70 @@
+ 	ret = mlx4_store_qp(to_mctx(pd->context), qp->ibv_qp.qp_num, qp);
  	if (ret)
+ 		goto err_destroy;
++#else
++				&resp.ibv_resp, sizeof resp);
++	if (ret)
 +		goto err_free;
 +
 +        /*
 +         * The kernel driver passes back mmap information for mapping the
 +         * QP work queue memory it allocated back into user space.
 +         */
-+        mdd = (mlnx_umap_qp_data_out_t *) &resp.drv_out;
-+	if (mdd->mqp_rev < 2) {
++	if (resp.mdd.mqp_rev < 2) {
 +		fprintf(stderr, PFX "libmlx4_create_qp: libmlx4/hermon umap "
-+				"rev mismatch (kernel rev=%d)\n", mdd->mqp_rev);
++		    "rev mismatch (kernel rev=%d)\n", resp.mdd.mqp_rev);
 +		goto err_destroy;
 +	}
-+	qpbuf = mmap64((void *)0, mdd->mqp_maplen, (PROT_READ | PROT_WRITE),
-+	                MAP_SHARED, pd->context->mmap_fd, mdd->mqp_mapoffset);
++	qpbuf = mmap64((void *)0, resp.mdd.mqp_maplen, (PROT_READ | PROT_WRITE),
++	    MAP_SHARED, pd->context->mmap_fd, resp.mdd.mqp_mapoffset);
 +
 +	if (qpbuf == MAP_FAILED)
 +		goto err_destroy;
@@ -704,13 +765,12 @@
 +	 * we'll call mlx4_free_buf() to umap.
 +	 */
 +	qp->buf.buf	= qpbuf;
-+	qp->buf.length	= mdd->mqp_maplen;
++	qp->buf.length	= resp.mdd.mqp_maplen;
 +
 +	if (!attr->srq && attr->qp_type != IBV_QPT_XRC) {
 +		qp->db = mlx4_alloc_db(to_mctx(pd->context),
-+		                       mdd->mqp_rdbr_mapoffset,
-+		                       mdd->mqp_rdbr_maplen,
-+		                       mdd->mqp_rdbr_offset);
++		    resp.mdd.mqp_rdbr_mapoffset, resp.mdd.mqp_rdbr_maplen,
++		    resp.mdd.mqp_rdbr_offset);
 +		if (qp->db == NULL)
 +			goto err_buf;
 +
@@ -725,36 +785,29 @@
 +	 *	      wqe.cnt also includes headroom wqes, the verbs count
 +	 *	      should reflect the wqe count that is usable.
 +	 */
-+	qp->sq_spare_wqes = mdd->mqp_sq_headroomwqes;
-+	qp->sq.wqe_cnt    = mdd->mqp_sq_numwqe;
++	qp->sq_spare_wqes = resp.mdd.mqp_sq_headroomwqes;
++	qp->sq.wqe_cnt    = resp.mdd.mqp_sq_numwqe;
 +
 +	if (attr->srq)
 +		qp->rq.wqe_cnt  = 0;
 +	else
-+		qp->rq.wqe_cnt  = mdd->mqp_rq_numwqe;
++		qp->rq.wqe_cnt  = resp.mdd.mqp_rq_numwqe;
 +
-+	if (mlx4_set_qp_buf(pd, qp, qpbuf, mdd->mqp_maplen,
-+	                    mdd->mqp_rq_wqesz, mdd->mqp_rq_off,
-+	                    mdd->mqp_sq_wqesz, mdd->mqp_sq_off))
- 		goto err_rq_db;
- 
++	if (mlx4_set_qp_buf(pd, qp, qpbuf, resp.mdd.mqp_maplen,
++	    resp.mdd.mqp_rq_wqesz, resp.mdd.mqp_rq_off,
++	    resp.mdd.mqp_sq_wqesz, resp.mdd.mqp_sq_off))
++		goto err_rq_db;
++
 +	mlx4_init_qp_indices(qp);
 +
- 	ret = mlx4_store_qp(to_mctx(pd->context), qp->ibv_qp.qp_num, qp);
- 	if (ret)
-+		goto err_rq_db;
-+#else
-+	if (ret)
-+		goto err_rq_db;
-+
 +	ret = mlx4_store_qp(to_mctx(pd->context), qp->ibv_qp.qp_num, qp);
 +	if (ret)
- 		goto err_destroy;
++		goto err_rq_db;
 +#endif
  	pthread_mutex_unlock(&to_mctx(pd->context)->qp_table_mutex);
  
  	qp->rq.wqe_cnt = attr->cap.max_recv_wr;
-@@ -536,9 +998,38 @@
+@@ -536,9 +969,38 @@
  
  	return &qp->ibv_qp;
  
@@ -793,7 +846,7 @@
  err_rq_db:
  	pthread_mutex_unlock(&to_mctx(pd->context)->qp_table_mutex);
  	if (!attr->srq && attr->qp_type != IBV_QPT_XRC)
-@@ -552,6 +1043,7 @@
+@@ -552,6 +1014,7 @@
  
  err:
  	free(qp);
@@ -801,7 +854,7 @@
  
  	return NULL;
  }
-@@ -745,6 +1237,13 @@
+@@ -745,6 +1208,13 @@
  				    struct ibv_cq *xrc_cq,
  				    struct ibv_srq_init_attr *attr)
  {
@@ -815,7 +868,7 @@
  	struct mlx4_create_xrc_srq  cmd;
  	struct mlx4_create_srq_resp resp;
  	struct mlx4_srq		   *srq;
-@@ -807,6 +1306,7 @@
+@@ -807,6 +1277,7 @@
  	free(srq);
  
  	return NULL;
@@ -836,14 +889,14 @@
  		ctrl->owner_opcode |= htonl((qp->sq.head & 0xffff) << 8);
  		*(uint32_t *) (&ctrl->vlan_tag) |= qp->doorbell_qpn;
  		/*
-@@ -589,6 +590,58 @@
+@@ -589,6 +590,59 @@
  		; /* nothing */
  }
  
 +#if defined(__SVR4) && defined(__sun)
 +int mlx4_set_qp_buf(struct ibv_pd *pd, struct mlx4_qp *qp, void *qpbuf,
-+                    uint64_t buflen, uint32_t rq_wqesz, uint32_t rq_off,
-+                    uint32_t sq_wqesz, uint32_t sq_off)
++    uint64_t buflen, uint32_t rq_wqesz, uint32_t rq_off,
++    uint32_t sq_wqesz, uint32_t sq_off)
 +{
 +	qp->buf.buf      = qpbuf;
 +	qp->buf.length   = buflen;
@@ -881,11 +934,12 @@
 +	}
 +
 +	if ((long int)qp->buf.length < (long int)qp->buf_size) {
-+		fprintf(stderr, PFX "QP kernel buffer size %d < user buf size %d\n",
-+		        qp->buf.length, qp->buf_size);
++		fprintf(stderr, PFX "QP kernel buffer size %lu < user buf "
++		    "size %d\n", (unsigned long)qp->buf.length, qp->buf_size);
 +	}
 +	if ((!rq_off && qp->rq.offset) || (!sq_off && qp->sq.offset)) {
-+		fprintf(stderr, PFX "QP kernel and user out of sync on buffer order\n");
++		fprintf(stderr, PFX "QP kernel and user out of sync on "
++		    "buffer order\n");
 +	}
 +
 +	memset(qp->buf.buf, 0, qp->buf_size);
@@ -1235,14 +1289,14 @@
  
  	context = calloc(1, sizeof *context);
  	if (!context)
-@@ -150,11 +160,30 @@
+@@ -150,11 +160,29 @@
  		return NULL;
  
  	context->ibv_ctx.cmd_fd = cmd_fd;
+-
 +#if defined(__SVR4) && defined(__sun)
 +	context->ibv_ctx.device = ibdev;
 +#endif
- 
  	if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd,
  				&resp.ibv_resp, sizeof resp))
  		goto err_free;
@@ -1266,7 +1320,7 @@
  	context->num_qps	= resp.qp_tab_size;
  	context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS;
  	context->qp_table_mask	= (1 << context->qp_table_shift) - 1;
-@@ -172,20 +201,44 @@
+@@ -172,20 +200,45 @@
  	for (i = 0; i < MLX4_XRC_SRQ_TABLE_SIZE; ++i)
  		context->xrc_srq_table[i].refcnt = 0;
  
@@ -1298,11 +1352,12 @@
 +		 * If kernel driver is supporting Blue Flame feature, map
 +		 * the Blue Flame user access region as well.
 +		 */
-+		uarpg_offset = (((off64_t) cur_pid << MLNX_UMAP_RSRC_TYPE_SHIFT) |
-+		                MLNX_UMAP_BLUEFLAMEPG_RSRC) * to_mdev(ibdev)->page_size;
++		uarpg_offset = (((off64_t) cur_pid << MLNX_UMAP_RSRC_TYPE_SHIFT)
++		    | MLNX_UMAP_BLUEFLAMEPG_RSRC) * to_mdev(ibdev)->page_size;
++
 +		context->bf_page = mmap64((void *)0, to_mdev(ibdev)->page_size,
-+					  PROT_WRITE, MAP_SHARED, context->ibv_ctx.mmap_fd,
-+					  uarpg_offset);
++		    PROT_WRITE, MAP_SHARED, context->ibv_ctx.mmap_fd,
++		    uarpg_offset);
 +#else
  		context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size,
  					PROT_WRITE, MAP_SHARED, cmd_fd,
--- a/components/open-fabrics/librdmacm/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/librdmacm/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -43,10 +43,6 @@
 	$(PROTOUSRBINDIR)/rdma_client\
 	$(PROTOUSRBINDIR)/$(MACH64)/rdma_server\
 	$(PROTOUSRBINDIR)/$(MACH64)/rdma_client\
-	$(PROTOUSRBINDIR)/$(MACH64)/mckey\
-	$(PROTOUSRBINDIR)/$(MACH64)/rping\
-	$(PROTOUSRBINDIR)/$(MACH64)/udaddy\
-	$(PROTOUSRBINDIR)/$(MACH64)/ucmatose\
 	$(PROTOUSRINCDIR)/infiniband/ib.h\
 	$(PROTOUSRINCDIR)/rdma/rdma_cma_abi.h\
 	$(PROTO_DIR)/$(CONFIGURE_LIBDIR.32)/$(COMPONENT_NAME).la\
@@ -55,6 +51,8 @@
 COMPONENT_PREP_ACTION = \
 	$(TOUCH) $(COMPONENT_SRC)/Makefile.in
 
+CONFIGURE_OPTIONS +=	--bindir=$(USRBINDIR)
+
 COMPONENT_POST_INSTALL_ACTION = \
 	$(RM) $(CLEANUP_FILES);
 
--- a/components/open-fabrics/ofed.mk	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/ofed.mk	Thu Oct 22 08:27:04 2015 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 # Since we are building these as a set and not packaging them individually at
@@ -27,11 +27,11 @@
 PROTO_DIR = $(WS_COMPONENTS)/open-fabrics/prototype/$(MACH)
 
 # OFED only builds with GCC
-COMPILER=gcc3
+COMPILER=gcc
 
-PATH=$(GCC3_ROOT)/bin:/usr/bin:/usr/gnu/bin
+PATH=$(GCC_ROOT)/bin:/usr/bin:/usr/gnu/bin
 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
-PATH=$(PARFAIT_TOOLS_GCC3):$(GCC3_ROOT)/bin:/usr/bin
+PATH=$(PARFAIT_TOOLS):$(GCC_ROOT)/bin:/usr/bin
 endif
 
 CPPFLAGS += "-Wformat=2"
--- a/components/open-fabrics/open-fabrics.p5m	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/open-fabrics.p5m	Thu Oct 22 08:27:04 2015 -0700
@@ -25,6 +25,9 @@
     value=pkg:/network/open-fabrics@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary \
     value="Oracle Solaris OpenFabrics userland libraries and applications"
+
+# This package name has known conflicts with other packages in the WOS
+set name=pkg.linted.pkglint.manifest004 value=true
 set name=info.classification \
     value="org.opensolaris.category.2008:System/Administration and Configuration"
 set name=info.source-url \
@@ -44,25 +47,23 @@
 set name=org.opensolaris.arc-caseid value=PSARC/2010/346
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 set name=variant.opensolaris.zone value=global value=nonglobal
-dir  path=etc
 file path=etc/libsdp.conf mode=0644 preserve=renameold
-dir  path=usr
 dir  path=usr/bin
 dir  path=usr/bin/$(MACH64)
-file path=usr/bin/$(MACH64)/ib_clock_test
-file path=usr/bin/$(MACH64)/ib_read_bw
-file path=usr/bin/$(MACH64)/ib_read_lat
-file path=usr/bin/$(MACH64)/ib_send_bw
-file path=usr/bin/$(MACH64)/ib_send_lat
-file path=usr/bin/$(MACH64)/ib_write_bw
-file path=usr/bin/$(MACH64)/ib_write_bw_postlist
-file path=usr/bin/$(MACH64)/ib_write_lat
-file path=usr/bin/$(MACH64)/qperf
-file path=usr/bin/$(MACH64)/rdma_bw
-file path=usr/bin/$(MACH64)/rdma_lat
-file path=usr/bin/$(MACH64)/rds-info
-file path=usr/bin/$(MACH64)/rds-ping
-file path=usr/bin/$(MACH64)/rds-stress
+link path=usr/bin/$(MACH64)/ib_clock_test target=../ib_clock_test
+link path=usr/bin/$(MACH64)/ib_read_bw target=../ib_read_bw
+link path=usr/bin/$(MACH64)/ib_read_lat target=../ib_read_lat
+link path=usr/bin/$(MACH64)/ib_send_bw target=../ib_send_bw
+link path=usr/bin/$(MACH64)/ib_send_lat target=../ib_send_lat
+link path=usr/bin/$(MACH64)/ib_write_bw target=../ib_write_bw
+link path=usr/bin/$(MACH64)/ib_write_bw_postlist target=../ib_write_bw_postlist
+link path=usr/bin/$(MACH64)/ib_write_lat target=../ib_write_lat
+link path=usr/bin/$(MACH64)/qperf target=../qperf
+link path=usr/bin/$(MACH64)/rdma_bw target=../rdma_bw
+link path=usr/bin/$(MACH64)/rdma_lat target=../rdma_lat
+link path=usr/bin/$(MACH64)/rds-info target=../rds-info
+link path=usr/bin/$(MACH64)/rds-ping target=../rds-ping
+link path=usr/bin/$(MACH64)/rds-stress target=../rds-stress
 file path=usr/bin/ib_clock_test
 file path=usr/bin/ib_read_bw
 file path=usr/bin/ib_read_lat
@@ -103,9 +104,57 @@
 file path=usr/include/rdma/rdma_verbs.h
 dir  path=usr/lib
 dir  path=usr/lib/$(MACH64)
+dir  path=usr/lib/$(MACH64)/ibdiagnet1.5.7
+file path=usr/lib/$(MACH64)/ibdiagnet1.5.7/git_version.tcl
+file path=usr/lib/$(MACH64)/ibdiagnet1.5.7/ibdebug.tcl
+file path=usr/lib/$(MACH64)/ibdiagnet1.5.7/ibdebug_if.tcl
+file path=usr/lib/$(MACH64)/ibdiagnet1.5.7/ibdiagnet.tcl
+file path=usr/lib/$(MACH64)/ibdiagnet1.5.7/pkgIndex.tcl
+dir  path=usr/lib/$(MACH64)/ibdm1.5.7
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Buffalo.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Buffalo8.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Cheetah.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Cougar.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Eagle.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/FullGnu.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Gazelle.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Gnu.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/IS4_NATIVE.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/IS5100.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/IS5200.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/IS5300.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/Lion.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/LionMini.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MIS5600.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS14400-48.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS14400-DDR.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS14400-IntraDDR.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS14400.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS2400-12T4.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS2400-24.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS3600.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/MTS3610.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/PartialGazelle.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/RhinoBased512.lst
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/RhinoBased512.no_sp2-3.lst
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/RhinoBased512.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SUNBQNEM48.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SUNDCS36QDR.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SUNDCS648QDR.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SUNDCS72QDR.ibnl
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SingleGazelle.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/SingleRhino.topo
+file path=usr/lib/$(MACH64)/ibdm1.5.7/ibnl/subnet.lst
+file path=usr/lib/$(MACH64)/ibdm1.5.7/libibdm.so.1.5.7
+file path=usr/lib/$(MACH64)/ibdm1.5.7/pkgIndex.tcl
+dir  path=usr/lib/$(MACH64)/ibis1.5.7
+file path=usr/lib/$(MACH64)/ibis1.5.7/libibis.so.1.5.7
+file path=usr/lib/$(MACH64)/ibis1.5.7/pkgIndex.tcl
 link path=usr/lib/$(MACH64)/libibmad.so target=libibmad.so.5.1.2
 link path=usr/lib/$(MACH64)/libibmad.so.5 target=libibmad.so.5.1.2
 file path=usr/lib/$(MACH64)/libibmad.so.5.1.2
+link path=usr/lib/$(MACH64)/libibnetdisc.so.5 target=libibnetdisc.so.5.0.1
+file path=usr/lib/$(MACH64)/libibnetdisc.so.5.0.1
 link path=usr/lib/$(MACH64)/libibumad.so target=libibumad.so.3.0.2
 link path=usr/lib/$(MACH64)/libibumad.so.3 target=libibumad.so.3.0.2
 file path=usr/lib/$(MACH64)/libibumad.so.3.0.2
@@ -123,7 +172,6 @@
 link path=usr/lib/$(MACH64)/librdmacm.so target=librdmacm.so.1.0.0
 link path=usr/lib/$(MACH64)/librdmacm.so.1 target=librdmacm.so.1.0.0
 file path=usr/lib/$(MACH64)/librdmacm.so.1.0.0
-dir  path=usr/lib/amd64
 dir  path=usr/lib/ibdiagnet1.5.7
 file path=usr/lib/ibdiagnet1.5.7/git_version.tcl
 file path=usr/lib/ibdiagnet1.5.7/ibdebug.tcl
@@ -208,54 +256,150 @@
 file path=usr/perl5/site_perl/5.12/sun4-solaris-64int/IBswcountlimits.pm \
     group=root mode=0444 variant.arch=sparc
 dir  path=usr/sbin
+dir  path=usr/sbin/$(MACH32)
+file path=usr/sbin/$(MACH32)/dump2psl.pl
+file path=usr/sbin/$(MACH32)/dump2slvl.pl
+file path=usr/sbin/$(MACH32)/ibaddr
+file path=usr/sbin/$(MACH32)/ibcheckerrors
+file path=usr/sbin/$(MACH32)/ibcheckerrs
+file path=usr/sbin/$(MACH32)/ibchecknet
+file path=usr/sbin/$(MACH32)/ibchecknode
+file path=usr/sbin/$(MACH32)/ibcheckport
+file path=usr/sbin/$(MACH32)/ibcheckportstate
+file path=usr/sbin/$(MACH32)/ibcheckportwidth
+file path=usr/sbin/$(MACH32)/ibcheckstate
+file path=usr/sbin/$(MACH32)/ibcheckwidth
+file path=usr/sbin/$(MACH32)/ibclearcounters
+file path=usr/sbin/$(MACH32)/ibclearerrors
+file path=usr/sbin/$(MACH32)/ibdatacounters
+file path=usr/sbin/$(MACH32)/ibdatacounts
+file path=usr/sbin/$(MACH32)/ibdiagnet
+file path=usr/sbin/$(MACH32)/ibdiscover.pl
+file path=usr/sbin/$(MACH32)/ibhosts
+file path=usr/sbin/$(MACH32)/ibis
+file path=usr/sbin/$(MACH32)/iblinkinfo
+file path=usr/sbin/$(MACH32)/iblinkinfo.pl
+file path=usr/sbin/$(MACH32)/ibnetdiscover
+file path=usr/sbin/$(MACH32)/ibnodes
+file path=usr/sbin/$(MACH32)/ibping
+file path=usr/sbin/$(MACH32)/ibportstate
+file path=usr/sbin/$(MACH32)/ibprintca.pl
+file path=usr/sbin/$(MACH32)/ibprintrt.pl
+file path=usr/sbin/$(MACH32)/ibprintswitch.pl
+file path=usr/sbin/$(MACH32)/ibqueryerrors
+file path=usr/sbin/$(MACH32)/ibqueryerrors.pl
+file path=usr/sbin/$(MACH32)/ibroute
+file path=usr/sbin/$(MACH32)/ibrouters
+file path=usr/sbin/$(MACH32)/ibstat
+file path=usr/sbin/$(MACH32)/ibstatus
+file path=usr/sbin/$(MACH32)/ibswitches
+file path=usr/sbin/$(MACH32)/ibswportwatch.pl
+file path=usr/sbin/$(MACH32)/ibsysstat
+file path=usr/sbin/$(MACH32)/ibtracert
+file path=usr/sbin/$(MACH32)/perfquery
+file path=usr/sbin/$(MACH32)/saquery
+file path=usr/sbin/$(MACH32)/set_nodedesc.sh variant.opensolaris.zone=global
+file path=usr/sbin/$(MACH32)/sminfo
+file path=usr/sbin/$(MACH32)/smpdump
+file path=usr/sbin/$(MACH32)/smpquery
+file path=usr/sbin/$(MACH32)/solaris_set_nodedesc \
+    variant.opensolaris.zone=global
 dir  path=usr/sbin/$(MACH64)
-file path=usr/sbin/dump2psl.pl
-file path=usr/sbin/dump2slvl.pl
-file path=usr/sbin/ibaddr
-file path=usr/sbin/ibcheckerrors
-file path=usr/sbin/ibcheckerrs
-file path=usr/sbin/ibchecknet
-file path=usr/sbin/ibchecknode
-file path=usr/sbin/ibcheckport
-file path=usr/sbin/ibcheckportstate
-file path=usr/sbin/ibcheckportwidth
-file path=usr/sbin/ibcheckstate
-file path=usr/sbin/ibcheckwidth
-file path=usr/sbin/ibclearcounters
-file path=usr/sbin/ibclearerrors
-file path=usr/sbin/ibdatacounters
-file path=usr/sbin/ibdatacounts
-file path=usr/sbin/ibdiagnet
-file path=usr/sbin/ibdiscover.pl
-file path=usr/sbin/ibhosts
-file path=usr/sbin/ibis
-file path=usr/sbin/iblinkinfo
-file path=usr/sbin/iblinkinfo.pl
-file path=usr/sbin/ibnetdiscover
-file path=usr/sbin/ibnodes
-file path=usr/sbin/ibping
-file path=usr/sbin/ibportstate
-file path=usr/sbin/ibprintca.pl
-file path=usr/sbin/ibprintrt.pl
-file path=usr/sbin/ibprintswitch.pl
-file path=usr/sbin/ibqueryerrors
-file path=usr/sbin/ibqueryerrors.pl
-file path=usr/sbin/ibroute
-file path=usr/sbin/ibrouters
-file path=usr/sbin/ibstat
-file path=usr/sbin/ibstatus
-file path=usr/sbin/ibswitches
-file path=usr/sbin/ibswportwatch.pl
-file path=usr/sbin/ibsysstat
-file path=usr/sbin/ibtracert
-file path=usr/sbin/perfquery
-file path=usr/sbin/saquery
-file path=usr/sbin/set_nodedesc.sh variant.opensolaris.zone=global
-file path=usr/sbin/sminfo
-file path=usr/sbin/smpdump
-file path=usr/sbin/smpquery
-file path=usr/sbin/solaris_set_nodedesc variant.opensolaris.zone=global
-dir  path=usr/share
+file path=usr/sbin/$(MACH64)/dump2psl.pl
+file path=usr/sbin/$(MACH64)/dump2slvl.pl
+file path=usr/sbin/$(MACH64)/ibaddr
+file path=usr/sbin/$(MACH64)/ibcheckerrors
+file path=usr/sbin/$(MACH64)/ibcheckerrs
+file path=usr/sbin/$(MACH64)/ibchecknet
+file path=usr/sbin/$(MACH64)/ibchecknode
+file path=usr/sbin/$(MACH64)/ibcheckport
+file path=usr/sbin/$(MACH64)/ibcheckportstate
+file path=usr/sbin/$(MACH64)/ibcheckportwidth
+file path=usr/sbin/$(MACH64)/ibcheckstate
+file path=usr/sbin/$(MACH64)/ibcheckwidth
+file path=usr/sbin/$(MACH64)/ibclearcounters
+file path=usr/sbin/$(MACH64)/ibclearerrors
+file path=usr/sbin/$(MACH64)/ibdatacounters
+file path=usr/sbin/$(MACH64)/ibdatacounts
+file path=usr/sbin/$(MACH64)/ibdiagnet
+file path=usr/sbin/$(MACH64)/ibdiscover.pl
+file path=usr/sbin/$(MACH64)/ibhosts
+file path=usr/sbin/$(MACH64)/ibis
+file path=usr/sbin/$(MACH64)/iblinkinfo
+file path=usr/sbin/$(MACH64)/iblinkinfo.pl
+file path=usr/sbin/$(MACH64)/ibnetdiscover
+file path=usr/sbin/$(MACH64)/ibnodes
+file path=usr/sbin/$(MACH64)/ibping
+file path=usr/sbin/$(MACH64)/ibportstate
+file path=usr/sbin/$(MACH64)/ibprintca.pl
+file path=usr/sbin/$(MACH64)/ibprintrt.pl
+file path=usr/sbin/$(MACH64)/ibprintswitch.pl
+file path=usr/sbin/$(MACH64)/ibqueryerrors
+file path=usr/sbin/$(MACH64)/ibqueryerrors.pl
+file path=usr/sbin/$(MACH64)/ibroute
+file path=usr/sbin/$(MACH64)/ibrouters
+file path=usr/sbin/$(MACH64)/ibstat
+file path=usr/sbin/$(MACH64)/ibstatus
+file path=usr/sbin/$(MACH64)/ibswitches
+file path=usr/sbin/$(MACH64)/ibswportwatch.pl
+file path=usr/sbin/$(MACH64)/ibsysstat
+file path=usr/sbin/$(MACH64)/ibtracert
+file path=usr/sbin/$(MACH64)/perfquery
+file path=usr/sbin/$(MACH64)/saquery
+file path=usr/sbin/$(MACH64)/set_nodedesc.sh variant.opensolaris.zone=global
+file path=usr/sbin/$(MACH64)/sminfo
+file path=usr/sbin/$(MACH64)/smpdump
+file path=usr/sbin/$(MACH64)/smpquery
+file path=usr/sbin/$(MACH64)/solaris_set_nodedesc \
+    variant.opensolaris.zone=global
+link path=usr/sbin/dump2psl.pl target=$(MACH64)/dump2psl.pl
+link path=usr/sbin/dump2slvl.pl target=$(MACH64)/dump2slvl.pl
+link path=usr/sbin/ibaddr target=$(MACH64)/ibaddr
+link path=usr/sbin/ibcheckerrors target=$(MACH64)/ibcheckerrors
+link path=usr/sbin/ibcheckerrs target=$(MACH64)/ibcheckerrs
+link path=usr/sbin/ibchecknet target=$(MACH64)/ibchecknet
+link path=usr/sbin/ibchecknode target=$(MACH64)/ibchecknode
+link path=usr/sbin/ibcheckport target=$(MACH64)/ibcheckport
+link path=usr/sbin/ibcheckportstate target=$(MACH64)/ibcheckportstate
+link path=usr/sbin/ibcheckportwidth target=$(MACH64)/ibcheckportwidth
+link path=usr/sbin/ibcheckstate target=$(MACH64)/ibcheckstate
+link path=usr/sbin/ibcheckwidth target=$(MACH64)/ibcheckwidth
+link path=usr/sbin/ibclearcounters target=$(MACH64)/ibclearcounters
+link path=usr/sbin/ibclearerrors target=$(MACH64)/ibclearerrors
+link path=usr/sbin/ibdatacounters target=$(MACH64)/ibdatacounters
+link path=usr/sbin/ibdatacounts target=$(MACH64)/ibdatacounts
+link path=usr/sbin/ibdiagnet target=$(MACH64)/ibdiagnet
+link path=usr/sbin/ibdiscover.pl target=$(MACH64)/ibdiscover.pl
+link path=usr/sbin/ibhosts target=$(MACH64)/ibhosts
+link path=usr/sbin/ibis target=$(MACH64)/ibis
+link path=usr/sbin/iblinkinfo target=$(MACH64)/iblinkinfo
+link path=usr/sbin/iblinkinfo.pl target=$(MACH64)/iblinkinfo.pl
+link path=usr/sbin/ibnetdiscover target=$(MACH64)/ibnetdiscover
+link path=usr/sbin/ibnodes target=$(MACH64)/ibnodes
+link path=usr/sbin/ibping target=$(MACH64)/ibping
+link path=usr/sbin/ibportstate target=$(MACH64)/ibportstate
+link path=usr/sbin/ibprintca.pl target=$(MACH64)/ibprintca.pl
+link path=usr/sbin/ibprintrt.pl target=$(MACH64)/ibprintrt.pl
+link path=usr/sbin/ibprintswitch.pl target=$(MACH64)/ibprintswitch.pl
+link path=usr/sbin/ibqueryerrors target=$(MACH64)/ibqueryerrors
+link path=usr/sbin/ibqueryerrors.pl target=$(MACH64)/ibqueryerrors.pl
+link path=usr/sbin/ibroute target=$(MACH64)/ibroute
+link path=usr/sbin/ibrouters target=$(MACH64)/ibrouters
+link path=usr/sbin/ibstat target=$(MACH64)/ibstat
+link path=usr/sbin/ibstatus target=$(MACH64)/ibstatus
+link path=usr/sbin/ibswitches target=$(MACH64)/ibswitches
+link path=usr/sbin/ibswportwatch.pl target=$(MACH64)/ibswportwatch.pl
+link path=usr/sbin/ibsysstat target=$(MACH64)/ibsysstat
+link path=usr/sbin/ibtracert target=$(MACH64)/ibtracert
+link path=usr/sbin/perfquery target=$(MACH64)/perfquery
+link path=usr/sbin/saquery target=$(MACH64)/saquery
+link path=usr/sbin/set_nodedesc.sh target=$(MACH64)/set_nodedesc.sh
+link path=usr/sbin/sminfo target=$(MACH64)/sminfo
+link path=usr/sbin/smpdump target=$(MACH64)/smpdump
+link path=usr/sbin/smpdump target=$(MACH64)/smpdump
+link path=usr/sbin/smpquery target=$(MACH64)/smpquery
+link path=usr/sbin/smpquery target=$(MACH64)/smpquery
+link path=usr/sbin/solaris_set_nodedesc target=$(MACH64)/solaris_set_nodedesc
 dir  path=usr/share/libibverbs.d
 file path=usr/share/libibverbs.d/mlx4.driver
 dir  path=usr/share/man
@@ -419,6 +563,8 @@
 dir  path=usr/share/man/man7
 file path=usr/share/man/man7/rdma_cm.7
 file path=usr/share/man/man7/verbs.7
+
+
 legacy pkg=SUNWofusr \
     desc="Oracle Solaris OpenFabrics userland libraries and applications" \
     name="Oracle Solaris OpenFabrics userland libraries and applications"
--- a/components/open-fabrics/perftest/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/perftest/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -30,11 +30,6 @@
     sha256:164d32753ab87ba3152c84f69bf16bb592d77b922e66e753bd9ad0e229675793
 COMPONENT_ARCHIVE_URL=	http://www.openfabrics.org/downloads/perftest/$(COMPONENT_ARCHIVE)
 
-$(BUILD_32):	BITS=32
-$(BUILD_64):	BITS=64
-$(INSTALL_32):	BITS=32
-$(INSTALL_64):	BITS=64
-
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
 include ../ofed.mk
@@ -52,11 +47,13 @@
 LDFLAGS +=	-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))
 CFLAGS +=	$(SHARED_INCLUDES)
 
+CONFIGURE_OPTIONS +=	--bindir=$(USRBINDIR)
+
 COMMON_ARGS  +=	CC="$(CC)"
 COMMON_ARGS  +=	CFLAGS="$(CFLAGS)"
 COMMON_ARGS  +=	LDFLAGS="$(LDFLAGS) $(LIBS)"
 COMMON_ARGS  +=	INSTALL=$(INSTALL)
-COMMON_ARGS  +=  BINDIR=$(CONFIGURE_BINDIR.$(BITS))
+COMMON_ARGS  +=  BINDIR=$(CONFIGURE_BINDIR)/usr/bin
 COMPONENT_BUILD_ARGS  +=	$(COMMON_ARGS)
 COMPONENT_INSTALL_ARGS  +=	$(COMMON_ARGS)
 
--- a/components/open-fabrics/perftest/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/perftest/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -1441,13 +1441,16 @@
      // Client.
      if (params->machine == CLIENT) {
  		if (ctx_write_keys(my_dest,params)) {
-@@ -904,6 +921,18 @@
+@@ -904,6 +921,21 @@
  			return -1;
  		}
      }
-+    // We could have tavor at one end and hermon at the other.
-+    // To avoid a modify QP error set max_rd_atomic to lowest
-+    // on either side of connection.
++
++    /*
++     * If we have different HCA's at either end of the connection with
++     * different RDMA attributes, then to avoid a modify QP error set
++     * max_rd_atomic to lowest on either side of connection.
++     */
 +    if (rem_dest->out_reads > my_dest->out_reads)
 +	temp_reads =  my_dest->out_reads;
 +
@@ -1604,16 +1607,17 @@
 diff -r -u /tmp/perftest-1.3.0/send_bw.c perftest-1.3.0/send_bw.c
 --- /tmp/perftest-1.3.0/send_bw.c	Thu Jan 20 07:37:18 2011
 +++ perftest-1.3.0/send_bw.c	Fri Feb 11 04:12:47 2011
-@@ -320,7 +320,7 @@
+@@ -320,9 +320,6 @@
  		user_parm->size = MTU_SIZE(user_parm->curr_mtu);
  	}
  
 -	if (is_dev_hermon(ctx->context) != NOT_HERMON && user_parm->inline_size != 0)
-+	if (is_dev_hermon(ctx->context) == NOT_HERMON && user_parm->inline_size != 0)
- 		user_parm->inline_size = 0;
+-		user_parm->inline_size = 0;
+-
+ 	printf(" Inline data is used up to %d bytes message\n", user_parm->inline_size);
  
- 	printf(" Inline data is used up to %d bytes message\n", user_parm->inline_size);
-@@ -649,7 +649,11 @@
+ 	ctx->size = user_parm->size;
+@@ -649,7 +646,11 @@
  			}
  	}
  
@@ -1768,16 +1772,17 @@
  #include <time.h>
  #include <infiniband/verbs.h>
  
-@@ -224,7 +225,7 @@
+@@ -224,9 +225,6 @@
  		return NULL;
  	}
  
 -	if (is_dev_hermon(ctx->context) != NOT_HERMON && user_parm->inline_size != 0)
-+	if (is_dev_hermon(ctx->context) == NOT_HERMON && user_parm->inline_size != 0)
- 		user_parm->inline_size = 0;
+-		user_parm->inline_size = 0;
+-
+ 	printf(" Inline data is used up to %d bytes message\n", user_parm->inline_size);
  
- 	printf(" Inline data is used up to %d bytes message\n", user_parm->inline_size);
-@@ -368,7 +369,6 @@
+ 	ctx->pd = ibv_alloc_pd(ctx->context);
+@@ -368,7 +366,6 @@
  	cycles_t t;
  	int iters = user_param->iters;
  
@@ -1785,7 +1790,7 @@
  	opt_delta = tcompleted[opt_posted] - tposted[opt_completed];
  
  	if (user_param->noPeak == OFF) {
-@@ -384,7 +384,11 @@
+@@ -384,7 +381,11 @@
  		  }
  	}
  	
--- a/components/open-fabrics/qperf/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/qperf/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -36,6 +36,8 @@
 
 LIBS +=         -lsocket -lnsl -lkstat -lrdmacm -libverbs
 
+CONFIGURE_OPTIONS +=	--bindir=$(USRBINDIR)
+
 COMPONENT_INSTALL_ENV +=	INSTALL="$(INSTALL) -m 755"
 
 COMPONENT_PRE_CONFIGURE_ACTION = \
--- a/components/open-fabrics/qperf/patches/base.patch	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/qperf/patches/base.patch	Thu Oct 22 08:27:04 2015 -0700
@@ -1,3 +1,6 @@
+# This patch was developed both in-house and from outside. We plan to submit it
+# upstream, but do not yet have a target date for doing so
+#
 diff -r -u /tmp/730054/qperf-0.4.6/src/socket.c qperf-0.4.6/src/socket.c
 --- /tmp/730054/qperf-0.4.6/src/socket.c	Mon Aug 31 00:00:40 2009
 +++ qperf-0.4.6/src/socket.c	Mon Nov  8 11:10:20 2010
@@ -47,7 +50,28 @@
  /*
   * Configurable parameters.  If your change makes this version of qperf
   * incompatible with previous versions (usually a change to the Req structure),
-@@ -224,7 +234,9 @@
+@@ -165,6 +175,10 @@
+     char        qperf[STRSIZE];         /* Qperf version */
+ } CONF;
+ 
++char *t_bits[] ={ "bits/sec", "Kb/sec", "Mb/sec", "Gb/sec", "Tb/sec" };
++int s_bits = cardof(t_bits);
++char *t_bytes[] ={ "bytes/sec", "KB/sec", "MB/sec", "GB/sec", "TB/sec" };
++int s_bytes = cardof(t_bytes);
+ 
+ /*
+  * Function prototypes.
+@@ -177,7 +191,9 @@
+ static void      calc_node(RESN *resn, STAT *stat);
+ static void      calc_results(void);
+ static void      client(TEST *test);
++#if !(defined(__SVR4) && defined(__sun))
+ static int       cmpsub(char *s2, char *s1);
++#endif
+ static char     *commify(char *data);
+ static void      dec_req_data(REQ *host);
+ static void      dec_req_version(REQ *host);
+@@ -224,7 +240,9 @@
  static void      sig_alrm(int signo, siginfo_t *siginfo, void *ucontext);
  static void      sig_quit(int signo, siginfo_t *siginfo, void *ucontext);
  static void      sig_urg(int signo, siginfo_t *siginfo, void *ucontext);
@@ -58,7 +82,7 @@
  static void      start_test_timer(int seconds);
  static long      str_size(char *arg, char *str);
  static void      strncopy(char *d, char *s, int n);
-@@ -257,7 +269,9 @@
+@@ -257,9 +275,11 @@
  static STAT     IStat;
  static int      ListenFD;
  static LOOP    *Loops;
@@ -66,9 +90,21 @@
  static int      ProcStatFD;
 +#endif
  static STAT     RStat;
- static int      ShowIndex;
+-static int      ShowIndex;
++volatile static int      ShowIndex = 0;
  static SHOW     ShowTable[256];
-@@ -601,6 +615,9 @@
+ static int      UnifyUnits;
+ static int      UnifyNodes;
+@@ -281,7 +301,7 @@
+ int          ServerAddrLen;
+ int          RemoteFD;
+ int          Debug;
+-volatile int Finished;
++volatile int Finished = 0;
+ 
+ 
+ /*
+@@ -601,6 +621,9 @@
      initialize();
      set_signals();
      do_args(&argv[1]);
@@ -78,7 +114,7 @@
      return 0;
  }
  
-@@ -617,14 +634,19 @@
+@@ -617,14 +640,19 @@
      for (i = 0; i < P_N; ++i)
          if (ParInfo[i].index != i)
              error(BUG, "initialize: ParInfo: out of order: %d", i);
@@ -98,7 +134,7 @@
  /*
   * Look for a colon and skip past it and any spaces.
   */
-@@ -643,6 +665,7 @@
+@@ -643,6 +671,7 @@
          s++;
      return s;
  }
@@ -106,7 +142,23 @@
  
  
  /*
-@@ -1667,13 +1690,18 @@
+@@ -649,6 +678,7 @@
+  * A case insensitive string compare.  s2 must at least contain all of s1 but
+  * can be longer.
+  */
++#if !(defined(__SVR4) && defined(__sun))
+ static int
+ cmpsub(char *s2, char *s1)
+ {
+@@ -664,6 +694,7 @@
+             return 0;
+     }
+ }
++#endif
+ 
+ 
+ /*
+@@ -1667,13 +1698,18 @@
  {
      char count[STRSIZE];
      char speed[STRSIZE];
@@ -127,7 +179,7 @@
      if (!fp)
          error(0, "cannot open /proc/cpuinfo");
      cpu[0] = '\0';
-@@ -1732,6 +1760,7 @@
+@@ -1732,6 +1768,7 @@
  
      /* CPU speed */
      speed[0] = '\0';
@@ -135,7 +187,7 @@
      if (!mixed) {
          int n = strlen(cpu);
          if (n < 3 || cpu[n-2] != 'H' || cpu[n-1] != 'z') {
-@@ -1745,7 +1774,24 @@
+@@ -1745,7 +1782,24 @@
              }
          }
      }
@@ -160,7 +212,80 @@
      /* Number of CPUs */
      if (cpus == 1)
          count[0] = '\0';
-@@ -2615,14 +2661,20 @@
+@@ -1776,11 +1830,10 @@
+ static void
+ run_server_quit(void)
+ {
+-    int z;
+     char buf[1];
+ 
+     sync_test();
+-    z = read(RemoteFD, buf, sizeof(buf));
++    (void)read(RemoteFD, buf, sizeof(buf));
+     kill(getppid(), SIGQUIT);
+     exit(0);
+ }
+@@ -2296,6 +2349,7 @@
+     char *tab[] ={ "ns/GB", "us/GB", "ms/GB", "sec/GB" };
+ 
+     value *=  1E9;
++
+     if (!verbose(type, value))
+         return;
+     if (!UnifyUnits) {
+@@ -2371,21 +2425,20 @@
+ view_band(int type, char *pref, char *name, double value)
+ {
+     int n, s;
+-    char **tab;
+-
++    char **tab, **t;
++    n = s = 0; 
+     if (!verbose(type, value))
+         return;
+     if (UseBitsPerSec) {
+-        char *t[] ={ "bits/sec", "Kb/sec", "Mb/sec", "Gb/sec", "Tb/sec" };
+-        s = cardof(t);
++        t=&t_bits[0];
++        s = s_bits;
+         tab = t;
+         value *= 8;
+     } else {
+-        char *t[] ={ "bytes/sec", "KB/sec", "MB/sec", "GB/sec", "TB/sec" };
+-        s = cardof(t);
++        t=&t_bytes[0];
++        s = s_bytes; 
+         tab = t;
+     }
+-
+     n = 0;
+     if (!UnifyUnits) {
+         while (value >= 1000 && n < s-1) {
+@@ -2515,10 +2568,13 @@
+ static void
+ place_val(char *pref, char *name, char *unit, double value)
+ {
+-    char *data = qasprintf("%.0f", value);
+-    char *p    = data;
++    char *data;
++    char *p;
+     int   n    = Precision;
+ 
++
++    data = qasprintf("%.0f", value);
++    p = data;
+     if (*p == '-')
+         ++p;
+     while (isdigit(*p++))
+@@ -2570,6 +2626,7 @@
+     for (i = 0; i < ShowIndex; ++i) {
+         int n;
+         SHOW *show = &ShowTable[i];
++
+         n = (show->pref ? strlen(show->pref) : 0) + strlen(show->name);
+         if (n > nameLen)
+             nameLen = n;
+@@ -2615,14 +2672,20 @@
  static void
  set_affinity(void)
  {
@@ -181,7 +306,7 @@
          error(SYS, "cannot set processor affinity (cpu %d)", a-1);
  }
  
-@@ -2771,9 +2823,36 @@
+@@ -2771,9 +2834,36 @@
  /*
   * Get various temporal parameters.
   */
@@ -218,7 +343,7 @@
      int n;
      char *p;
      char buf[BUFSIZE];
-@@ -2802,6 +2881,7 @@
+@@ -2802,6 +2892,7 @@
      while (n < T_N)
          timex[n++] = 0;
  }
@@ -411,6 +536,19 @@
  }
  
  
+@@ -1599,11 +1652,11 @@
+         ibv_destroy_ah(dev->ah);
+     if (dev->cq)
+         ibv_destroy_cq(dev->cq);
++    rd_mrfree(dev);
+     if (dev->pd)
+         ibv_dealloc_pd(dev->pd);
+     if (dev->channel)
+         ibv_destroy_comp_channel(dev->channel);
+-    rd_mrfree(dev);
+ 
+     if (!Req.use_cm)
+         ib_close2(dev);
 @@ -1864,10 +1917,16 @@
          error(0, "rdma_bind_addr failed");
      port = ntohs(rdma_get_src_port(cm->id));
@@ -428,6 +566,36 @@
      cm_expect_event(dev, RDMA_CM_EVENT_CONNECT_REQUEST);
      rd_create_qp(dev, cm->event->id->verbs, cm->event->id);
  
+@@ -2012,7 +2071,7 @@
+         char *p = index(Req.id, ':');
+ 
+         if (p) {
+-            *p++ = '\0';
++            p++;
+             port = atoi(p);
+             if (port < 1)
+                 error(0, "bad IB port: %d; must be at least 1", port);
+@@ -2050,10 +2109,18 @@
+             device = *dev->ib.devlist;
+         else {
+             struct ibv_device **d = dev->ib.devlist;
+-            while ((device = *d++))
+-                if (streq(ibv_get_device_name(device), name))
++            size_t n = strlen(name);
++            char *p = index(Req.id, ':');
++            if (p) {
++                n = p - Req.id;
++            }
++            while ((device = *d++)) {
++                if (streqn(ibv_get_device_name(device), name, n)) {
+                     break;
++                }
++            }
+         }
++
+         if (!device)
+             error(SYS, "failed to find InfiniBand device");
+         dev->ib.context = ibv_open_device(device);
 diff -r -u /tmp/730054/qperf-0.4.6/src/rds.c qperf-0.4.6/src/rds.c
 --- /tmp/730054/qperf-0.4.6/src/rds.c	Mon Aug 31 00:00:40 2009
 +++ qperf-0.4.6/src/rds.c	Mon Nov  8 11:10:19 2010
@@ -514,7 +682,15 @@
 diff -r -u /tmp/730054/qperf-0.4.6/src/qperf.h qperf-0.4.6/src/qperf.h
 --- /tmp/730054/qperf-0.4.6/src/qperf.h	Mon Aug 31 00:00:40 2009
 +++ qperf-0.4.6/src/qperf.h	Tue Oct 18 16:40:59 2011
-@@ -193,6 +193,7 @@
+@@ -49,6 +49,7 @@
+ #define cardof(a)       (sizeof(a)/sizeof(*a))
+ #define endof(a)        (&a[cardof(a)])
+ #define streq(a, b)     (strcmp(a, b) == 0)
++#define streqn(a, b, n)	(strncmp(a, b, n) == 0)
+ #define offset(t, e)    ((long)&((t *)0)->e)
+ #define is_client()     (ServerName != 0)
+ #define is_sender()     (Req.flip ? !is_client() : is_client())
+@@ -193,6 +194,7 @@
      uint32_t    no_cpus;                /* Number of processors */
      uint32_t    no_ticks;               /* Ticks per second */
      uint32_t    max_cqes;               /* Maximum CQ entries */
@@ -522,3 +698,87 @@
      CLOCK       time_s[T_N];            /* Start times */
      CLOCK       time_e[T_N];            /* End times */
      USTAT       s;                      /* Send statistics */
+diff -r -u /tmp/730054/qperf-0.4.6/src/support.c qperf-0.4.6/src/support.c
+--- /tmp/730054/qperf-0.4.6/src/support.c	Mon Aug 31 00:00:40 2009
++++ qperf-0.4.6/src/support.c	Mon Jun  8 15:01:41 2015
+@@ -212,18 +212,17 @@
+ void
+ touch_data(void *p, int n)
+ {
+-    uint64_t a;
+     volatile uint64_t *p64 = p;
+ 
+     while (n >= sizeof(*p64)) {
+-        a = *p64++;
+         n -= sizeof(*p64);
++	*p64++;
+     }
+     if (n) {
+         volatile uint8_t *p8 = (uint8_t *)p64;
+         while (n >= sizeof(*p8)) {
+-            a = *p8++;
+             n -= sizeof(*p8);
++	    *p8++;
+         }
+     }
+ }
+@@ -419,7 +418,6 @@
+ void
+ urgent(void)
+ {
+-    int z;
+     char *p, *q;
+     char buffer[256];
+ 
+@@ -471,7 +469,7 @@
+             remote_failure_error();
+         if (s)
+             break;
+-        z = read(RemoteFD, p, q-p);
++        (void)read(RemoteFD, p, q-p);
+     }
+ 
+     while (p < q) {
+@@ -484,7 +482,7 @@
+     timeout_end();
+ 
+     buf_end(&p, q);
+-    z = write(2, buffer, p+1-buffer);
++    (void)write(2, buffer, p+1-buffer);
+     die();
+ }
+ 
+@@ -505,7 +503,6 @@
+ static void
+ remote_failure_error(void)
+ {
+-    int z;
+     char buffer[256];
+     char *p = buffer;
+     char *q = p + sizeof(buffer);
+@@ -513,7 +510,7 @@
+     buf_app(&p, q, remote_name());
+     buf_app(&p, q, " failure");
+     buf_end(&p, q);
+-    z = write(2, buffer, p+1-buffer);
++    (void)write(2, buffer, p+1-buffer);
+     die();
+ }
+ 
+@@ -539,7 +536,6 @@
+ int
+ error(int actions, char *fmt, ...)
+ {
+-    int z;
+     va_list alist;
+     char buffer[256];
+     char *p = buffer;
+@@ -561,7 +557,7 @@
+ 
+     if (RemoteFD >= 0) {
+         send(RemoteFD, "?", 1, MSG_OOB);
+-        z = write(RemoteFD, buffer, p-buffer);
++        (void)write(RemoteFD, buffer, p-buffer);
+         shutdown(RemoteFD, SHUT_WR);
+         timeout_set(ERROR_TIMEOUT, sig_alrm_die);
+         while (read(RemoteFD, buffer, sizeof(buffer)) > 0)
--- a/components/open-fabrics/rds-tools/Makefile	Wed Oct 21 17:52:53 2015 -0700
+++ b/components/open-fabrics/rds-tools/Makefile	Thu Oct 22 08:27:04 2015 -0700
@@ -39,9 +39,9 @@
 
 LIBS +=	-lsocket -lnsl -llgrp -lkstat -libverbs
 
+CONFIGURE_OPTIONS +=	--bindir=$(USRBINDIR)
+
 COMPONENT_PREP_ACTION = \
-	mkdir -p $(PROTO_DIR)/usr/include/sys ; \
-	cp rds.h $(PROTO_DIR)/usr/include/sys/ ; \
 	cp rds-vendor.c $(@D)/
 
 CLEANUP_DIRS =	$(PROTOUSRBINDIR)/net