[Pkg-ofed-commits] [infiniband-diags] 01/17: New upstream version 1.6.7
Ana Beatriz Guerrero López
ana at moszumanska.debian.org
Sun Sep 4 20:44:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
ana pushed a commit to branch master
in repository infiniband-diags.
commit 01766265cad895a257a25bc54391d1462191bddf
Author: Ana Beatriz Guerrero Lopez <ana at debian.org>
Date: Sun Sep 4 15:07:01 2016 +0200
New upstream version 1.6.7
---
ChangeLog | 214 +++++++++++++++++++++++++++++++++++++++++++
Makefile.am | 4 +
Makefile.in | 34 ++++---
README | 53 ++++-------
configure | 147 ++++++++++++++++++++++++++---
configure.ac | 27 +++++-
etc/rdma-ndd.service | 12 +++
etc/rdma-ndd.service.in | 12 +++
include/ibdiag_common.h | 2 +-
include/ibdiag_version.h | 2 +-
infiniband-diags.spec | 36 ++++----
infiniband-diags.spec.in | 32 +++----
libibnetdisc/Makefile.in | 5 +
libibnetdisc/src/ibnetdisc.c | 2 +-
src/ibcacheedit.c | 6 +-
src/ibdiag_common.c | 4 +-
src/ibportstate.c | 22 ++---
src/ibqueryerrors.c | 12 +--
src/ibsendtrap.c | 5 +-
src/saquery.c | 7 +-
src/smpquery.c | 2 +-
src/vendstat.c | 1 +
22 files changed, 515 insertions(+), 126 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e547c7d..b1278f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,51 @@
** Version: HEAD
+Wed Jul 27 00:52:36 2016 -0400 Ira Weiny
+2937cf99350a2e423b705e8b8dd10499796a7b41
+
+ * update README/configure.ac for 1.6.7
+
+Sun May 15 01:40:08 2016 -0400 Ira Weiny
+1f2f062792e79140facec91add31f1f9f0d85f10
+
+ * rdma-ndd: Add systemd support
+
+Fri May 27 17:01:13 2016 -0400 Vladimir Koushnir
+846b31ce7eb93c672d99e389d011245bab58611c
+
+ * infiniband-diags: Add Switch-IB2 support to device white lists
+
+Tue Apr 5 08:53:05 2016 -0400 Dan Ben Yosef
+0005d2a088d10e0ac0c3d9de6c4bd5f7026298e0
+
+ * saquery.c: Fix changing qos_class flag value to network order twice
+
+Tue Nov 10 13:23:39 2015 +0200 Hal Rosenstock
+b2cfed87401983eff35cc4135f5125eb67f60db5
+
+ * ibsendtrap.c: Eliminate unused parameter from send_trap
+
+Tue Nov 10 13:23:01 2015 +0200 Hal Rosenstock
+eb3e44032628df33b69351f880f985f38c85d25b
+
+ * ibportstate.c: Fix unsigned comparison warnings
+
+Tue Nov 10 13:22:51 2015 +0200 Hal Rosenstock
+68f8a250102b16a2b57144984d617dfd0400261f
+
+ * Remove unused pisize parameter from dump_portinfo in ibdiag_common
+
+Tue Oct 13 08:38:20 2015 -0400 Hal Rosenstock
+c17f74b265c0a547f34ef4019dfced74d7a6c0f9
+
+ * ibqueryerrors.c: Removed unused passed parameters to print_port_config and query_and_dump
+
+Tue Oct 13 08:38:02 2015 -0400 Hal Rosenstock
+3552aa5036ccb3edfb618cac81522b229bc97d00
+
+ * ibcacheedit.c: Eliminate unused parameter passed to update_switchportguids
+
Mon Oct 12 23:27:34 2015 -0400 Ira Weiny
275cc40ec83956755356eae55ee64dbf85699aec
@@ -3444,6 +3489,175 @@ Sun May 11 15:37:11 2008 +0300 Yevgeny Kliteynik
* infiniband-diags/Makefile.am: fix location of ibdiag_version.h
+** Version: 1.6.7
+
+Wed Jul 27 00:52:36 2016 -0400 Ira Weiny
+2937cf99350a2e423b705e8b8dd10499796a7b41
+
+ * update README/configure.ac for 1.6.7
+
+Sun May 15 01:40:08 2016 -0400 Ira Weiny
+1f2f062792e79140facec91add31f1f9f0d85f10
+
+ * rdma-ndd: Add systemd support
+
+Fri May 27 17:01:13 2016 -0400 Vladimir Koushnir
+846b31ce7eb93c672d99e389d011245bab58611c
+
+ * infiniband-diags: Add Switch-IB2 support to device white lists
+
+Tue Apr 5 08:53:05 2016 -0400 Dan Ben Yosef
+0005d2a088d10e0ac0c3d9de6c4bd5f7026298e0
+
+ * saquery.c: Fix changing qos_class flag value to network order twice
+
+Tue Nov 10 13:23:39 2015 +0200 Hal Rosenstock
+b2cfed87401983eff35cc4135f5125eb67f60db5
+
+ * ibsendtrap.c: Eliminate unused parameter from send_trap
+
+Tue Nov 10 13:23:01 2015 +0200 Hal Rosenstock
+eb3e44032628df33b69351f880f985f38c85d25b
+
+ * ibportstate.c: Fix unsigned comparison warnings
+
+Tue Nov 10 13:22:51 2015 +0200 Hal Rosenstock
+68f8a250102b16a2b57144984d617dfd0400261f
+
+ * Remove unused pisize parameter from dump_portinfo in ibdiag_common
+
+Tue Oct 13 08:38:20 2015 -0400 Hal Rosenstock
+c17f74b265c0a547f34ef4019dfced74d7a6c0f9
+
+ * ibqueryerrors.c: Removed unused passed parameters to print_port_config and query_and_dump
+
+Tue Oct 13 08:38:02 2015 -0400 Hal Rosenstock
+3552aa5036ccb3edfb618cac81522b229bc97d00
+
+ * ibcacheedit.c: Eliminate unused parameter passed to update_switchportguids
+
+** Version: 1.6.6
+
+Mon Oct 12 23:27:34 2015 -0400 Ira Weiny
+275cc40ec83956755356eae55ee64dbf85699aec
+
+ * update README/configure.ac for 1.6.6
+
+Wed Sep 30 08:53:51 2015 -0400 Dan Ben Yosef
+d64fcf4a3d0ae20fbf497b5605cb8071e334069d
+
+ * libibnetdisc: Avoid pushing same pointer to the hash table
+
+Mon Oct 12 08:30:31 2015 -0400 Hal Rosenstock
+bcdc2151bad1db24e7d96ac896d57a65c7f40cfc
+
+ * perfquery.c: Fix smp_query_via return value checks
+
+Mon Oct 12 08:31:23 2015 -0400 Hal Rosenstock
+0cd6d05da6a6d3b679535c38a64c9600378de076
+
+ * ibdiag_common.c: Move static to beginning of get_build_version declaration
+
+Thu Sep 10 19:26:08 2015 -0400 Ira Weiny
+14f19aae87a59ef0df30585a7b0c3f6bea7eb274
+
+ * infiniband-diags: rdma-ndd: remove udev logging when not supported
+
+Mon Aug 31 10:49:04 2015 +0300 Dan Ben Yosef
+3f1aed48b0fc27df9615d89399edd0ac623b2017
+
+ * perfquery -T (print Extended Speed Counters) times out on nodes supporting RS_FEC capability.
+
+Wed Sep 9 14:29:38 2015 +0300 Vladimir Koushnir
+1a1565006b2a2996fcac4a117d7ffc9ebc3a1b7d
+
+ * saquery.c: Fix saquery -D option
+
+Wed Jul 22 16:14:03 2015 +0200 Ana Guerrero López
+552063e080c6dde686f961238e019172b3823a42
+
+ * rdma-ndd: fix compiler warnings.
+
+Wed Jul 15 14:08:49 2015 -0400 Hal Rosenstock
+5de1f6de8825ba70d8553be957416ab271716379
+
+ * iblinkinfo.c: Close additional file descriptor in advance
+
+Thu Apr 16 18:27:39 2015 +0300 Vladimir Koushnir
+9912de3d9dbdd31e67f736ea378d429429a81128
+
+ * vendstat: mad_rpc_close_port not called in corner cases
+
+Thu Jun 25 16:12:02 2015 +0200 Michal Schmidt
+efecdfb8219ad3234ea61a349a2f7a28cee76439
+
+ * build-sys: avoid overlinking to libudev
+
+Thu Jun 25 16:12:01 2015 +0200 Michal Schmidt
+01071153c35f18f93b6b19075ffcbc5a7290eaf2
+
+ * rdma-ndd: never use udev_get_sys_path()
+
+Thu May 7 13:54:52 2015 +0300 Hal Rosenstock
+4989004236cb59d281c743a4b91275ef555951d8
+
+ * ibdiag_sa.c: In sa_get_handle, handle umad_open_port and umad_register failures
+
+Sun Apr 26 18:26:16 2015 +0300 Vladimir Koushnir
+f68d857412a4499cdc42ddec1059388d7a94e25d
+
+ * ibqueryerrors: improve code related to DR option
+
+Sun Apr 26 12:24:06 2015 +0300 Vladimir Koushnir
+13e9d76a6af2e66186bd8aa77eab8f811decaee7
+
+ * ibqueryerrors: Close global file descriptor before running ibnd_discover_fabric
+
+Tue Apr 21 17:12:05 2015 +0300 Vladimir Koushnir
+ae4e036450fafaafcf9abee7d2f74bfabd7d5f4a
+
+ * ibqueryerrors: Fix crash when no SM is running
+
+Sun Apr 26 18:29:31 2015 +0300 Vladimir Koushnir
+35c85ad05cff4ca7bc5875320a7a7296cbb16608
+
+ * ibqueryerrors: code improvement
+
+Thu Apr 16 16:56:40 2015 +0300 Vladimir Koushnir
+f427cf58892426d1d9159019b42af94c48d06feb
+
+ * dump_fts: Open global file descriptor after calling ibnd_discover_fabric
+
+Thu Apr 16 14:11:16 2015 +0300 Vladimir Koushnir
+2a8621e70417c2f45e40acefe5ff96d8d85996f3
+
+ * query_smp.c: Avoid busy looping in process_one_recv
+
+Wed Apr 8 12:29:44 2015 +0300 Vladimir Koushnir
+ad743ff6c6e2befa71801bc76bdc5d08d8f41131
+
+ * Remove redundant umad file descriptor from libibnetdisc
+
+Thu Apr 16 16:39:43 2015 +0300 Vladimir Koushnir
+4e6bc81500fecbdece3c16862252a83cdeed3282
+
+ * ibqueryerrors: Resource leak in path_record_query
+
+Thu May 1 10:22:00 2014 -0400 Hal Rosenstock
+1f4e356a5d156cd85d69f3b064bb1b7692778853
+
+ * perfquery.c: Change format of capability mask in IBWARN for consistency
+
+Wed Mar 11 01:41:35 2015 -0400 Ira Weiny
+211eccc0447f4259cbdf9579786865ee8e3657ff
+
+ * infiniband-diags/rdma-ndd: add --pidfile option
+
+Wed Mar 11 01:28:42 2015 -0400 Ira Weiny
+62cbfb4ceb41884cd3563b700af7d46fb99572aa
+
+ * infiniband-diags/rdma-ndd: Fix issues with install
+
** Version: 1.6.5
Tue Feb 10 18:45:17 2015 -0500 Ira Weiny
diff --git a/Makefile.am b/Makefile.am
index 93af707..3fea79d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -177,6 +177,10 @@ install-data-hook:
if ENABLE_RDMA_NDD
install-exec-hook:
+if SYSTEMD_SYSTEM
+ $(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.service $(DESTDIR)/$(SYSTEMD_SYSTEM_UNIT_DIR)/rdma-ndd.service
+else
$(top_srcdir)/config/install-sh -m 755 -d $(DESTDIR)/$(sysconfdir)/init.d
$(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.init $(DESTDIR)/$(sysconfdir)/init.d/rdma-ndd
endif
+endif
diff --git a/Makefile.in b/Makefile.in
index 6573884..6d1d7dc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -112,6 +112,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(top_srcdir)/doc/man/rdma-ndd.8.in \
$(top_srcdir)/etc/rdma-ndd.init.in \
+ $(top_srcdir)/etc/rdma-ndd.service.in \
$(srcdir)/infiniband-diags.spec.in \
$(top_srcdir)/include/ibdiag_version.h.in \
$(top_srcdir)/scripts/ibcheckerrors.in \
@@ -185,16 +186,17 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = doc/man/rdma-ndd.8 etc/rdma-ndd.init \
- infiniband-diags.spec include/ibdiag_version.h \
- scripts/ibcheckerrors scripts/ibcheckerrs scripts/ibchecknet \
- scripts/ibchecknode scripts/ibcheckport \
- scripts/ibcheckportstate scripts/ibcheckportwidth \
- scripts/ibcheckstate scripts/ibcheckwidth \
- scripts/ibclearcounters scripts/ibclearerrors \
- scripts/ibdatacounts scripts/ibdatacounters scripts/ibhosts \
- scripts/ibnodes scripts/ibswitches scripts/ibrouters \
- scripts/iblinkinfo.pl scripts/ibqueryerrors.pl \
- scripts/dump_lfts.sh scripts/dump_mfts.sh doc/man/ibaddr.8 \
+ etc/rdma-ndd.service infiniband-diags.spec \
+ include/ibdiag_version.h scripts/ibcheckerrors \
+ scripts/ibcheckerrs scripts/ibchecknet scripts/ibchecknode \
+ scripts/ibcheckport scripts/ibcheckportstate \
+ scripts/ibcheckportwidth scripts/ibcheckstate \
+ scripts/ibcheckwidth scripts/ibclearcounters \
+ scripts/ibclearerrors scripts/ibdatacounts \
+ scripts/ibdatacounters scripts/ibhosts scripts/ibnodes \
+ scripts/ibswitches scripts/ibrouters scripts/iblinkinfo.pl \
+ scripts/ibqueryerrors.pl scripts/dump_lfts.sh \
+ scripts/dump_mfts.sh doc/man/ibaddr.8 \
doc/man/check_lft_balance.8 doc/man/ibcacheedit.8 \
doc/man/ibccconfig.8 doc/man/ibccquery.8 doc/man/dump_fts.8 \
doc/man/ibhosts.8 doc/man/ibidsverify.8 doc/man/iblinkinfo.8 \
@@ -769,7 +771,12 @@ RELEASE = @RELEASE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SPEC_FILE_RDMA_NDD_INSTALL = @SPEC_FILE_RDMA_NDD_INSTALL@
STRIP = @STRIP@
+SYSTEMD_BUILD_REQUIRES = @SYSTEMD_BUILD_REQUIRES@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEMD_SYSTEM_UNIT_DIR = @SYSTEMD_SYSTEM_UNIT_DIR@
TARBALL = @TARBALL@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
@@ -962,6 +969,8 @@ doc/man/rdma-ndd.8: $(top_builddir)/config.status $(top_srcdir)/doc/man/rdma-ndd
cd $(top_builddir) && $(SHELL) ./config.status $@
etc/rdma-ndd.init: $(top_builddir)/config.status $(top_srcdir)/etc/rdma-ndd.init.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+etc/rdma-ndd.service: $(top_builddir)/config.status $(top_srcdir)/etc/rdma-ndd.service.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
infiniband-diags.spec: $(top_builddir)/config.status $(srcdir)/infiniband-diags.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
include/ibdiag_version.h: $(top_builddir)/config.status $(top_srcdir)/include/ibdiag_version.h.in
@@ -2346,8 +2355,9 @@ install-data-hook:
$(top_srcdir)/config/install-sh -c -m 400 $(top_srcdir)/etc/ibdiag.conf $(DESTDIR)/$(sysconfdir)/infiniband-diags
@ENABLE_RDMA_NDD_TRUE at install-exec-hook:
- at ENABLE_RDMA_NDD_TRUE@ $(top_srcdir)/config/install-sh -m 755 -d $(DESTDIR)/$(sysconfdir)/init.d
- at ENABLE_RDMA_NDD_TRUE@ $(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.init $(DESTDIR)/$(sysconfdir)/init.d/rdma-ndd
+ at ENABLE_RDMA_NDD_TRUE@@SYSTEMD_SYSTEM_TRUE@ $(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.service $(DESTDIR)/$(SYSTEMD_SYSTEM_UNIT_DIR)/rdma-ndd.service
+ at ENABLE_RDMA_NDD_TRUE@@SYSTEMD_SYSTEM_FALSE@ $(top_srcdir)/config/install-sh -m 755 -d $(DESTDIR)/$(sysconfdir)/init.d
+ at ENABLE_RDMA_NDD_TRUE@@SYSTEMD_SYSTEM_FALSE@ $(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.init $(DESTDIR)/$(sysconfdir)/init.d/rdma-ndd
# 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 --git a/README b/README
index 9bf1a93..593ac9b 100644
--- a/README
+++ b/README
@@ -17,46 +17,29 @@ Dependencies:
5) glib2
-Release notes v1.6.5 => 1.6.6
+Release notes v1.6.6 => 1.6.7
1) bug fixes
+ 2) Add support for systemd
-Authors since 1.6.5
+Authors since 1.6.6
-Ana Guerrero López (1):
- rdma-ndd: fix compiler warnings.
-
-Dan Ben Yosef (2):
- perfquery -T (print Extended Speed Counters) times out on nodes supporting
- libibnetdisc: Avoid pushing same pointer to the hash table
+Dan Ben Yosef (1):
+ saquery.c: Fix changing qos_class flag value to network order twice
Hal Rosenstock (5):
- perfquery.c: Change format of capability mask in IBWARN for consistency
- ibdiag_sa.c: In sa_get_handle, handle umad_open_port and umad_register fai
- iblinkinfo.c: Close additional file descriptor in advance
- ibdiag_common.c: Move static to beginning of get_build_version declaration
- perfquery.c: Fix smp_query_via return value checks
-
-Ira Weiny (3):
- infiniband-diags/rdma-ndd: Fix issues with install
- infiniband-diags/rdma-ndd: add --pidfile option
- infiniband-diags: rdma-ndd: remove udev logging when not supported
-
-Michal Schmidt (2):
- rdma-ndd: never use udev_get_sys_path()
- build-sys: avoid overlinking to libudev
-
-Vladimir Koushnir (10):
- ibqueryerrors: Resource leak in path_record_query
- Remove redundant umad file descriptor from libibnetdisc
- query_smp.c: Avoid busy looping in process_one_recv
- dump_fts: Open global file descriptor after calling ibnd_discover_fabric
- ibqueryerrors: code improvement
- ibqueryerrors: Fix crash when no SM is running
- ibqueryerrors: Close global file descriptor before running ibnd_discover_f
- ibqueryerrors: improve code related to DR option
- vendstat: mad_rpc_close_port not called in corner cases
- saquery.c: Fix saquery -D option
-
+ ibcacheedit.c: Eliminate unused parameter passed to
+ update_switchportguids
+ ibqueryerrors.c: Removed unused passed parameters to print_port_config
+ and query_and_dump
+ Remove unused pisize parameter from dump_portinfo in ibdiag_common
+ ibportstate.c: Fix unsigned comparison warnings
+ ibsendtrap.c: Eliminate unused parameter from send_trap
+
+Ira Weiny (1):
+ rdma-ndd: Add systemd support
+
+Vladimir Koushnir (1):
+ infiniband-diags: Add Switch-IB2 support to device white lists
diff --git a/configure b/configure
index 074e1c7..9b26d4f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for infiniband-diags 1.6.6.
+# Generated by GNU Autoconf 2.69 for infiniband-diags 1.6.7.
#
# Report bugs to <linux-rdma at vger.kernel.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='infiniband-diags'
PACKAGE_TARNAME='infiniband-diags'
-PACKAGE_VERSION='1.6.6'
-PACKAGE_STRING='infiniband-diags 1.6.6'
+PACKAGE_VERSION='1.6.7'
+PACKAGE_STRING='infiniband-diags 1.6.7'
PACKAGE_BUGREPORT='linux-rdma at vger.kernel.org'
PACKAGE_URL=''
@@ -643,6 +643,13 @@ DEFAULT_START
RDMA_SERVICE
ENABLE_RDMA_NDD_FALSE
ENABLE_RDMA_NDD_TRUE
+SPEC_FILE_RDMA_NDD_INSTALL
+SYSTEMD_SYSTEM_FALSE
+SYSTEMD_SYSTEM_TRUE
+SYSTEMD_BUILD_REQUIRES
+SYSTEMD_SYSTEM_UNIT_DIR
+SYSTEMD_LIBS
+SYSTEMD_CFLAGS
ibnetdisc_api_version
HAVE_GLIB_FALSE
HAVE_GLIB_TRUE
@@ -799,6 +806,7 @@ enable_compat_utils
with_perl_path
with_perl_installdir
with_ibpath_override
+with_systemdsystemunitdir
enable_rdma_ndd
with_rdma_service
'
@@ -816,6 +824,8 @@ PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
GLIB_CFLAGS
GLIB_LIBS
+SYSTEMD_CFLAGS
+SYSTEMD_LIBS
UDEV_CFLAGS
UDEV_LIBS'
@@ -1358,7 +1368,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures infiniband-diags 1.6.6 to adapt to many kinds of systems.
+\`configure' configures infiniband-diags 1.6.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1429,7 +1439,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of infiniband-diags 1.6.6:";;
+ short | recursive ) echo "Configuration of infiniband-diags 1.6.7:";;
esac
cat <<\_ACEOF
@@ -1465,6 +1475,9 @@ Optional Packages:
--with-perl-installdir=path
define perl install path
--with-ibpath_override=<path> define ib binaries path
+ --with-systemdsystemunitdir=DIR
+ Directory for systemd service files default from
+ pkg-config variable systemdsystemunitdir)
--with-rdma-service=name
name of the RDMA service: "rdma" when using
/etc/init.d/rdma to start RDMA services; "openibd"
@@ -1487,6 +1500,10 @@ Some influential environment variables:
path overriding pkg-config's built-in search path
GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
GLIB_LIBS linker flags for GLIB, overriding pkg-config
+ SYSTEMD_CFLAGS
+ C compiler flags for SYSTEMD, overriding pkg-config
+ SYSTEMD_LIBS
+ linker flags for SYSTEMD, overriding pkg-config
UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
UDEV_LIBS linker flags for UDEV, overriding pkg-config
@@ -1556,7 +1573,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-infiniband-diags configure 1.6.6
+infiniband-diags configure 1.6.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1982,7 +1999,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by infiniband-diags $as_me 1.6.6, which was
+It was created by infiniband-diags $as_me 1.6.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2848,7 +2865,7 @@ fi
# Define the identity of the package.
PACKAGE='infiniband-diags'
- VERSION='1.6.6'
+ VERSION='1.6.7'
cat >>confdefs.h <<_ACEOF
@@ -12562,6 +12579,109 @@ if test -z $ibnetdisc_api_version; then
fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
+$as_echo_n "checking for SYSTEMD... " >&6; }
+
+if test -n "$SYSTEMD_CFLAGS"; then
+ pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$SYSTEMD_LIBS"; then
+ pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "systemd" 2>&1`
+ else
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "systemd" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SYSTEMD_PKG_ERRORS" >&5
+
+ use_systemd=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ use_systemd=no
+else
+ SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
+ SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ use_systemd=yes
+fi
+
+specfile_install="%{_sysconfdir}/init.d/rdma-ndd"
+if test "x$use_systemd" == xyes; then
+ dir=""
+
+# Check whether --with-systemdsystemunitdir was given.
+if test "${with_systemdsystemunitdir+set}" = set; then :
+ withval=$with_systemdsystemunitdir; dir=${withval}
+else
+ dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"
+fi
+
+ systemdsystemunitdir=${dir}
+ SYSTEMD_SYSTEM_UNIT_DIR=$systemdsystemunitdir
+
+ SYSTEMD_BUILD_REQUIRES="BuildRequires: systemd"
+
+ specfile_install="$systemdsystemunitdir/rdma-ndd.service"
+fi
+ if test "x$use_systemd" == xyes; then
+ SYSTEMD_SYSTEM_TRUE=
+ SYSTEMD_SYSTEM_FALSE='#'
+else
+ SYSTEMD_SYSTEM_TRUE='#'
+ SYSTEMD_SYSTEM_FALSE=
+fi
+
+SPEC_FILE_RDMA_NDD_INSTALL=$specfile_install
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-rdma-ndd" >&5
$as_echo_n "checking for --enable-rdma-ndd... " >&6; }
# Check whether --enable-rdma-ndd was given.
@@ -12702,7 +12822,7 @@ else
$as_echo "yes" >&6; }
fi
- ac_config_files="$ac_config_files doc/man/rdma-ndd.8 etc/rdma-ndd.init"
+ ac_config_files="$ac_config_files doc/man/rdma-ndd.8 etc/rdma-ndd.init etc/rdma-ndd.service"
@@ -12975,6 +13095,10 @@ if test -z "${HAVE_GLIB_TRUE}" && test -z "${HAVE_GLIB_FALSE}"; then
as_fn_error $? "conditional \"HAVE_GLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${SYSTEMD_SYSTEM_TRUE}" && test -z "${SYSTEMD_SYSTEM_FALSE}"; then
+ as_fn_error $? "conditional \"SYSTEMD_SYSTEM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${ENABLE_RDMA_NDD_TRUE}" && test -z "${ENABLE_RDMA_NDD_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_RDMA_NDD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -13376,7 +13500,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by infiniband-diags $as_me 1.6.6, which was
+This file was extended by infiniband-diags $as_me 1.6.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13442,7 +13566,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-infiniband-diags config.status 1.6.6
+infiniband-diags config.status 1.6.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -13853,6 +13977,7 @@ do
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"doc/man/rdma-ndd.8") CONFIG_FILES="$CONFIG_FILES doc/man/rdma-ndd.8" ;;
"etc/rdma-ndd.init") CONFIG_FILES="$CONFIG_FILES etc/rdma-ndd.init" ;;
+ "etc/rdma-ndd.service") CONFIG_FILES="$CONFIG_FILES etc/rdma-ndd.service" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"infiniband-diags.spec") CONFIG_FILES="$CONFIG_FILES infiniband-diags.spec" ;;
"include/ibdiag_version.h") CONFIG_FILES="$CONFIG_FILES include/ibdiag_version.h" ;;
diff --git a/configure.ac b/configure.ac
index 9a5e47a..623bc4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(infiniband-diags, 1.6.6, linux-rdma at vger.kernel.org)
+AC_INIT(infiniband-diags, 1.6.7, linux-rdma at vger.kernel.org)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AM_CONFIG_HEADER(config.h)
@@ -180,6 +180,27 @@ fi
AC_SUBST(ibnetdisc_api_version)
dnl End libibnetdisc stuff
+dnl Begin determine the systemd use and location
+PKG_CHECK_MODULES([SYSTEMD], [systemd], use_systemd=yes, use_systemd=no)
+
+specfile_install="%{_sysconfdir}/init.d/rdma-ndd"
+if test "x$use_systemd" == xyes; then
+ dir=""
+ AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+ [Directory for systemd service files default from pkg-config variable systemdsystemunitdir)]),
+ [dir=${withval}],
+ [dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"])
+ systemdsystemunitdir=${dir}
+ AC_SUBST(SYSTEMD_SYSTEM_UNIT_DIR, [$systemdsystemunitdir])
+ AC_SUBST(SYSTEMD_BUILD_REQUIRES, "BuildRequires: systemd")
+ specfile_install="$systemdsystemunitdir/rdma-ndd.service"
+fi
+AM_CONDITIONAL(SYSTEMD_SYSTEM, test "x$use_systemd" == xyes)
+AC_SUBST(SPEC_FILE_RDMA_NDD_INSTALL, $specfile_install)
+
+dnl End systemd stuff
+
+
dnl with or with rdma-ndd
AC_MSG_CHECKING(for --enable-rdma-ndd)
AC_ARG_ENABLE(rdma-ndd,
@@ -212,7 +233,9 @@ AC_SUBST(DEFAULT_STOP, $default_stop)
AS_IF([test x$rdmandd = xyes], [
PKG_CHECK_MODULES([UDEV], [libudev])
- AC_CONFIG_FILES([doc/man/rdma-ndd.8 etc/rdma-ndd.init])
+ AC_CONFIG_FILES([doc/man/rdma-ndd.8 \
+ etc/rdma-ndd.init \
+ etc/rdma-ndd.service])
AC_SUBST([UDEV_CFLAGS])
AC_SUBST([UDEV_LIBS])
if test "$with_udev" = "yes"; then
diff --git a/etc/rdma-ndd.service b/etc/rdma-ndd.service
new file mode 100644
index 0000000..e6bf2ce
--- /dev/null
+++ b/etc/rdma-ndd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=RDMA Node Description Daemon
+After=rdma.service
+
+[Service]
+Type=forking
+EnvironmentFile=/usr/local/etc/infiniband-diags/ibdiag.conf
+ExecStart=${prefix}/sbin/rdma-ndd
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/etc/rdma-ndd.service.in b/etc/rdma-ndd.service.in
new file mode 100644
index 0000000..ef0962b
--- /dev/null
+++ b/etc/rdma-ndd.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=RDMA Node Description Daemon
+After=rdma.service
+
+[Service]
+Type=forking
+EnvironmentFile=@IBDIAG_CONFIG_PATH@/ibdiag.conf
+ExecStart=@exec_prefix@/sbin/rdma-ndd
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/include/ibdiag_common.h b/include/ibdiag_common.h
index af5b3c4..21b0522 100644
--- a/include/ibdiag_common.h
+++ b/include/ibdiag_common.h
@@ -150,7 +150,7 @@ int vsnprint_field(char *buf, size_t n, enum MAD_FIELDS f, int spacing,
const char *format, va_list va_args);
int snprint_field(char *buf, size_t n, enum MAD_FIELDS f, int spacing,
const char *format, ...);
-void dump_portinfo(void *pi, int pisize, int tabs);
+void dump_portinfo(void *pi, int tabs);
/**
* Some common command line parsing
diff --git a/include/ibdiag_version.h b/include/ibdiag_version.h
index cadb35e..142d718 100644
--- a/include/ibdiag_version.h
+++ b/include/ibdiag_version.h
@@ -34,6 +34,6 @@
#ifndef _IBDIAG_VERSION_H_
#define _IBDIAG_VERSION_H_
-#define IBDIAG_VERSION "1.6.6"
+#define IBDIAG_VERSION "1.6.7"
#endif /* _IBDIAG_VERSION_H_ */
diff --git a/infiniband-diags.spec b/infiniband-diags.spec
index 58bacd1..b440c22 100644
--- a/infiniband-diags.spec
+++ b/infiniband-diags.spec
@@ -4,14 +4,15 @@
Summary: OpenFabrics Alliance InfiniBand Diagnostic Tools
Name: infiniband-diags
-Version: 1.6.6
+Version: 1.6.7
Release: %rel%{?dist}
License: GPLv2 or BSD
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Source: http://www.openfabrics.org/downloads/management/infiniband-diags-1.6.6.tar.gz
+Source: http://www.openfabrics.org/downloads/management/infiniband-diags-1.6.7.tar.gz
Url: http://openfabrics.org/
BuildRequires: libibmad-devel, opensm-devel, libibumad-devel, glib2-devel, libudev-devel
+BuildRequires: systemd
Requires: libibmad, opensm-libs, libibumad, glib2
Provides: perl(IBswcountlimits)
Obsoletes: openib-diags
@@ -167,36 +168,35 @@ rm -rf $RPM_BUILD_ROOT
%define _perldir %(perl -e 'use Config; $T=$Config{installvendorlib}; print $T;')
%{_perldir}/*
%{_sysconfdir}/infiniband-diags/*
-%{_sysconfdir}/init.d/rdma-ndd
+/usr/lib/systemd/system/rdma-ndd.service
%doc README COPYING ChangeLog
%post
if [ $1 = 1 ]; then
- if [ -e /sbin/chkconfig ]; then
+ if [ -e /etc/init.d/rdma-ndd ] && [ -e /sbin/chkconfig ]; then
/sbin/chkconfig --add rdma-ndd
- /sbin/chkconfig rdma-ndd on
- elif [ -e /usr/sbin/update-rc.d ]; then
- /usr/sbin/update-rc.d rdma-ndd defaults
- else
- /usr/lib/lsb/install_initd /etc/init.d/rdma-ndd
fi
if type systemctl >/dev/null 2>&1; then
- systemctl --system daemon-reload
+ systemctl daemon-reload
fi
-else
- /etc/init.d/rdma-ndd condrestart
fi
%preun
if [ $1 = 0 ]; then
- /etc/init.d/rdma-ndd stop
- if [ -e /sbin/chkconfig ]; then
+ if [ -e /etc/init.d/rdma-ndd ] && [ -e /sbin/chkconfig ]; then
+ /etc/init.d/rdma-ndd stop
/sbin/chkconfig --del rdma-ndd
- elif [ -e /usr/sbin/update-rc.d ]; then
- /usr/sbin/update-rc.d -f rdma-ndd remove
- else
- /usr/lib/lsb/remove_initd /etc/init.d/rdma-ndd
+ fi
+ if type systemctl >/dev/null 2>&1; then
+ systemctl stop rdma-ndd
+ fi
+fi
+
+%postun
+if [ $1 = 0 ]; then
+ if type systemctl >/dev/null 2>&1; then
+ systemctl daemon-reload
fi
fi
diff --git a/infiniband-diags.spec.in b/infiniband-diags.spec.in
index ab4e182..3ff8c7b 100644
--- a/infiniband-diags.spec.in
+++ b/infiniband-diags.spec.in
@@ -12,6 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source: http://www.openfabrics.org/downloads/management/@TARBALL@
Url: http://openfabrics.org/
BuildRequires: libibmad-devel, opensm-devel, libibumad-devel, glib2-devel, libudev-devel
+ at SYSTEMD_BUILD_REQUIRES@
Requires: libibmad, opensm-libs, libibumad, glib2
Provides: perl(IBswcountlimits)
Obsoletes: openib-diags
@@ -167,36 +168,35 @@ rm -rf $RPM_BUILD_ROOT
%define _perldir %(perl -e 'use Config; $T=$Config{installvendorlib}; print $T;')
%{_perldir}/*
%{_sysconfdir}/infiniband-diags/*
-%{_sysconfdir}/init.d/rdma-ndd
+ at SPEC_FILE_RDMA_NDD_INSTALL@
%doc README COPYING ChangeLog
%post
if [ $1 = 1 ]; then
- if [ -e /sbin/chkconfig ]; then
+ if [ -e /etc/init.d/rdma-ndd ] && [ -e /sbin/chkconfig ]; then
/sbin/chkconfig --add rdma-ndd
- /sbin/chkconfig rdma-ndd on
- elif [ -e /usr/sbin/update-rc.d ]; then
- /usr/sbin/update-rc.d rdma-ndd defaults
- else
- /usr/lib/lsb/install_initd /etc/init.d/rdma-ndd
fi
if type systemctl >/dev/null 2>&1; then
- systemctl --system daemon-reload
+ systemctl daemon-reload
fi
-else
- /etc/init.d/rdma-ndd condrestart
fi
%preun
if [ $1 = 0 ]; then
- /etc/init.d/rdma-ndd stop
- if [ -e /sbin/chkconfig ]; then
+ if [ -e /etc/init.d/rdma-ndd ] && [ -e /sbin/chkconfig ]; then
+ /etc/init.d/rdma-ndd stop
/sbin/chkconfig --del rdma-ndd
- elif [ -e /usr/sbin/update-rc.d ]; then
- /usr/sbin/update-rc.d -f rdma-ndd remove
- else
- /usr/lib/lsb/remove_initd /etc/init.d/rdma-ndd
+ fi
+ if type systemctl >/dev/null 2>&1; then
+ systemctl stop rdma-ndd
+ fi
+fi
+
+%postun
+if [ $1 = 0 ]; then
+ if type systemctl >/dev/null 2>&1; then
+ systemctl daemon-reload
fi
fi
diff --git a/libibnetdisc/Makefile.in b/libibnetdisc/Makefile.in
index 030e43f..6520b7e 100644
--- a/libibnetdisc/Makefile.in
+++ b/libibnetdisc/Makefile.in
@@ -291,7 +291,12 @@ RELEASE = @RELEASE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SPEC_FILE_RDMA_NDD_INSTALL = @SPEC_FILE_RDMA_NDD_INSTALL@
STRIP = @STRIP@
+SYSTEMD_BUILD_REQUIRES = @SYSTEMD_BUILD_REQUIRES@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEMD_SYSTEM_UNIT_DIR = @SYSTEMD_SYSTEM_UNIT_DIR@
TARBALL = @TARBALL@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
index 938a516..6ef7805 100644
--- a/libibnetdisc/src/ibnetdisc.c
+++ b/libibnetdisc/src/ibnetdisc.c
@@ -197,7 +197,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
{
uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
- if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
+ if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
return 1;
if (devid >= 0x1003 && devid <= 0x1016)
return 1;
diff --git a/src/ibcacheedit.c b/src/ibcacheedit.c
index 983c0ab..b520839 100644
--- a/src/ibcacheedit.c
+++ b/src/ibcacheedit.c
@@ -165,7 +165,7 @@ static int process_opt(void *context, int ch, char *optarg)
return 0;
}
-static void update_switchportguids(ibnd_node_t *node, uint64_t guid)
+static void update_switchportguids(ibnd_node_t *node)
{
ibnd_port_t *port;
int p;
@@ -191,7 +191,7 @@ static void replace_node_guid(ibnd_node_t *node, void *user_data)
* switches, so update port guids too
*/
if (node->type == IB_NODE_SWITCH)
- update_switchportguids(node, guids->after);
+ update_switchportguids(node);
guids->found++;
}
@@ -229,7 +229,7 @@ static void replace_portguid(ibnd_node_t *node, void *user_data)
*/
if (node->guid == guids->before) {
node->guid = guids->after;
- update_switchportguids(node, guids->after);
+ update_switchportguids(node);
guids->found++;
}
}
diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
index 5ec0167..2a1e971 100644
--- a/src/ibdiag_common.c
+++ b/src/ibdiag_common.c
@@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
int is_mlnx_ext_port_info_supported(uint32_t devid)
{
if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
- if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
+ if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
return 1;
if (devid >= 0x1003 && devid <= 0x1016)
return 1;
@@ -853,7 +853,7 @@ int snprint_field(char *buf, size_t n, enum MAD_FIELDS f, int spacing,
return ret;
}
-void dump_portinfo(void *pi, int pisize, int tabs)
+void dump_portinfo(void *pi, int tabs)
{
int field, i;
char val[64];
diff --git a/src/ibportstate.c b/src/ibportstate.c
index 47e9133..cb47aa9 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -447,40 +447,40 @@ int main(int argc, char **argv)
val = strtoull(argv[i], 0, 0);
switch (j) {
case SPEED:
- if (val < 0 || val > 15)
+ if (val > 15)
IBEXIT("invalid speed value %ld", val);
break;
case ESPEED:
- if (val < 0 || val > 31)
+ if (val > 31)
IBEXIT("invalid extended speed value %ld", val);
break;
case FDR10SPEED:
- if (val < 0 || val > 1)
+ if (val > 1)
IBEXIT("invalid fdr10 speed value %ld", val);
break;
case WIDTH:
- if (val < 0 || (val > 15 && val != 255))
+ if ((val > 15 && val != 255))
IBEXIT("invalid width value %ld", val);
break;
case VLS:
- if (val <= 0 || val > 5)
+ if (val == 0 || val > 5)
IBEXIT("invalid vls value %ld", val);
break;
case MTU:
- if (val <= 0 || val > 5)
+ if (val == 0 || val > 5)
IBEXIT("invalid mtu value %ld", val);
break;
case LID:
- if (val <= 0 || val >= 0xC000)
+ if (val == 0 || val >= 0xC000)
IBEXIT("invalid lid value 0x%lx", val);
break;
case SMLID:
- if (val <= 0 || val >= 0xC000)
+ if (val == 0 || val >= 0xC000)
IBEXIT("invalid smlid value 0x%lx",
val);
break;
case LMC:
- if (val < 0 || val > 7)
+ if (val > 7)
IBEXIT("invalid lmc value %ld", val);
break;
case MKEY:
@@ -497,11 +497,11 @@ int main(int argc, char **argv)
/* All 64-bit values are legal */
break;
case MKEYLEASE:
- if (val < 0 || val > 0xFFFF)
+ if (val > 0xFFFF)
IBEXIT("invalid mkey lease time %ld", val);
break;
case MKEYPROT:
- if (val < 0 || val > 3)
+ if (val > 3)
IBEXIT("invalid mkey protection bit setting %ld", val);
}
*port_args[j].val = val;
diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
index 40a8ad1..304dc15 100644
--- a/src/ibqueryerrors.c
+++ b/src/ibqueryerrors.c
@@ -173,7 +173,7 @@ static int exceeds_threshold(int field, unsigned val)
return (val > thres);
}
-static void print_port_config(char *node_name, ibnd_node_t * node, int portnum)
+static void print_port_config(ibnd_node_t * node, int portnum)
{
char width[64], speed[64], state[64], physstate[64];
char remote_str[256];
@@ -364,7 +364,7 @@ Exit:
}
static int query_and_dump(char *buf, size_t size, ib_portid_t * portid,
- ibnd_node_t * node, char *node_name, int portnum,
+ char *node_name, int portnum,
const char *attr_name, uint16_t attr_id,
int start_field, int end_field)
{
@@ -418,7 +418,7 @@ static int print_results(ib_portid_t * portid, char *node_name,
/* If there are PortXmitDiscards, get details (if supported) */
if (i == IB_PC_XMT_DISCARDS_F && details) {
n += query_and_dump(str + n, sizeof(buf) - n, portid,
- node, node_name, portnum,
+ node_name, portnum,
"PortXmitDiscardDetails",
IB_GSI_PORT_XMIT_DISCARD_DETAILS,
IB_PC_RCV_LOCAL_PHY_ERR_F,
@@ -426,7 +426,7 @@ static int print_results(ib_portid_t * portid, char *node_name,
/* If there are PortRcvErrors, get details (if supported) */
} else if (i == IB_PC_ERR_RCV_F && details) {
n += query_and_dump(str + n, sizeof(buf) - n, portid,
- node, node_name, portnum,
+ node_name, portnum,
"PortRcvErrorDetails",
IB_GSI_PORT_RCV_ERROR_DETAILS,
IB_PC_XMT_INACT_DISC_F,
@@ -499,7 +499,7 @@ static int print_results(ib_portid_t * portid, char *node_name,
printf(" GUID 0x%" PRIx64 " port %d:%s\n",
node->ports[portnum]->guid, portnum, str);
if (port_config)
- print_port_config(node_name, node, portnum);
+ print_port_config(node, portnum);
summary.bad_ports++;
}
}
@@ -596,7 +596,7 @@ static int print_data_cnts(ib_portid_t * portid, uint16_t cap_mask,
printf("\n");
if (portnum != 0xFF && port_config)
- print_port_config(node_name, node, portnum);
+ print_port_config(node, portnum);
return (0);
}
diff --git a/src/ibsendtrap.c b/src/ibsendtrap.c
index 46fd6e7..659f2d2 100644
--- a/src/ibsendtrap.c
+++ b/src/ibsendtrap.c
@@ -121,8 +121,7 @@ static void build_trap129(ib_mad_notice_attr_t * n, ib_portid_t * port)
n->data_details.ntc_129_131.port_num = (uint8_t) error_port;
}
-static int send_trap(const char *name,
- void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
+static int send_trap(void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
{
ib_portid_t sm_port;
ib_portid_t selfportid;
@@ -169,7 +168,7 @@ int process_send_trap(char *trap_name)
for (i = 0; traps[i].trap_name; i++)
if (strcmp(traps[i].trap_name, trap_name) == 0)
- return send_trap(trap_name, traps[i].build_func);
+ return send_trap(traps[i].build_func);
ibdiag_show_usage();
return 1;
}
diff --git a/src/saquery.c b/src/saquery.c
index cc8d8dc..ea946a1 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -304,7 +304,7 @@ static void dump_one_portinfo_record(void *data, struct query_params *p)
"\t\tOptions.................0x%x\n"
"\tPortInfo dump:\n",
cl_ntoh16(pir->lid), pir->port_num, pir->options);
- dump_portinfo(pi, sizeof(*pi), 2);
+ dump_portinfo(pi, 2);
}
static void dump_one_mcmember_record(void *data, struct query_params *p)
@@ -1065,8 +1065,9 @@ static int query_path_records(const struct query_cmd *q, struct sa_handle * h,
pr.num_path |= reversible << 7;
CHECK_AND_SET_VAL(p->pkey, 16, 0, pr.pkey, PR, PKEY);
CHECK_AND_SET_VAL(p->sl, 16, -1, pr.qos_class_sl, PR, SL);
- CHECK_AND_SET_VAL(p->qos_class, 16, -1, qos_class, PR, QOS_CLASS);
- ib_path_rec_set_qos_class(&pr, qos_class);
+ CHECK_AND_SET_VAL((p->qos_class << 4), 16, -1, qos_class, PR, QOS_CLASS);
+ pr.qos_class_sl = (pr.qos_class_sl & CL_HTON16(IB_PATH_REC_SL_MASK)) |
+ qos_class;
CHECK_AND_SET_VAL_AND_SEL(p->mtu, pr.mtu, PR, MTU, SELEC);
CHECK_AND_SET_VAL_AND_SEL(p->rate, pr.rate, PR, RATE, SELEC);
CHECK_AND_SET_VAL_AND_SEL(p->pkt_life, pr.pkt_life, PR, PKTLIFETIME,
diff --git a/src/smpquery.c b/src/smpquery.c
index 187ef61..2bd7132 100644
--- a/src/smpquery.c
+++ b/src/smpquery.c
@@ -161,7 +161,7 @@ static char *port_info(ib_portid_t * dest, char **argv, int argc)
return "port info query failed";
printf("# Port info: %s port %d\n", portid2str(dest), orig_portnum);
- dump_portinfo(data, sizeof data, 0);
+ dump_portinfo(data, 0);
return 0;
}
diff --git a/src/vendstat.c b/src/vendstat.c
index baade3e..fb42a78 100644
--- a/src/vendstat.c
+++ b/src/vendstat.c
@@ -146,6 +146,7 @@ static uint16_t ext_fw_info_device[][2] = {
{0x0245, 0x0245}, /* Switch-X */
{0xc738, 0xc73b}, /* Switch-X */
{0xcb20, 0xcb20}, /* Switch-IB */
+ {0xcf08, 0xcf08}, /* Switch-IB2 */
{0x01b3, 0x01b3}, /* IS-4 */
{0x1003, 0x1016}, /* Connect-X */
{0x0000, 0x0000}};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/infiniband-diags.git
More information about the Pkg-ofed-commits
mailing list