[Pkg-ofed-commits] r209 - in qperf/branches/upstream/current: . autom4te.cache src
gmpc-guest at alioth.debian.org
gmpc-guest at alioth.debian.org
Sat Mar 14 13:38:02 UTC 2009
Author: gmpc-guest
Date: 2009-03-14 13:38:02 +0000 (Sat, 14 Mar 2009)
New Revision: 209
Modified:
qperf/branches/upstream/current/AUTHORS
qperf/branches/upstream/current/autom4te.cache/output.0
qperf/branches/upstream/current/autom4te.cache/output.1
qperf/branches/upstream/current/autom4te.cache/traces.0
qperf/branches/upstream/current/autom4te.cache/traces.1
qperf/branches/upstream/current/configure
qperf/branches/upstream/current/configure.in
qperf/branches/upstream/current/qperf.spec
qperf/branches/upstream/current/src/help.txt
qperf/branches/upstream/current/src/qperf.c
qperf/branches/upstream/current/src/qperf.h
qperf/branches/upstream/current/src/rdma.c
qperf/branches/upstream/current/src/rds.c
qperf/branches/upstream/current/src/socket.c
qperf/branches/upstream/current/src/support.c
Log:
[svn-upgrade] Integrating new upstream version, qperf (0.4.1)
Modified: qperf/branches/upstream/current/AUTHORS
===================================================================
--- qperf/branches/upstream/current/AUTHORS 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/AUTHORS 2009-03-14 13:38:02 UTC (rev 209)
@@ -4,4 +4,3 @@
Dotan Barak
Ralph Campbell
Yevgeny Kliteynik
- Dave Olson
Modified: qperf/branches/upstream/current/autom4te.cache/output.0
===================================================================
--- qperf/branches/upstream/current/autom4te.cache/output.0 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/autom4te.cache/output.0 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.59 for qperf 0.4.2.
+@%:@ Generated by GNU Autoconf 2.59 for qperf 0.4.1.
@%:@
@%:@ Report bugs to <general at lists.openfabrics.org>.
@%:@
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='qperf'
PACKAGE_TARNAME='qperf'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='qperf 0.4.2'
+PACKAGE_VERSION='0.4.1'
+PACKAGE_STRING='qperf 0.4.1'
PACKAGE_BUGREPORT='general at lists.openfabrics.org'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RDMA_TRUE RDMA_FALSE LIB@&t at OBJS LTLIBOBJS'
@@ -738,7 +738,7 @@
# 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 qperf 0.4.2 to adapt to many kinds of systems.
+\`configure' configures qperf 0.4.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -800,7 +800,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of qperf 0.4.2:";;
+ short | recursive ) echo "Configuration of qperf 0.4.1:";;
esac
cat <<\_ACEOF
@@ -917,7 +917,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-qperf configure 0.4.2
+qperf configure 0.4.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -931,7 +931,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by qperf $as_me 0.4.2, which was
+It was created by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1574,7 +1574,7 @@
# Define the identity of the package.
PACKAGE=qperf
- VERSION=0.4.2
+ VERSION=0.4.1
cat >>confdefs.h <<_ACEOF
@@ -3370,7 +3370,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by qperf $as_me 0.4.2, which was
+This file was extended by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3428,7 +3428,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-qperf config.status 0.4.2
+qperf config.status 0.4.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: qperf/branches/upstream/current/autom4te.cache/output.1
===================================================================
--- qperf/branches/upstream/current/autom4te.cache/output.1 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/autom4te.cache/output.1 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.59 for qperf 0.4.2.
+@%:@ Generated by GNU Autoconf 2.59 for qperf 0.4.1.
@%:@
@%:@ Report bugs to <general at lists.openfabrics.org>.
@%:@
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='qperf'
PACKAGE_TARNAME='qperf'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='qperf 0.4.2'
+PACKAGE_VERSION='0.4.1'
+PACKAGE_STRING='qperf 0.4.1'
PACKAGE_BUGREPORT='general at lists.openfabrics.org'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RDMA_TRUE RDMA_FALSE LIB@&t at OBJS LTLIBOBJS'
@@ -738,7 +738,7 @@
# 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 qperf 0.4.2 to adapt to many kinds of systems.
+\`configure' configures qperf 0.4.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -800,7 +800,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of qperf 0.4.2:";;
+ short | recursive ) echo "Configuration of qperf 0.4.1:";;
esac
cat <<\_ACEOF
@@ -917,7 +917,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-qperf configure 0.4.2
+qperf configure 0.4.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -931,7 +931,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by qperf $as_me 0.4.2, which was
+It was created by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1574,7 +1574,7 @@
# Define the identity of the package.
PACKAGE=qperf
- VERSION=0.4.2
+ VERSION=0.4.1
cat >>confdefs.h <<_ACEOF
@@ -3370,7 +3370,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by qperf $as_me 0.4.2, which was
+This file was extended by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3428,7 +3428,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-qperf config.status 0.4.2
+qperf config.status 0.4.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: qperf/branches/upstream/current/autom4te.cache/traces.0
===================================================================
--- qperf/branches/upstream/current/autom4te.cache/traces.0 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/autom4te.cache/traces.0 2009-03-14 13:38:02 UTC (rev 209)
@@ -480,7 +480,7 @@
AC_SUBST([am__tar])
AC_SUBST([am__untar])
])
-m4trace:configure.in:1: -1- AC_INIT([qperf], [0.4.2], [general at lists.openfabrics.org])
+m4trace:configure.in:1: -1- AC_INIT([qperf], [0.4.1], [general at lists.openfabrics.org])
m4trace:configure.in:1: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:1: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
@@ -533,7 +533,7 @@
m4trace:configure.in:1: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:1: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:1: -1- AC_SUBST([LIBS])
-m4trace:configure.in:2: -1- AM_INIT_AUTOMAKE([qperf], [0.4.2])
+m4trace:configure.in:2: -1- AM_INIT_AUTOMAKE([qperf], [0.4.1])
m4trace:configure.in:2: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.in:2: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
m4trace:configure.in:2: -1- AM_AUTOMAKE_VERSION([1.9.6])
@@ -543,7 +543,7 @@
m4trace:configure.in:2: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:2: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.in:2: -1- AC_SUBST([PACKAGE], [qperf])
-m4trace:configure.in:2: -1- AC_SUBST([VERSION], [0.4.2])
+m4trace:configure.in:2: -1- AC_SUBST([VERSION], [0.4.1])
m4trace:configure.in:2: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
m4trace:configure.in:2: -2- _AM_MANGLE_OPTION([no-define])
Modified: qperf/branches/upstream/current/autom4te.cache/traces.1
===================================================================
--- qperf/branches/upstream/current/autom4te.cache/traces.1 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/autom4te.cache/traces.1 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,4 +1,4 @@
-m4trace:configure.in:1: -1- AC_INIT([qperf], [0.4.2], [general at lists.openfabrics.org])
+m4trace:configure.in:1: -1- AC_INIT([qperf], [0.4.1], [general at lists.openfabrics.org])
m4trace:configure.in:1: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:1: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
@@ -51,7 +51,7 @@
m4trace:configure.in:1: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:1: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:1: -1- AC_SUBST([LIBS])
-m4trace:configure.in:2: -1- AM_INIT_AUTOMAKE([qperf], [0.4.2])
+m4trace:configure.in:2: -1- AM_INIT_AUTOMAKE([qperf], [0.4.1])
m4trace:configure.in:2: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.in:2: -1- AM_AUTOMAKE_VERSION([1.9.6])
m4trace:configure.in:2: -1- AC_PROG_INSTALL
@@ -60,7 +60,7 @@
m4trace:configure.in:2: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:2: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.in:2: -1- AC_SUBST([PACKAGE], [qperf])
-m4trace:configure.in:2: -1- AC_SUBST([VERSION], [0.4.2])
+m4trace:configure.in:2: -1- AC_SUBST([VERSION], [0.4.1])
m4trace:configure.in:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
m4trace:configure.in:2: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
#undef PACKAGE])
Modified: qperf/branches/upstream/current/configure
===================================================================
--- qperf/branches/upstream/current/configure 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/configure 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for qperf 0.4.2.
+# Generated by GNU Autoconf 2.59 for qperf 0.4.1.
#
# Report bugs to <general at lists.openfabrics.org>.
#
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='qperf'
PACKAGE_TARNAME='qperf'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='qperf 0.4.2'
+PACKAGE_VERSION='0.4.1'
+PACKAGE_STRING='qperf 0.4.1'
PACKAGE_BUGREPORT='general at lists.openfabrics.org'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RDMA_TRUE RDMA_FALSE LIBOBJS LTLIBOBJS'
@@ -738,7 +738,7 @@
# 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 qperf 0.4.2 to adapt to many kinds of systems.
+\`configure' configures qperf 0.4.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -800,7 +800,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of qperf 0.4.2:";;
+ short | recursive ) echo "Configuration of qperf 0.4.1:";;
esac
cat <<\_ACEOF
@@ -917,7 +917,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-qperf configure 0.4.2
+qperf configure 0.4.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -931,7 +931,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by qperf $as_me 0.4.2, which was
+It was created by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1574,7 +1574,7 @@
# Define the identity of the package.
PACKAGE=qperf
- VERSION=0.4.2
+ VERSION=0.4.1
cat >>confdefs.h <<_ACEOF
@@ -3370,7 +3370,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by qperf $as_me 0.4.2, which was
+This file was extended by qperf $as_me 0.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3428,7 +3428,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-qperf config.status 0.4.2
+qperf config.status 0.4.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: qperf/branches/upstream/current/configure.in
===================================================================
--- qperf/branches/upstream/current/configure.in 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/configure.in 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,5 +1,5 @@
-AC_INIT(qperf, 0.4.2, general at lists.openfabrics.org)
-AM_INIT_AUTOMAKE(qperf, 0.4.2)
+AC_INIT(qperf, 0.4.1, general at lists.openfabrics.org)
+AM_INIT_AUTOMAKE(qperf, 0.4.1)
AC_PROG_CC
AC_CHECK_LIB(ibverbs, ibv_open_device, RDMA=1)
AC_CHECK_LIB(rdmacm, rdma_create_id)
Modified: qperf/branches/upstream/current/qperf.spec
===================================================================
--- qperf/branches/upstream/current/qperf.spec 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/qperf.spec 2009-03-14 13:38:02 UTC (rev 209)
@@ -1,10 +1,10 @@
Name: qperf
Summary: Measure socket and RDMA performance
-Version: 0.4.2
-Release: 1.ofed1.4
+Version: 0.4.1
+Release: 1.ofed1.4.rc1
License: BSD 3-Clause, GPL v2
Group: Networking/Diagnostic
-Source: http://www.openfabrics.org/downloads/qperf-0.4.2.tar.gz
+Source: http://www.openfabrics.org/downloads/qperf-0.4.1.tar.gz
Url: http://www.openfabrics.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libibverbs-devel
Modified: qperf/branches/upstream/current/src/help.txt
===================================================================
--- qperf/branches/upstream/current/src/help.txt 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/help.txt 2009-03-14 13:38:02 UTC (rev 209)
@@ -94,9 +94,6 @@
udp_lat
ver_rc_compare_swap
ver_rc_fetch_add
- xrc_bi_bw
- xrc_bw
- xrc_lat
Examples
In these examples, we first run qperf on a node called myserver in server
mode by invoking it with no arguments. In all the subsequent examples, we
@@ -114,15 +111,12 @@
qperf myserver rc_bi_bw
Opts
--access_recv OnOff (-ar) Turn on/off accessing received data
- -ar1 Cause received data to be accessed
- --alt_port Port (-ap) Set alternate path port
- --loc_alt_port Port (-lap) Set local alternate path port
- --rem_alt_port Port (-rap) Set remote alternate path port
+ -aro Cause received data to be accessed
--cpu_affinity PN (-ca) Set processor affinity
--loc_cpu_affinity PN (-lca) Set local processor affinity
--rem_cpu_affinity PN (-rca) Set remote processor affinity
--flip OnOff (-f) Flip on/off sender and receiver
- -f1 Flip (on) sender and receiver
+ -fo Flip (on) sender and receiver
--help Topic (-h) Get more information on a topic
--host Node (-H) Identify server node
--id Device:Port (-i) Set RDMA device and port
@@ -135,9 +129,9 @@
--cq_poll OnOff Set polling mode on/off
--loc_cq_poll OnOff (-lcp) Set local polling mode on/off
--rem_cq_poll OnOff (-rcp) Set remote polling mode on/off
- -cp1 Turn polling mode on
- -lcp1 Turn local polling mode on
- -rcp1 Turn remote polling mode on
+ -cpo Turn polling mode on
+ -lcpo Turn local polling mode on
+ -rcpo Turn remote polling mode on
--ip_port Port (-ip) Set TCP port used for tests
--precision Digits (-e) Set precision reported
--rd_atomic Max (-nr) Set RDMA read/atomic count
@@ -160,7 +154,7 @@
--unify_units (-uu) Unify units
--use_bits_per_sec (-ub) Use bits/sec rather than bytes/sec
--use_cm OnOff (-cm) Use RDMA Connection Manager or not
- -cm1 Use RDMA Connection Manager
+ -cmo Use RDMA Connection Manager
--verbose (-v) Verbose; turn on all of -v[cstu]
--verbose_conf (-vc) Show configuration information
--verbose_stat (-vs) Show statistical information
@@ -178,14 +172,8 @@
If OnOff is non-zero, data is accessed once received. Otherwise,
data is ignored. By default, OnOff is 0. This can help to mimic
some applications.
- -ar1
+ -aro
Cause received data to be accessed.
- --alt_port Port (-ap)
- Set alternate path port. This enables automatic path failover.
- --loc_alt_port Port (-lap)
- Set local alternate path port. This enables automatic path failover.
- --rem_alt_port Port (-rap)
- Set remote alternate path port. This enables automatic path failover.
--cpu_affinity PN (-ca)
Set cpu affinity to PN. CPUs are numbered sequentially from 0. If
PN is "any", any cpu is allowed otherwise the cpu is limited to the
@@ -196,7 +184,7 @@
Set remote processor affinity to PN.
--flip OnOff (-f)
If non-zero, cause sender and receiver to play opposite roles.
- -f1
+ -fo
Cause sender and receiver to play opposite roles.
--help Topic (-h)
Print out information about Topic. To see the list of topics, type
@@ -234,11 +222,11 @@
Locally turn polling mode on or off.
--rem_cq_poll OnOff (-rcp)
Remotely turn polling mode on or off.
- -cp1
+ -cpo
Turn polling mode on.
- -lcp1
+ -lcpo
Turn local polling mode on.
- -rcp1
+ -rcpo
Turn remote polling mode on.
--ip_port Port (-ip)
Use Port to run the socket tests. This is different from
@@ -306,7 +294,7 @@
necessary to use the CM for iWARP devices. The default is to
establish the connection without using the CM. This only works for
the tests that use the RC transport.
- -cm1
+ -cmo
Use RDMA Connection Manager.
--verbose (-v)
Provide more detailed output. Turns on -vc, -vs, -vt and -vu.
@@ -906,52 +894,3 @@
Tests the RC Fetch and Add Atomic operation. The server's memory
location starts with zero and the client successively adds one. The
results are checked for correctness.
-xrc_bw +RDMA
- Purpose
- XRC streaming one way bandwidth
- Common Options
- --access_recv OnOff (-ar) Access received data
- --id Device:Port (-i) Set RDMA device and port
- --msg_size Size (-m) Set message size
- --cq_poll OnOff Set polling mode on/off
- --time (-t) Set test duration
- Other Options
- --cpu_affinity, --listen_port, --mtu_size, --static_rate, --timeout
- Display Options
- --precision, --unify_nodes, --unify_units, --use_bits_per_sec,
- --verbose
- Description
- The client sends messages to the server who notes how many it received.
- The XRC Send/Receive mechanism is used.
-xrc_bi_bw +RDMA
- Purpose
- XRC streaming two way bandwidth
- Common Options
- --access_recv OnOff (-ar) Access received data
- --id Device:Port (-i) Set RDMA device and port
- --msg_size Size (-m) Set message size
- --cq_poll OnOff Set polling mode on/off
- --time (-t) Set test duration
- Other Options
- --cpu_affinity, --listen_port, --mtu_size, --static_rate, --timeout
- Display Options
- --precision, --unify_nodes, --unify_units, --use_bits_per_sec,
- --verbose
- Description
- Both the client and server exchange messages with each other using the
- XRC Send/Receive mechanism and note how many were received.
-xrc_lat +RDMA
- Purpose
- XRC one way latency
- Common Options
- --id Device:Port (-i) Set RDMA device and port
- --msg_size Size (-m) Set message size
- --cq_poll OnOff Set polling mode on/off
- --time (-t) Set test duration
- Other Options
- --cpu_affinity, --listen_port, --mtu_size, --static_rate, --timeout
- Display Options
- --precision, --unify_nodes, --unify_units, --verbose
- Description
- A ping pong latency test where the server and client exchange messages
- repeatedly using XRC Send/Receive.
Modified: qperf/branches/upstream/current/src/qperf.c
===================================================================
--- qperf/branches/upstream/current/src/qperf.c 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/qperf.c 2009-03-14 13:38:02 UTC (rev 209)
@@ -62,7 +62,7 @@
*/
#define VER_MAJ 0 /* Major version */
#define VER_MIN 4 /* Minor version */
-#define VER_INC 2 /* Incremental version */
+#define VER_INC 1 /* Incremental version */
#define LISTENQ 5 /* Size of listen queue */
#define BUFSIZE 1024 /* Size of buffers */
@@ -273,7 +273,6 @@
PAR_NAME ParName[] ={
{ "access_recv", L_ACCESS_RECV, R_ACCESS_RECV },
{ "affinity", L_AFFINITY, R_AFFINITY },
- { "alt_port", L_ALT_PORT, R_ALT_PORT },
{ "flip", L_FLIP, R_FLIP },
{ "id", L_ID, R_ID },
{ "msg_size", L_MSG_SIZE, R_MSG_SIZE },
@@ -300,8 +299,6 @@
{ R_ACCESS_RECV, 'l', &RReq.access_recv },
{ L_AFFINITY, 'l', &Req.affinity },
{ R_AFFINITY, 'l', &RReq.affinity },
- { L_ALT_PORT, 'l', &Req.alt_port },
- { R_ALT_PORT, 'l', &RReq.alt_port },
{ L_FLIP, 'l', &Req.flip },
{ R_FLIP, 'l', &RReq.flip },
{ L_ID, 'p', &Req.id },
@@ -381,13 +378,6 @@
{ "-vS", "-vvs", },
{ "-vT", "-vvt", },
{ "-vU", "-vvu", },
- /* options that are on */
- { "-aro", "-ar1" },
- { "-cmo", "-cm1" },
- { "-fo", "-f1" },
- { "-cpo", "-cp1" },
- { "-lcpo", "-lcp1" },
- { "-rcpo", "-rcp1" },
/* miscellaneous */
{ "-Ar", "-ar" },
{ "-M", "-mt" },
@@ -403,13 +393,7 @@
OPTION Options[] ={
{ "--access_recv", "int", L_ACCESS_RECV, R_ACCESS_RECV },
{ "-ar", "int", L_ACCESS_RECV, R_ACCESS_RECV },
- { "-ar1", "set1", L_ACCESS_RECV, R_ACCESS_RECV },
- { "--alt_port", "int", L_ALT_PORT, R_ALT_PORT },
- { "-ap", "int", L_ALT_PORT, R_ALT_PORT },
- { "--loc_alt_port", "int", L_ALT_PORT, },
- { "-lap", "int", L_ALT_PORT, },
- { "--rem_alt_port", "int", R_ALT_PORT },
- { "-rap", "int", R_ALT_PORT },
+ { "-aro", "set1", L_ACCESS_RECV, R_ACCESS_RECV },
{ "--cpu_affinity", "int", L_AFFINITY, R_AFFINITY },
{ "-ca", "int", L_AFFINITY, R_AFFINITY },
{ "--loc_cpu_affinity", "int", L_AFFINITY, },
@@ -420,7 +404,7 @@
{ "-D", "Sdebug", },
{ "--flip", "int", L_FLIP, R_FLIP },
{ "-f", "int", L_FLIP, R_FLIP },
- { "-f1", "set1", L_FLIP, R_FLIP },
+ { "-fo", "set1", L_FLIP, R_FLIP },
{ "--help", "help" },
{ "-h", "help" },
{ "--host", "host", },
@@ -441,13 +425,13 @@
{ "-n", "int", L_NO_MSGS, R_NO_MSGS },
{ "--cq_poll", "int", L_POLL_MODE, R_POLL_MODE },
{ "-cp", "int", L_POLL_MODE, R_POLL_MODE },
- { "-cp1", "set1", L_POLL_MODE, R_POLL_MODE },
+ { "-cpo", "set1", L_POLL_MODE, R_POLL_MODE },
{ "--loc_cq_poll", "int", L_POLL_MODE, },
{ "-lcp", "int", L_POLL_MODE, },
- { "-lcp1", "set1", L_POLL_MODE },
+ { "-lcpo", "set1", L_POLL_MODE },
{ "--rem_cq_poll", "int", R_POLL_MODE },
{ "-rcp", "int", R_POLL_MODE },
- { "-rcp1", "set1", R_POLL_MODE },
+ { "-rcpo", "set1", R_POLL_MODE },
{ "--ip_port", "int", L_PORT, R_PORT },
{ "-ip", "int", L_PORT, R_PORT },
{ "--precision", "precision", },
@@ -492,7 +476,7 @@
{ "-ub", "ub", },
{ "--use_cm", "int", L_USE_CM, R_USE_CM },
{ "-cm", "int", L_USE_CM, R_USE_CM },
- { "-cm1", "set1", L_USE_CM, R_USE_CM },
+ { "-cmo", "set1", L_USE_CM, R_USE_CM },
{ "--verbose", "v", },
{ "-v", "v", },
{ "--verbose_conf", "vc", },
@@ -559,9 +543,6 @@
test(ud_lat),
test(ver_rc_compare_swap),
test(ver_rc_fetch_add),
- test(xrc_bi_bw),
- test(xrc_bw),
- test(xrc_lat),
#endif
};
@@ -805,7 +786,6 @@
/* Help */
char **usage;
char *category = (*argvp)[1];
-
if (!category)
category = "main";
for (usage = Usage; *usage; usage += 2)
@@ -1157,7 +1137,7 @@
TEST *test;
int s = offset(REQ, req_index);
- debug("ready for requests");
+ debug("waiting for request");
if (!server_recv_request())
continue;
pid = fork();
@@ -1184,7 +1164,7 @@
test = &Tests[Req.req_index];
TestName = test->name;
- debug("received request: %s", TestName);
+ debug("request is %s", TestName);
init_lstat();
Finished = 0;
set_affinity();
@@ -1303,7 +1283,7 @@
RReq.ver_inc = VER_INC;
RReq.req_index = test - Tests;
TestName = test->name;
- debug("sending request: %s", TestName);
+ debug("sending request %s", TestName);
init_lstat();
printf("%s:\n", TestName);
Finished = 0;
@@ -1398,12 +1378,12 @@
recv_mesg(&stat, sizeof(stat), "results");
dec_init(&stat);
dec_stat(&RStat);
- send_sync("synchronization after test");
+ send_sync("results");
} else {
enc_init(&stat);
enc_stat(&LStat);
send_mesg(&stat, sizeof(stat), "results");
- recv_sync("synchronization after test");
+ recv_sync("results");
}
}
@@ -1603,7 +1583,7 @@
void
sync_test(void)
{
- synchronize("synchronization before test");
+ synchronize("test");
start_test_timer(Req.time);
}
@@ -1621,7 +1601,7 @@
if (!seconds)
return;
- debug("starting timer for %d seconds", seconds);
+ debug("starting timer");
itimerval.it_value.tv_sec = seconds;
itimerval.it_interval.tv_usec = 1;
setitimer(ITIMER_REAL, &itimerval, 0);
@@ -2442,7 +2422,6 @@
enc_int(host->req_index, sizeof(host->req_index));
enc_int(host->access_recv, sizeof(host->access_recv));
enc_int(host->affinity, sizeof(host->affinity));
- enc_int(host->alt_port, sizeof(host->alt_port));
enc_int(host->flip, sizeof(host->flip));
enc_int(host->msg_size, sizeof(host->msg_size));
enc_int(host->mtu_size, sizeof(host->mtu_size));
@@ -2483,7 +2462,6 @@
host->req_index = dec_int(sizeof(host->req_index));
host->access_recv = dec_int(sizeof(host->access_recv));
host->affinity = dec_int(sizeof(host->affinity));
- host->alt_port = dec_int(sizeof(host->alt_port));
host->flip = dec_int(sizeof(host->flip));
host->msg_size = dec_int(sizeof(host->msg_size));
host->mtu_size = dec_int(sizeof(host->mtu_size));
Modified: qperf/branches/upstream/current/src/qperf.h
===================================================================
--- qperf/branches/upstream/current/src/qperf.h 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/qperf.h 2009-03-14 13:38:02 UTC (rev 209)
@@ -49,7 +49,7 @@
#define cardof(a) (sizeof(a)/sizeof(*a))
#define endof(a) (&a[cardof(a)])
#define streq(a, b) (strcmp(a, b) == 0)
-#define offset(t, e) ((long)&((t *)0)->e)
+#define offset(t, e) ((int)&((t *)0)->e)
#define is_client() (ServerName != 0)
#define is_sender() (Req.flip ? !is_client() : is_client())
@@ -97,8 +97,6 @@
R_ACCESS_RECV,
L_AFFINITY,
R_AFFINITY,
- L_ALT_PORT,
- R_ALT_PORT,
L_FLIP,
R_FLIP,
L_ID,
@@ -155,7 +153,6 @@
uint16_t req_index; /* Request index (into Tests) */
uint32_t access_recv; /* Access data after receiving */
uint32_t affinity; /* Processor affinity */
- uint32_t alt_port; /* Alternate path port number */
uint32_t flip; /* Flip sender/receiver */
uint32_t msg_size; /* Message Size */
uint32_t mtu_size; /* MTU Size */
@@ -346,12 +343,6 @@
void run_server_ver_rc_compare_swap(void);
void run_client_ver_rc_fetch_add(void);
void run_server_ver_rc_fetch_add(void);
-void run_client_xrc_bi_bw(void);
-void run_server_xrc_bi_bw(void);
-void run_client_xrc_bw(void);
-void run_server_xrc_bw(void);
-void run_client_xrc_lat(void);
-void run_server_xrc_lat(void);
/*
Modified: qperf/branches/upstream/current/src/rdma.c
===================================================================
--- qperf/branches/upstream/current/src/rdma.c 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/rdma.c 2009-03-14 13:38:02 UTC (rev 209)
@@ -33,7 +33,6 @@
* SOFTWARE.
*/
#define _GNU_SOURCE
-#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -76,9 +75,7 @@
/*
* For convenience.
*/
-typedef enum ibv_wr_opcode ibv_op;
-typedef struct ibv_comp_channel ibv_cc;
-typedef struct ibv_xrc_domain ibv_xrc;
+typedef enum ibv_wr_opcode OPCODE;
/*
@@ -107,14 +104,11 @@
* Information specific to a node.
*/
typedef struct NODE {
- uint64_t vaddr; /* Virtual address */
uint32_t lid; /* Local ID */
uint32_t qpn; /* Queue pair number */
uint32_t psn; /* Packet sequence number */
- uint32_t srqn; /* Shared queue number */
uint32_t rkey; /* Remote key */
- uint32_t alt_lid; /* Alternate Path Local LID */
- uint32_t rd_atomic; /* Number of read/atomics supported */
+ uint64_t vaddr; /* Virtual address */
} NODE;
@@ -144,26 +138,21 @@
* RDMA device descriptor.
*/
typedef struct DEVICE {
- NODE lnode; /* Local node information */
- NODE rnode; /* Remote node information */
- IBINFO ib; /* InfiniBand information */
- CMINFO cm; /* Connection Manager information */
- uint32_t qkey; /* Q Key for UD */
- int trans; /* QP transport */
- int msg_size; /* Message size */
- int buf_size; /* Buffer size */
- int max_send_wr; /* Maximum send work requests */
- int max_recv_wr; /* Maximum receive work requests */
- int max_inline; /* Maximum amount of inline data */
- char *buffer; /* Buffer */
- ibv_cc *channel; /* Channel */
- struct ibv_pd *pd; /* Protection domain */
- struct ibv_mr *mr; /* Memory region */
- struct ibv_cq *cq; /* Completion queue */
- struct ibv_qp *qp; /* Queue Pair */
- struct ibv_ah *ah; /* Address handle */
- struct ibv_srq *srq; /* Shared receive queue */
- ibv_xrc *xrc; /* XRC domain */
+ NODE lnode; /* Local node information */
+ NODE rnode; /* Remote node information */
+ IBINFO ib; /* InfiniBand information */
+ CMINFO cm; /* Connection Manager information */
+ int trans; /* QP transport */
+ int maxSendWR; /* Maximum send work requests */
+ int maxRecvWR; /* Maximum receive work requests */
+ int maxInline; /* Maximum amount of inline data */
+ char *buffer; /* Buffer */
+ struct ibv_comp_channel *channel; /* Channel */
+ struct ibv_pd *pd; /* Protection domain */
+ struct ibv_mr *mr; /* Memory region */
+ struct ibv_cq *cq; /* Completion queue */
+ struct ibv_qp *qp; /* QPair */
+ struct ibv_ah *ah; /* Address handle */
} DEVICE;
@@ -203,28 +192,23 @@
static void enc_node(NODE *host);
static void ib_client_atomic(ETEST etest);
static void ib_close(DEVICE *dev);
-static void ib_migrate(DEVICE *dev);
static void ib_open(DEVICE *dev);
+static int ib_poll(DEVICE *dev, struct ibv_wc *wc, int nwc);
+static void ib_post_rdma(DEVICE *dev, OPCODE opcode, int n);
static void ib_post_compare_swap(DEVICE *dev,
int wrid, int offset, uint64_t compare, uint64_t swap);
static void ib_post_fetch_add(DEVICE *dev,
int wrid, int offset, uint64_t add);
+static void ib_post_recv(DEVICE *dev, int n);
+static void ib_post_send(DEVICE *dev, int n);
static void ib_prep(DEVICE *dev);
static void rd_bi_bw(int transport);
static void rd_client_bw(int transport);
-static void rd_client_rdma_bw(int transport, ibv_op opcode);
+static void rd_client_rdma_bw(int transport, OPCODE opcode);
static void rd_client_rdma_read_lat(int transport);
static void rd_close(DEVICE *dev);
-static void rd_mralloc(DEVICE *dev, int size);
-static void rd_mrfree(DEVICE *dev);
-static void rd_open(DEVICE *dev, int trans, int max_send_wr, int max_recv_wr);
-static void rd_params(int transport, long msg_size, int poll, int atomic);
-static int rd_poll(DEVICE *dev, struct ibv_wc *wc, int nwc);
-static void rd_post_rdma_std(DEVICE *dev, ibv_op opcode, int n);
-static void rd_post_recv_std(DEVICE *dev, int n);
-static void rd_post_send(DEVICE *dev, int off, int len,
- int inc, int rep, int stat);
-static void rd_post_send_std(DEVICE *dev, int n);
+static void rd_open(DEVICE *dev, int trans, int maxSendWR, int maxRecvWR);
+static void rd_params(int transport, long msgSize, int poll, int atomic);
static void rd_pp_lat(int transport, IOMODE iomode);
static void rd_pp_lat_loop(DEVICE *dev, IOMODE iomode);
static void rd_prep(DEVICE *dev, int size);
@@ -756,78 +740,7 @@
rd_pp_lat(IBV_QPT_UD, IO_SR);
}
-
/*
- * Measure XRC bi-directional bandwidth (client side).
- */
-void
-run_client_xrc_bi_bw(void)
-{
- par_use(L_ACCESS_RECV);
- par_use(R_ACCESS_RECV);
- rd_params(IBV_QPT_XRC, K64, 1, 0);
- rd_bi_bw(IBV_QPT_XRC);
- show_results(BANDWIDTH);
-}
-
-
-/*
- * Measure XRC bi-directional bandwidth (server side).
- */
-void
-run_server_xrc_bi_bw(void)
-{
- rd_bi_bw(IBV_QPT_XRC);
-}
-
-
-/*
- * Measure XRC bandwidth (client side).
- */
-void
-run_client_xrc_bw(void)
-{
- par_use(L_ACCESS_RECV);
- par_use(R_ACCESS_RECV);
- par_use(L_NO_MSGS);
- par_use(R_NO_MSGS);
- rd_params(IBV_QPT_XRC, K64, 1, 0);
- rd_client_bw(IBV_QPT_XRC);
- show_results(BANDWIDTH);
-}
-
-
-/*
- * Measure XRC bandwidth (server side).
- */
-void
-run_server_xrc_bw(void)
-{
- rd_server_def(IBV_QPT_XRC);
-}
-
-
-/*
- * Measure XRC latency (client side).
- */
-void
-run_client_xrc_lat(void)
-{
- rd_params(IBV_QPT_XRC, 1, 1, 0);
- rd_pp_lat(IBV_QPT_XRC, IO_SR);
-}
-
-
-/*
- * Measure XRC latency (server side).
- */
-void
-run_server_xrc_lat(void)
-{
- rd_pp_lat(IBV_QPT_XRC, IO_SR);
-}
-
-/*
* Verify RC compare and swap (client side).
*/
void
@@ -856,7 +769,7 @@
result = (uint64_t *) dev.buffer;
while (!Finished) {
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
+ int n = ib_poll(&dev, wc, cardof(wc));
uint64_t res;
if (Finished)
@@ -866,7 +779,6 @@
for (i = 0; i < n; ++i) {
int x = wc[i].wr_id;
int status = wc[i].status;
-
if (status == IBV_WC_SUCCESS) {
LStat.rem_r.no_bytes += sizeof(uint64_t);
LStat.rem_r.no_msgs++;
@@ -926,7 +838,7 @@
result = (uint64_t *) dev.buffer;
while (!Finished) {
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
+ int n = ib_poll(&dev, wc, cardof(wc));
uint64_t res;
if (Finished)
@@ -936,7 +848,6 @@
for (i = 0; i < n; ++i) {
int x = wc[i].wr_id;
int status = wc[i].status;
-
if (status == IBV_WC_SUCCESS) {
LStat.rem_r.no_bytes += sizeof(uint64_t);
LStat.rem_r.no_msgs++;
@@ -974,18 +885,18 @@
rd_client_bw(int transport)
{
DEVICE dev;
- long sent = 0;
+ long sent = 0;
rd_open(&dev, transport, NCQE, 0);
rd_prep(&dev, 0);
sync_test();
- rd_post_send_std(&dev, left_to_send(&sent, NCQE));
+ ib_post_send(&dev, left_to_send(&sent, NCQE));
sent = NCQE;
while (!Finished) {
int i;
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
+ int n = ib_poll(&dev, wc, cardof(wc));
if (n > LStat.max_cqes)
LStat.max_cqes = n;
if (Finished)
@@ -993,7 +904,6 @@
for (i = 0; i < n; ++i) {
int id = wc[i].wr_id;
int status = wc[i].status;
-
if (id != WRID_SEND)
debug("bad WR ID %d", id);
else if (status != IBV_WC_SUCCESS)
@@ -1004,7 +914,7 @@
break;
n = left_to_send(&sent, n);
}
- rd_post_send_std(&dev, n);
+ ib_post_send(&dev, n);
sent += n;
}
stop_test_timer();
@@ -1024,32 +934,30 @@
rd_open(&dev, transport, 0, NCQE);
rd_prep(&dev, 0);
- rd_post_recv_std(&dev, NCQE);
+ ib_post_recv(&dev, NCQE);
sync_test();
while (!Finished) {
int i;
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
-
+ int n = ib_poll(&dev, wc, cardof(wc));
if (Finished)
break;
if (n > LStat.max_cqes)
LStat.max_cqes = n;
for (i = 0; i < n; ++i) {
int status = wc[i].status;
-
if (status == IBV_WC_SUCCESS) {
- LStat.r.no_bytes += dev.msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
if (Req.access_recv)
- touch_data(dev.buffer, dev.msg_size);
+ touch_data(dev.buffer, Req.msg_size);
} else
do_error(status, &LStat.r.no_errs);
}
if (Req.no_msgs)
if (LStat.r.no_msgs + LStat.r.no_errs >= Req.no_msgs)
break;
- rd_post_recv_std(&dev, n);
+ ib_post_recv(&dev, n);
}
stop_test_timer();
exchange_results();
@@ -1067,16 +975,15 @@
rd_open(&dev, transport, NCQE, NCQE);
rd_prep(&dev, 0);
- rd_post_recv_std(&dev, NCQE);
+ ib_post_recv(&dev, NCQE);
sync_test();
- rd_post_send_std(&dev, NCQE);
+ ib_post_send(&dev, NCQE);
while (!Finished) {
int i;
struct ibv_wc wc[NCQE];
int numSent = 0;
int numRecv = 0;
- int n = rd_poll(&dev, wc, cardof(wc));
-
+ int n = ib_poll(&dev, wc, cardof(wc));
if (Finished)
break;
if (n > LStat.max_cqes)
@@ -1084,7 +991,6 @@
for (i = 0; i < n; ++i) {
int id = wc[i].wr_id;
int status = wc[i].status;
-
switch (id) {
case WRID_SEND:
if (status != IBV_WC_SUCCESS)
@@ -1093,10 +999,10 @@
break;
case WRID_RECV:
if (status == IBV_WC_SUCCESS) {
- LStat.r.no_bytes += dev.msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
if (Req.access_recv)
- touch_data(dev.buffer, dev.msg_size);
+ touch_data(dev.buffer, Req.msg_size);
} else
do_error(status, &LStat.r.no_errs);
++numRecv;
@@ -1106,9 +1012,9 @@
}
}
if (numRecv)
- rd_post_recv_std(&dev, numRecv);
+ ib_post_recv(&dev, numRecv);
if (numSent)
- rd_post_send_std(&dev, numSent);
+ ib_post_send(&dev, numSent);
}
stop_test_timer();
exchange_results();
@@ -1142,28 +1048,25 @@
rd_pp_lat_loop(DEVICE *dev, IOMODE iomode)
{
int done = 1;
-
- rd_post_recv_std(dev, 1);
+ ib_post_recv(dev, 1);
sync_test();
if (is_client()) {
if (iomode == IO_SR)
- rd_post_send_std(dev, 1);
+ ib_post_send(dev, 1);
else
- rd_post_rdma_std(dev, IBV_WR_RDMA_WRITE_WITH_IMM, 1);
+ ib_post_rdma(dev, IBV_WR_RDMA_WRITE_WITH_IMM, 1);
done = 0;
}
while (!Finished) {
int i;
struct ibv_wc wc[2];
- int n = rd_poll(dev, wc, cardof(wc));
-
+ int n = ib_poll(dev, wc, cardof(wc));
if (Finished)
break;
for (i = 0; i < n; ++i) {
int id = wc[i].wr_id;
int status = wc[i].status;
-
switch (id) {
case WRID_SEND:
case WRID_RDMA:
@@ -1173,9 +1076,9 @@
continue;
case WRID_RECV:
if (status == IBV_WC_SUCCESS) {
- LStat.r.no_bytes += dev->msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
- rd_post_recv_std(dev, 1);
+ ib_post_recv(dev, 1);
} else
do_error(status, &LStat.r.no_errs);
done |= 2;
@@ -1188,9 +1091,9 @@
}
if (done == 3) {
if (iomode == IO_SR)
- rd_post_send_std(dev, 1);
+ ib_post_send(dev, 1);
else
- rd_post_rdma_std(dev, IBV_WR_RDMA_WRITE_WITH_IMM, 1);
+ ib_post_rdma(dev, IBV_WR_RDMA_WRITE_WITH_IMM, 1);
done = 0;
}
}
@@ -1216,7 +1119,7 @@
rd_prep(&dev, 0);
sync_test();
p = &dev.buffer[0];
- q = &dev.buffer[dev.msg_size-1];
+ q = &dev.buffer[Req.msg_size-1];
while (!Finished) {
*p = locID;
*q = locID;
@@ -1225,7 +1128,7 @@
int n;
struct ibv_wc wc[2];
- rd_post_rdma_std(&dev, IBV_WR_RDMA_WRITE, 1);
+ ib_post_rdma(&dev, IBV_WR_RDMA_WRITE, 1);
if (Finished)
break;
n = ibv_poll_cq(dev.cq, cardof(wc), wc);
@@ -1234,7 +1137,6 @@
for (i = 0; i < n; ++i) {
int id = wc[i].wr_id;
int status = wc[i].status;
-
if (id != WRID_RDMA)
debug("bad WR ID %d", id);
else if (status != IBV_WC_SUCCESS)
@@ -1244,7 +1146,7 @@
while (!Finished)
if (*p == remID && *q == remID)
break;
- LStat.r.no_bytes += dev.msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
send = 1;
}
@@ -1265,11 +1167,10 @@
rd_open(&dev, transport, 1, 0);
rd_prep(&dev, 0);
sync_test();
- rd_post_rdma_std(&dev, IBV_WR_RDMA_READ, 1);
+ ib_post_rdma(&dev, IBV_WR_RDMA_READ, 1);
while (!Finished) {
struct ibv_wc wc;
- int n = rd_poll(&dev, &wc, 1);
-
+ int n = ib_poll(&dev, &wc, 1);
if (n == 0)
continue;
if (Finished)
@@ -1279,13 +1180,13 @@
continue;
}
if (wc.status == IBV_WC_SUCCESS) {
- LStat.r.no_bytes += dev.msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
- LStat.rem_s.no_bytes += dev.msg_size;
+ LStat.rem_s.no_bytes += Req.msg_size;
LStat.rem_s.no_msgs++;
} else
do_error(wc.status, &LStat.s.no_errs);
- rd_post_rdma_std(&dev, IBV_WR_RDMA_READ, 1);
+ ib_post_rdma(&dev, IBV_WR_RDMA_READ, 1);
}
stop_test_timer();
exchange_results();
@@ -1298,39 +1199,37 @@
* Measure RDMA bandwidth (client side).
*/
static void
-rd_client_rdma_bw(int transport, ibv_op opcode)
+rd_client_rdma_bw(int transport, OPCODE opcode)
{
DEVICE dev;
rd_open(&dev, transport, NCQE, 0);
rd_prep(&dev, 0);
sync_test();
- rd_post_rdma_std(&dev, opcode, NCQE);
+ ib_post_rdma(&dev, opcode, NCQE);
while (!Finished) {
int i;
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
-
+ int n = ib_poll(&dev, wc, cardof(wc));
if (Finished)
break;
if (n > LStat.max_cqes)
LStat.max_cqes = n;
for (i = 0; i < n; ++i) {
int status = wc[i].status;
-
if (status == IBV_WC_SUCCESS) {
if (opcode == IBV_WR_RDMA_READ) {
- LStat.r.no_bytes += dev.msg_size;
+ LStat.r.no_bytes += Req.msg_size;
LStat.r.no_msgs++;
- LStat.rem_s.no_bytes += dev.msg_size;
+ LStat.rem_s.no_bytes += Req.msg_size;
LStat.rem_s.no_msgs++;
if (Req.access_recv)
- touch_data(dev.buffer, dev.msg_size);
+ touch_data(dev.buffer, Req.msg_size);
}
} else
do_error(status, &LStat.s.no_errs);
}
- rd_post_rdma_std(&dev, opcode, n);
+ ib_post_rdma(&dev, opcode, n);
}
stop_test_timer();
exchange_results();
@@ -1396,15 +1295,13 @@
while (!Finished) {
struct ibv_wc wc[NCQE];
- int n = rd_poll(&dev, wc, cardof(wc));
-
+ int n = ib_poll(&dev, wc, cardof(wc));
if (Finished)
break;
if (n > LStat.max_cqes)
LStat.max_cqes = n;
for (i = 0; i < n; ++i) {
int status = wc[i].status;
-
if (status == IBV_WC_SUCCESS) {
LStat.rem_r.no_bytes += sizeof(uint64_t);
LStat.rem_r.no_msgs++;
@@ -1428,9 +1325,8 @@
* Set default parameters.
*/
static void
-rd_params(int transport, long msg_size, int poll, int atomic)
+rd_params(int transport, long msgSize, int poll, int atomic)
{
- //if (transport == IBV_QPT_RC || transport == IBV_QPT_UD) {
if (transport == IBV_QPT_RC) {
par_use(L_USE_CM);
par_use(R_USE_CM);
@@ -1450,9 +1346,9 @@
par_use(R_STATIC_RATE);
}
- if (msg_size) {
- setp_u32(0, L_MSG_SIZE, msg_size);
- setp_u32(0, R_MSG_SIZE, msg_size);
+ if (msgSize) {
+ setp_u32(0, L_MSG_SIZE, msgSize);
+ setp_u32(0, R_MSG_SIZE, msgSize);
}
if (poll) {
@@ -1472,7 +1368,7 @@
* Open a RDMA device.
*/
static void
-rd_open(DEVICE *dev, int trans, int max_send_wr, int max_recv_wr)
+rd_open(DEVICE *dev, int trans, int maxSendWR, int maxRecvWR)
{
/* Send request to client */
if (is_client())
@@ -1483,8 +1379,8 @@
/* Set transport type and maximum work request parameters */
dev->trans = trans;
- dev->max_send_wr = max_send_wr;
- dev->max_recv_wr = max_recv_wr;
+ dev->maxSendWR = maxSendWR;
+ dev->maxRecvWR = maxRecvWR;
/* Open device */
if (Req.use_cm)
@@ -1499,7 +1395,7 @@
if (ibv_query_qp(dev->qp, &qp_attr, 0, &qp_init_attr) != 0)
error(SYS, "query QP failed");
- dev->max_inline = qp_attr.cap.max_inline_data;
+ dev->maxInline = qp_attr.cap.max_inline_data;
}
}
@@ -1510,16 +1406,28 @@
static void
rd_prep(DEVICE *dev, int size)
{
- /* Set the size of the messages we transfer */
- if (size == 0)
- dev->msg_size = Req.msg_size;
-
/* Allocate memory region */
if (size == 0)
- size = dev->msg_size;
+ size = Req.msg_size;
if (dev->trans == IBV_QPT_UD)
size += GRH_SIZE;
- rd_mralloc(dev, size);
+ if (size == 0)
+ size = 1;
+ if (size) {
+ int pagesize = sysconf(_SC_PAGESIZE);
+ if (posix_memalign((void **)&dev->buffer, pagesize, size) != 0)
+ error(SYS, "failed to allocate memory");
+ memset(dev->buffer, 0, size);
+ int flags = IBV_ACCESS_LOCAL_WRITE |
+ IBV_ACCESS_REMOTE_READ |
+ IBV_ACCESS_REMOTE_WRITE |
+ IBV_ACCESS_REMOTE_ATOMIC;
+ dev->mr = ibv_reg_mr(dev->pd, dev->buffer, size, flags);
+ if (!dev->mr)
+ error(SYS, "failed to allocate memory region");
+ dev->lnode.rkey = dev->mr->rkey;
+ dev->lnode.vaddr = (unsigned long)dev->buffer;
+ }
/* Exchange node information */
{
@@ -1561,27 +1469,17 @@
if (!Debug)
return;
n = &dev->lnode;
-
if (Req.use_cm)
debug("L: rkey=%08x vaddr=%010x", n->rkey, n->vaddr);
- else if (dev->trans == IBV_QPT_XRC) {
- debug("L: lid=%04x qpn=%06x psn=%06x rkey=%08x vaddr=%010x srqn=%08x",
- n->lid, n->qpn, n->psn, n->rkey, n->vaddr, n->srqn);
- } else {
+ else
debug("L: lid=%04x qpn=%06x psn=%06x rkey=%08x vaddr=%010x",
- n->lid, n->qpn, n->psn, n->rkey, n->vaddr);
- }
-
+ n->lid, n->qpn, n->psn, n->rkey, n->vaddr);
n = &dev->rnode;
if (Req.use_cm)
debug("R: rkey=%08x vaddr=%010x", n->rkey, n->vaddr);
- else if (dev->trans == IBV_QPT_XRC) {
- debug("R: lid=%04x qpn=%06x psn=%06x rkey=%08x vaddr=%010x srqn=%08x",
- n->lid, n->qpn, n->psn, n->rkey, n->vaddr);
- } else {
+ else
debug("R: lid=%04x qpn=%06x psn=%06x rkey=%08x vaddr=%010x",
- n->lid, n->qpn, n->psn, n->rkey, n->vaddr, n->srqn);
- }
+ n->lid, n->qpn, n->psn, n->rkey, n->vaddr);
}
@@ -1596,11 +1494,14 @@
ibv_destroy_ah(dev->ah);
if (dev->cq)
ibv_destroy_cq(dev->cq);
+ if (dev->mr)
+ ibv_dereg_mr(dev->mr);
if (dev->pd)
ibv_dealloc_pd(dev->pd);
if (dev->channel)
ibv_destroy_comp_channel(dev->channel);
- rd_mrfree(dev);
+ if (dev->buffer)
+ free(dev->buffer);
if (Req.use_cm)
cm_close(dev);
@@ -1621,14 +1522,12 @@
{
struct ibv_device_attr dev_attr;
- if (ibv_query_device(context, &dev_attr) != SUCCESS0)
+ if (ibv_query_device(context, &dev_attr) != 0)
error(SYS, "query device failed");
if (Req.rd_atomic == 0)
- dev->lnode.rd_atomic = dev_attr.max_qp_rd_atom;
- else if (Req.rd_atomic <= dev_attr.max_qp_rd_atom)
- dev->lnode.rd_atomic = Req.rd_atomic;
- else
- error(0, "device only supports %d (< %d) RDMA reads or atomics",
+ Req.rd_atomic = dev_attr.max_qp_rd_atom;
+ else if (Req.rd_atomic > dev_attr.max_qp_rd_atom)
+ error(0, "device only supports %d (< %d) RDMA reads or atomic ops",
dev_attr.max_qp_rd_atom, Req.rd_atomic);
}
@@ -1644,52 +1543,31 @@
/* Create completion queue */
dev->cq = ibv_create_cq(context,
- dev->max_send_wr+dev->max_recv_wr, 0, dev->channel, 0);
+ dev->maxSendWR+dev->maxRecvWR, 0, dev->channel, 0);
if (!dev->cq)
error(SYS, "failed to create completion queue");
/* Create queue pair */
{
- struct ibv_qp_init_attr qp_attr ={
+ struct ibv_qp_init_attr attr ={
.send_cq = dev->cq,
.recv_cq = dev->cq,
.cap ={
- .max_send_wr = dev->max_send_wr,
- .max_recv_wr = dev->max_recv_wr,
+ .max_send_wr = dev->maxSendWR,
+ .max_recv_wr = dev->maxRecvWR,
.max_send_sge = 1,
.max_recv_sge = 1,
+ .max_inline_data = 0
},
.qp_type = dev->trans
};
if (Req.use_cm) {
- if (rdma_create_qp(id, dev->pd, &qp_attr) != 0)
- error(SYS, "failed to create QP");
+ if (rdma_create_qp(id, dev->pd, &attr) != 0)
+ error(0, "failed to create QP");
dev->qp = id->qp;
} else {
- if (dev->trans == IBV_QPT_XRC) {
- struct ibv_srq_init_attr srq_attr ={
- .attr ={
- .max_wr = dev->max_recv_wr,
- .max_sge = 1
- }
- };
-
- dev->xrc = ibv_open_xrc_domain(context, -1, O_CREAT);
- if (!dev->xrc)
- error(SYS, "failed to open XRC domain");
-
- dev->srq = ibv_create_xrc_srq(dev->pd, dev->xrc, dev->cq,
- &srq_attr);
- if (!dev->srq)
- error(SYS, "failed to create SRQ");
-
- qp_attr.cap.max_recv_wr = 0;
- qp_attr.cap.max_recv_sge = 0;
- qp_attr.xrc_domain = dev->xrc;
- }
-
- dev->qp = ibv_create_qp(dev->pd, &qp_attr);
+ dev->qp = ibv_create_qp(dev->pd, &attr);
if (!dev->qp)
error(SYS, "failed to create QP");
}
@@ -1698,57 +1576,6 @@
/*
- * Allocate a memory region and register it.
- */
-static void
-rd_mralloc(DEVICE *dev, int size)
-{
- int flags;
- int pagesize;
-
- if (dev->buffer)
- error(BUG, "rd_mralloc: memory region already allocated");
- if (size == 0)
- return;
-
- pagesize = sysconf(_SC_PAGESIZE);
- if (posix_memalign((void **)&dev->buffer, pagesize, size) != 0)
- error(SYS, "failed to allocate memory");
- memset(dev->buffer, 0, size);
- dev->buf_size = size;
- flags = IBV_ACCESS_LOCAL_WRITE |
- IBV_ACCESS_REMOTE_READ |
- IBV_ACCESS_REMOTE_WRITE |
- IBV_ACCESS_REMOTE_ATOMIC;
- dev->mr = ibv_reg_mr(dev->pd, dev->buffer, size, flags);
- if (!dev->mr)
- error(SYS, "failed to allocate memory region");
- dev->lnode.rkey = dev->mr->rkey;
- dev->lnode.vaddr = (unsigned long)dev->buffer;
-}
-
-
-/*
- * Free the memory region.
- */
-static void
-rd_mrfree(DEVICE *dev)
-{
- if (dev->mr)
- ibv_dereg_mr(dev->mr);
- dev->mr = 0;
-
- if (dev->buffer)
- free(dev->buffer);
- dev->buffer = 0;
- dev->buf_size = 0;
-
- dev->lnode.rkey = 0;
- dev->lnode.vaddr = 0;
-}
-
-
-/*
* Open a device using the Connection Manager.
*/
static void
@@ -1770,12 +1597,11 @@
cm_init(DEVICE *dev)
{
CMINFO *cm = &dev->cm;
- int portspace = (dev->trans == IBV_QPT_RC) ? RDMA_PS_TCP : RDMA_PS_UDP;
cm->channel = rdma_create_event_channel();
if (!cm->channel)
error(0, "rdma_create_event_channel failed");
- if (rdma_create_id(cm->channel, &cm->id, 0, portspace) != 0)
+ if (rdma_create_id(cm->channel, &cm->id, 0, RDMA_PS_TCP) != 0)
error(0, "rdma_create_id failed");
}
@@ -1792,6 +1618,12 @@
.ai_family = AF_INET,
.ai_socktype = SOCK_STREAM
};
+ struct rdma_conn_param param ={
+ .responder_resources = 1,
+ .initiator_depth = 1,
+ .rnr_retry_count = RNR_RETRY_CNT,
+ .retry_count = RETRY_CNT
+ };
int timeout = Req.timeout * 1000;
CMINFO *cm = &dev->cm;
@@ -1810,35 +1642,12 @@
error(0, "rdma_resolve_route failed");
cm_expect_event(dev, RDMA_CM_EVENT_ROUTE_RESOLVED);
cm_ack_event(dev);
- rd_create_qp(dev, cm->id->verbs, cm->id);
- if (dev->trans == IBV_QPT_RC) {
- struct rdma_conn_param param ={
- .responder_resources = 1,
- .initiator_depth = 1,
- .rnr_retry_count = RNR_RETRY_CNT,
- .retry_count = RETRY_CNT
- };
-
- if (rdma_connect(cm->id, ¶m) != 0)
- error(0, "rdma_connect failed");
- cm_expect_event(dev, RDMA_CM_EVENT_ESTABLISHED);
- cm_ack_event(dev);
- } else if (dev->trans == IBV_QPT_UD) {
- struct rdma_conn_param param ={
- .qp_num = cm->id->qp->qp_num
- };
-
- if (rdma_connect(cm->id, ¶m) != 0)
- error(0, "rdma_connect failed");
- cm_expect_event(dev, RDMA_CM_EVENT_ESTABLISHED);
- dev->qkey = cm->event->param.ud.qkey;
- dev->ah = ibv_create_ah(dev->pd, &cm->event->param.ud.ah_attr);
- if (!dev->ah)
- error(SYS, "failed to create address handle");
- cm_ack_event(dev);
- } else
- error(BUG, "cm_open_client: bad transport: %d", dev->trans);
+ rd_create_qp(dev, cm->id->verbs, cm->id);
+ if (rdma_connect(cm->id, ¶m) != 0)
+ error(0, "rdma_connect failed");
+ cm_expect_event(dev, RDMA_CM_EVENT_ESTABLISHED);
+ cm_ack_event(dev);
}
@@ -1854,6 +1663,12 @@
.sin_addr.s_addr = htonl(INADDR_ANY),
.sin_port = htons(0)
};
+ struct rdma_conn_param param ={
+ .responder_resources = 1,
+ .initiator_depth = 1,
+ .rnr_retry_count = RNR_RETRY_CNT,
+ .retry_count = RETRY_CNT
+ };
CMINFO *cm = &dev->cm;
if (rdma_bind_addr(cm->id, (SA *)&saddr) != 0)
@@ -1867,39 +1682,11 @@
cm_expect_event(dev, RDMA_CM_EVENT_CONNECT_REQUEST);
rd_create_qp(dev, cm->event->id->verbs, cm->event->id);
- if (dev->trans == IBV_QPT_RC) {
- struct rdma_conn_param param ={
- .responder_resources = 1,
- .initiator_depth = 1,
- .rnr_retry_count = RNR_RETRY_CNT,
- .retry_count = RETRY_CNT
- };
- struct ibv_qp_attr rtr_attr ={
- .min_rnr_timer = MIN_RNR_TIMER,
- };
-
- if (rdma_accept(cm->event->id, ¶m) != 0)
- error(0, "rdma_accept failed");
- cm_ack_event(dev);
- cm_expect_event(dev, RDMA_CM_EVENT_ESTABLISHED);
- cm_ack_event(dev);
-
- /* Do not complain on error as we might be on a iWARP device */
- ibv_modify_qp(dev->qp, &rtr_attr, IBV_QP_MIN_RNR_TIMER);
- } else if (dev->trans == IBV_QPT_UD) {
- struct rdma_conn_param param ={
- .qp_num = cm->event->id->qp->qp_num
- };
-
- if (rdma_accept(cm->event->id, ¶m) != 0)
- error(0, "rdma_accept failed");
- dev->qkey = cm->event->param.ud.qkey;
- dev->ah = ibv_create_ah(dev->pd, &cm->event->param.ud.ah_attr);
- if (!dev->ah)
- error(SYS, "failed to create address handle");
- cm_ack_event(dev);
- } else
- error(BUG, "cm_open_server: bad transport: %d", dev->trans);
+ if (rdma_accept(cm->event->id, ¶m) != 0)
+ error(0, "rdma_accept failed");
+ cm_ack_event(dev);
+ cm_expect_event(dev, RDMA_CM_EVENT_ESTABLISHED);
+ cm_ack_event(dev);
}
@@ -1909,6 +1696,13 @@
static void
cm_prep(DEVICE *dev)
{
+ struct ibv_qp_attr rtr_attr ={
+ .min_rnr_timer = MIN_RNR_TIMER,
+ };
+
+ /* Do not complain if error as we might be on a iWARP device */
+ if (dev->trans == IBV_QPT_RC)
+ ibv_modify_qp(dev->qp, &rtr_attr, IBV_QP_MIN_RNR_TIMER);
}
@@ -1929,7 +1723,7 @@
/*
- * Get an event from the Connection Manager. If it is not what we expect,
+ * Get an event from the Communication Manager. If it is not what we expect,
* complain.
*/
static void
@@ -1950,8 +1744,7 @@
/*
- * Return a name given a RDMA CM event number. We first look at our list. If
- * that fails, we call the standard rdma_event_str routine.
+ * Return a name given a RDMA CM event number.
*/
static char *
cm_event_name(int event, char *data, int size)
@@ -1961,8 +1754,7 @@
for (i = 0; i < cardof(CMEvents); ++i)
if (event == CMEvents[i].value)
return CMEvents[i].name;
- strncpy(data, rdma_event_str(event), size);
- data[size-1] = '\0';
+ snprintf(data, size, "%d", event);
return data;
}
@@ -1987,7 +1779,6 @@
/* Determine MTU */
{
int mtu = Req.mtu_size;
-
if (mtu == 256)
dev->ib.mtu = IBV_MTU_256;
else if (mtu == 512)
@@ -2006,7 +1797,6 @@
{
int port = 1;
char *p = index(Req.id, ':');
-
if (p) {
*p++ = '\0';
port = atoi(p);
@@ -2031,9 +1821,6 @@
}
}
- /* Set up Q Key */
- dev->qkey = QKEY;
-
/* Open device */
{
struct ibv_device *device;
@@ -2062,8 +1849,8 @@
/* Set up local node LID */
{
struct ibv_port_attr port_attr;
- int stat = ibv_query_port(dev->ib.context, dev->ib.port, &port_attr);
+ int stat = ibv_query_port(dev->ib.context, dev->ib.port, &port_attr);
if (stat != 0)
error(SYS, "query port failed");
srand48(getpid()*time(0));
@@ -2084,8 +1871,8 @@
if (dev->trans == IBV_QPT_UD) {
flags |= IBV_QP_QKEY;
- attr.qkey = dev->qkey;
- } else if (dev->trans == IBV_QPT_RC || dev->trans == IBV_QPT_XRC) {
+ attr.qkey = QKEY;
+ } else if (dev->trans == IBV_QPT_RC) {
flags |= IBV_QP_ACCESS_FLAGS;
attr.qp_access_flags =
IBV_ACCESS_REMOTE_READ |
@@ -2095,25 +1882,13 @@
flags |= IBV_QP_ACCESS_FLAGS;
attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE;
}
- if (ibv_modify_qp(dev->qp, &attr, flags) != SUCCESS0)
+ if (ibv_modify_qp(dev->qp, &attr, flags) != 0)
error(SYS, "failed to modify QP to INIT state");
}
- /* Set up local node QP number, PSN and SRQ number */
+ /* Set up local node QP number and PSN */
dev->lnode.qpn = dev->qp->qp_num;
dev->lnode.psn = lrand48() & 0xffffff;
- if (dev->trans == IBV_QPT_XRC)
- dev->lnode.srqn = dev->srq->xrc_srq_num;
-
- /* Set up alternate port LID */
- if (Req.alt_port) {
- struct ibv_port_attr port_attr;
- int stat = ibv_query_port(dev->ib.context, Req.alt_port, &port_attr);
-
- if (stat != SUCCESS0)
- error(SYS, "query port failed");
- dev->lnode.alt_lid = port_attr.lid;
- }
}
@@ -2131,7 +1906,7 @@
.dest_qp_num = dev->rnode.qpn,
.rq_psn = dev->rnode.psn,
.min_rnr_timer = MIN_RNR_TIMER,
- .max_dest_rd_atomic = dev->lnode.rd_atomic,
+ .max_dest_rd_atomic = Req.rd_atomic,
.ah_attr = {
.dlid = dev->rnode.lid,
.port_num = dev->ib.port,
@@ -2140,20 +1915,12 @@
}
};
struct ibv_qp_attr rts_attr ={
- .qp_state = IBV_QPS_RTS,
- .timeout = LOCAL_ACK_TIMEOUT,
- .retry_cnt = RETRY_CNT,
- .rnr_retry = RNR_RETRY_CNT,
- .sq_psn = dev->lnode.psn,
- .max_rd_atomic = dev->rnode.rd_atomic,
- .path_mig_state = IBV_MIG_REARM,
- .alt_port_num = Req.alt_port,
- .alt_ah_attr = {
- .dlid = dev->rnode.alt_lid,
- .port_num = Req.alt_port,
- .static_rate = dev->ib.rate,
- .sl = Req.sl
- }
+ .qp_state = IBV_QPS_RTS,
+ .timeout = LOCAL_ACK_TIMEOUT,
+ .retry_cnt = RETRY_CNT,
+ .rnr_retry = RNR_RETRY_CNT,
+ .sq_psn = dev->lnode.psn,
+ .max_rd_atomic = Req.rd_atomic
};
struct ibv_ah_attr ah_attr ={
.dlid = dev->rnode.lid,
@@ -2177,7 +1944,7 @@
dev->ah = ibv_create_ah(dev->pd, &ah_attr);
if (!dev->ah)
error(SYS, "failed to create address handle");
- } else if (dev->trans == IBV_QPT_RC || dev->trans == IBV_QPT_XRC) {
+ } else if (dev->trans == IBV_QPT_RC) {
/* Modify queue pair to RTR */
flags = IBV_QP_STATE |
IBV_QP_AV |
@@ -2196,8 +1963,6 @@
IBV_QP_RNR_RETRY |
IBV_QP_SQ_PSN |
IBV_QP_MAX_QP_RD_ATOMIC;
- if (dev->trans == IBV_QPT_RC && dev->rnode.alt_lid)
- flags |= IBV_QP_ALT_PATH | IBV_QP_PATH_MIG_STATE;
if (ibv_modify_qp(dev->qp, &rts_attr, flags) != 0)
error(SYS, "failed to modify QP to RTS");
} else if (dev->trans == IBV_QPT_UC) {
@@ -2213,8 +1978,6 @@
/* Modify queue pair to RTS */
flags = IBV_QP_STATE |
IBV_QP_SQ_PSN;
- if (dev->rnode.alt_lid)
- flags |= IBV_QP_ALT_PATH | IBV_QP_PATH_MIG_STATE;
if (ibv_modify_qp(dev->qp, &rts_attr, flags) != 0)
error(SYS, "failed to modify QP to RTS");
}
@@ -2229,10 +1992,6 @@
{
if (dev->qp)
ibv_destroy_qp(dev->qp);
- if (dev->srq)
- ibv_destroy_srq(dev->srq);
- if (dev->xrc)
- ibv_close_xrc_domain(dev->xrc);
if (dev->ib.context)
ibv_close_device(dev->ib.context);
if (dev->ib.devlist)
@@ -2241,30 +2000,6 @@
/*
- * Cause a path migration to happen.
- */
-static void
-ib_migrate(DEVICE *dev)
-{
- if (!Req.alt_port)
- return;
- /* Only migrate once. */
- Req.alt_port = 0;
- if (dev->trans != IBV_QPT_RC && dev->trans != IBV_QPT_UC)
- return;
-
- {
- struct ibv_qp_attr attr ={
- .path_mig_state = IBV_MIG_MIGRATED,
- };
-
- if (ibv_modify_qp(dev->qp, &attr, IBV_QP_PATH_MIG_STATE) != SUCCESS0)
- error(SYS, "failed to modify QP to Migrated state");
- }
-}
-
-
-/*
* Post a compare and swap request.
*/
static void
@@ -2284,17 +2019,17 @@
.send_flags = IBV_SEND_SIGNALED,
.wr = {
.atomic = {
- .remote_addr = dev->rnode.vaddr,
- .rkey = dev->rnode.rkey,
- .compare_add = compare,
- .swap = swap
+ .remote_addr = dev->rnode.vaddr,
+ .rkey = dev->rnode.rkey,
+ .compare_add = compare,
+ .swap = swap
}
}
};
- struct ibv_send_wr *badwr;
+ struct ibv_send_wr *badWR;
errno = 0;
- if (ibv_post_send(dev->qp, &wr, &badwr) != SUCCESS0) {
+ if (ibv_post_send(dev->qp, &wr, &badWR) != SUCCESS0) {
if (Finished && errno == EINTR)
return;
error(SYS, "failed to post compare and swap");
@@ -2324,16 +2059,16 @@
.send_flags = IBV_SEND_SIGNALED,
.wr = {
.atomic = {
- .remote_addr = dev->rnode.vaddr,
- .rkey = dev->rnode.rkey,
- .compare_add = add
+ .remote_addr = dev->rnode.vaddr,
+ .rkey = dev->rnode.rkey,
+ .compare_add = add
}
}
};
- struct ibv_send_wr *badwr;
+ struct ibv_send_wr *badWR;
errno = 0;
- if (ibv_post_send(dev->qp, &wr, &badwr) != SUCCESS0) {
+ if (ibv_post_send(dev->qp, &wr, &badWR) != SUCCESS0) {
if (Finished && errno == EINTR)
return;
error(SYS, "failed to post fetch and add");
@@ -2345,25 +2080,14 @@
/*
- * The standard version to post sends that most of the test routines call.
* Post n sends.
*/
static void
-rd_post_send_std(DEVICE *dev, int n)
+ib_post_send(DEVICE *dev, int n)
{
- rd_post_send(dev, 0, dev->msg_size, 0, n, 1);
-}
-
-
-/*
- * Post one or more sends.
- */
-static void
-rd_post_send(DEVICE *dev, int off, int len, int inc, int rep, int stat)
-{
struct ibv_sge sge ={
- .addr = (uintptr_t) &dev->buffer[off],
- .length = len,
+ .addr = (uintptr_t) dev->buffer,
+ .length = Req.msg_size,
.lkey = dev->mr->lkey
};
struct ibv_send_wr wr ={
@@ -2373,31 +2097,24 @@
.opcode = IBV_WR_SEND,
.send_flags = IBV_SEND_SIGNALED,
};
- struct ibv_send_wr *badwr;
+ struct ibv_send_wr *badWR;
if (dev->trans == IBV_QPT_UD) {
wr.wr.ud.ah = dev->ah;
wr.wr.ud.remote_qpn = dev->rnode.qpn;
- wr.wr.ud.remote_qkey = dev->qkey;
- } else if (dev->trans == IBV_QPT_XRC)
- wr.xrc_remote_srq_num = dev->rnode.srqn;
-
- if (dev->msg_size <= dev->max_inline)
+ wr.wr.ud.remote_qkey = QKEY;
+ }
+ if (Req.msg_size <= dev->maxInline)
wr.send_flags |= IBV_SEND_INLINE;
-
errno = 0;
- while (!Finished && rep-- > 0) {
- if (ibv_post_send(dev->qp, &wr, &badwr) != SUCCESS0) {
+ while (n-- > 0) {
+ if (ibv_post_send(dev->qp, &wr, &badWR) != SUCCESS0) {
if (Finished && errno == EINTR)
return;
error(SYS, "failed to post send");
}
- sge.addr += inc;
- sge.length += inc;
- if (stat) {
- LStat.s.no_bytes += dev->msg_size;
- LStat.s.no_msgs++;
- }
+ LStat.s.no_bytes += Req.msg_size;
+ LStat.s.no_msgs++;
}
}
@@ -2406,11 +2123,11 @@
* Post n receives.
*/
static void
-rd_post_recv_std(DEVICE *dev, int n)
+ib_post_recv(DEVICE *dev, int n)
{
struct ibv_sge sge ={
.addr = (uintptr_t) dev->buffer,
- .length = dev->buf_size,
+ .length = Req.msg_size,
.lkey = dev->mr->lkey
};
struct ibv_recv_wr wr ={
@@ -2418,21 +2135,14 @@
.sg_list = &sge,
.num_sge = 1,
};
- struct ibv_recv_wr *badwr;
+ struct ibv_recv_wr *badWR;
if (dev->trans == IBV_QPT_UD)
sge.length += GRH_SIZE;
errno = 0;
- while (!Finished && n-- > 0) {
- int stat;
-
- if (dev->srq)
- stat = ibv_post_srq_recv(dev->srq, &wr, &badwr);
- else
- stat = ibv_post_recv(dev->qp, &wr, &badwr);
-
- if (stat != SUCCESS0) {
+ while (n-- > 0) {
+ if (ibv_post_recv(dev->qp, &wr, &badWR) != SUCCESS0) {
if (Finished && errno == EINTR)
return;
error(SYS, "failed to post receive");
@@ -2445,11 +2155,11 @@
* Post n RDMA requests.
*/
static void
-rd_post_rdma_std(DEVICE *dev, ibv_op opcode, int n)
+ib_post_rdma(DEVICE *dev, OPCODE opcode, int n)
{
struct ibv_sge sge ={
.addr = (uintptr_t) dev->buffer,
- .length = dev->msg_size,
+ .length = Req.msg_size,
.lkey = dev->mr->lkey
};
struct ibv_send_wr wr ={
@@ -2465,19 +2175,19 @@
}
}
};
- struct ibv_send_wr *badwr;
+ struct ibv_send_wr *badWR;
- if (opcode != IBV_WR_RDMA_READ && dev->msg_size <= dev->max_inline)
+ if (opcode != IBV_WR_RDMA_READ && Req.msg_size <= dev->maxInline)
wr.send_flags |= IBV_SEND_INLINE;
errno = 0;
- while (!Finished && n--) {
- if (ibv_post_send(dev->qp, &wr, &badwr) != SUCCESS0) {
+ while (n--) {
+ if (ibv_post_send(dev->qp, &wr, &badWR) != SUCCESS0) {
if (Finished && errno == EINTR)
return;
error(SYS, "failed to post %s", opcode_name(wr.opcode));
}
if (opcode != IBV_WR_RDMA_READ) {
- LStat.s.no_bytes += dev->msg_size;
+ LStat.s.no_bytes += Req.msg_size;
LStat.s.no_msgs++;
}
}
@@ -2488,7 +2198,7 @@
* Poll the completion queue.
*/
static int
-rd_poll(DEVICE *dev, struct ibv_wc *wc, int nwc)
+ib_poll(DEVICE *dev, struct ibv_wc *wc, int nwc)
{
int n;
@@ -2502,7 +2212,6 @@
error(0, "CQ event for unknown CQ");
if (ibv_req_notify_cq(dev->cq, 0) != SUCCESS0)
return maybe(0, "failed to request CQ notification");
- ibv_ack_cq_events(dev->cq, 1);
}
n = ibv_poll_cq(dev->cq, nwc, wc);
if (n < 0)
@@ -2533,14 +2242,11 @@
static void
enc_node(NODE *host)
{
- enc_int(host->vaddr, sizeof(host->vaddr));
- enc_int(host->lid, sizeof(host->lid));
- enc_int(host->qpn, sizeof(host->qpn));
- enc_int(host->psn, sizeof(host->psn));
- enc_int(host->srqn, sizeof(host->srqn));
- enc_int(host->rkey, sizeof(host->rkey));
- enc_int(host->alt_lid, sizeof(host->alt_lid));
- enc_int(host->rd_atomic, sizeof(host->rd_atomic));
+ enc_int(host->lid, sizeof(host->lid));
+ enc_int(host->qpn, sizeof(host->qpn));
+ enc_int(host->psn, sizeof(host->psn));
+ enc_int(host->rkey, sizeof(host->rkey));
+ enc_int(host->vaddr, sizeof(host->vaddr));
}
@@ -2550,14 +2256,11 @@
static void
dec_node(NODE *host)
{
- host->vaddr = dec_int(sizeof(host->vaddr));
- host->lid = dec_int(sizeof(host->lid));
- host->qpn = dec_int(sizeof(host->qpn));
- host->psn = dec_int(sizeof(host->psn));
- host->srqn = dec_int(sizeof(host->srqn));
- host->rkey = dec_int(sizeof(host->rkey));
- host->alt_lid = dec_int(sizeof(host->alt_lid));
- host->rd_atomic = dec_int(sizeof(host->rd_atomic));
+ host->lid = dec_int(sizeof(host->lid));
+ host->qpn = dec_int(sizeof(host->qpn));
+ host->psn = dec_int(sizeof(host->psn));
+ host->rkey = dec_int(sizeof(host->rkey));
+ host->vaddr = dec_int(sizeof(host->vaddr));
}
Modified: qperf/branches/upstream/current/src/rds.c
===================================================================
--- qperf/branches/upstream/current/src/rds.c 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/rds.c 2009-03-14 13:38:02 UTC (rev 209)
@@ -94,7 +94,6 @@
sync_test();
while (!Finished) {
int n = sendto(sockfd, buf, Req.msg_size, 0, (SA *)&RAddr, RLen);
-
if (Finished)
break;
if (n != Req.msg_size) {
@@ -160,7 +159,6 @@
sync_test();
while (!Finished) {
int n = sendto(sockfd, buf, Req.msg_size, 0, (SA *)&RAddr, RLen);
-
if (Finished)
break;
if (n != Req.msg_size) {
@@ -204,7 +202,6 @@
SS raddr;
socklen_t rlen = sizeof(raddr);
int n = recvfrom(sockfd, buf, Req.msg_size, 0, (SA *)&raddr, &rlen);
-
if (Finished)
break;
if (n != Req.msg_size) {
@@ -457,7 +454,6 @@
char *serv, size_t servlen, int flags)
{
int stat = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
-
if (stat < 0)
error(0, "getnameinfo failed: %s", gai_strerror(stat));
}
Modified: qperf/branches/upstream/current/src/socket.c
===================================================================
--- qperf/branches/upstream/current/src/socket.c 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/socket.c 2009-03-14 13:38:02 UTC (rev 209)
@@ -273,7 +273,6 @@
sync_test();
while (!Finished) {
int n = send_full(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -305,7 +304,6 @@
buf = qmalloc(Req.msg_size);
while (!Finished) {
int n = recv_full(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -339,7 +337,6 @@
sync_test();
while (!Finished) {
int n = send_full(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -381,7 +378,6 @@
buf = qmalloc(Req.msg_size);
while (!Finished) {
int n = recv_full(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -422,7 +418,6 @@
sync_test();
while (!Finished) {
int n = write(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -454,7 +449,6 @@
buf = qmalloc(Req.msg_size);
while (!Finished) {
int n = recv(sockFD, buf, Req.msg_size, 0);
-
if (Finished)
break;
if (n < 0) {
@@ -487,7 +481,6 @@
sync_test();
while (!Finished) {
int n = write(sockFD, buf, Req.msg_size);
-
if (Finished)
break;
if (n < 0) {
@@ -528,11 +521,10 @@
sync_test();
buf = qmalloc(Req.msg_size);
while (!Finished) {
- SS clientAddr;
+ struct sockaddr_storage clientAddr;
socklen_t clientLen = sizeof(clientAddr);
int n = recvfrom(sockfd, buf, Req.msg_size, 0,
(SA *)&clientAddr, &clientLen);
-
if (Finished)
break;
if (n < 0) {
@@ -592,7 +584,6 @@
if (!ai->ai_family)
continue;
*fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
- setsockopt_one(*fd, SO_REUSEADDR);
if (connect(*fd, ai->ai_addr, ai->ai_addrlen) == SUCCESS0)
break;
close(*fd);
@@ -646,7 +637,6 @@
debug("accepted %s connection", kind_name(kind));
set_socket_buffer_size(*fd);
close(listenFD);
- debug("receiving to %s port %d", kind_name(kind), port);
}
@@ -747,7 +737,7 @@
get_socket_port(int fd, uint32_t *port)
{
char p[NI_MAXSERV];
- SS sa;
+ struct sockaddr_storage sa;
socklen_t salen = sizeof(sa);
if (getsockname(fd, (SA *)&sa, &salen) < 0)
@@ -768,10 +758,8 @@
send_full(int fd, void *ptr, int len)
{
int n = len;
-
while (!Finished && n) {
int i = write(fd, ptr, n);
-
if (i < 0)
return i;
ptr += i;
@@ -791,10 +779,8 @@
recv_full(int fd, void *ptr, int len)
{
int n = len;
-
while (!Finished && n) {
int i = read(fd, ptr, n);
-
if (i < 0)
return i;
ptr += i;
Modified: qperf/branches/upstream/current/src/support.c
===================================================================
--- qperf/branches/upstream/current/src/support.c 2009-03-11 13:58:02 UTC (rev 208)
+++ qperf/branches/upstream/current/src/support.c 2009-03-14 13:38:02 UTC (rev 209)
@@ -143,7 +143,6 @@
{
uint64_t l = 0;
uint8_t *p = (DecodePtr += n);
-
while (n--)
l = (l << 8) | (*--p & 0xFF);
return l;
@@ -179,7 +178,6 @@
qmalloc(long n)
{
void *p = malloc(n);
-
if (!p)
error(0, "malloc failed");
return p;
@@ -237,7 +235,7 @@
{
send_sync(msg);
recv_sync(msg);
- debug("synchronization complete");
+ debug("synchronize %s completed", msg);
}
@@ -248,7 +246,6 @@
send_sync(char *msg)
{
int n = strlen(msg);
-
send_mesg(msg, n, msg);
}
@@ -260,8 +257,8 @@
recv_sync(char *msg)
{
char data[64];
- int n = strlen(msg);
+ int n = strlen(msg);
if (n > sizeof(data))
error(BUG, "buffer in recv_sync() too small");
recv_mesg(data, n, msg);
@@ -383,9 +380,9 @@
getaddrinfo_port(char *node, int port, struct addrinfo *hints)
{
struct addrinfo *res;
+
char *service = qasprintf("%d", port);
int stat = getaddrinfo(node, service, hints, &res);
-
free(service);
if (stat != 0)
error(0, "getaddrinfo failed: %s", gai_strerror(stat));
@@ -403,7 +400,6 @@
setsockopt_one(int fd, int optname)
{
int one = 1;
-
if (setsockopt(fd, SOL_SOCKET, optname, &one, sizeof(one)) >= 0)
return;
error(SYS, "setsockopt %d %d to 1 failed", SOL_SOCKET, optname);
More information about the Pkg-ofed-commits
mailing list