1
1

libfabric: remove embedded libfabric

OMPI now only builds against external libfabric installations.
Этот коммит содержится в:
Jeff Squyres 2015-06-09 15:11:42 -07:00
родитель c74ab51dd4
Коммит 3e1b85ceb3
307 изменённых файлов: 0 добавлений и 71088 удалений

Просмотреть файл

@ -1,244 +0,0 @@
# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# See opal/mca/common/sm/Makefile.am for an explanation of the
# different library targets in this file.
#
# Embedded libfabric
#
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
# We have to override the CFLAGS that come in from above to remove
# --pedantic (see configure.m4 for details).
CFLAGS = $(opal_common_libfabric_embedded_CFLAGS)
# Due to what might be a bug in Automake, we need to remove stamp-h?
# files manually. See
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19418.
DISTCLEANFILES = libfabric/stamp-h?
# Only build this embedded copy if we're not using an external
# libfabric.
if OPAL_COMMON_LIBFABRIC_BUILD_EMBEDDED
comp_inst = lib@OPAL_LIB_PREFIX@mca_common_libfabric.la
comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst.la
if MCA_BUILD_opal_common_libfabric_DSO
lib_LTLIBRARIES += $(comp_inst)
else
noinst_LTLIBRARIES += $(comp_noinst)
endif
cppflags = \
$(opal_common_libfabric_embedded_CPPFLAGS) \
-D_GNU_SOURCE \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DRDMADIR=\"/tmp\" \
-DEXTDIR=\"$(pkglibdir)\" \
-DENABLE_DEBUG=0 \
-DHAVE_VERBS=0 \
'-DVERSION="embedded libfabric de8444c9771ab9022d952a27134e44e5d8a5d722"' \
'-DPACKAGE="embedded libfabric de8444c9771ab9022d952a27134e44e5d8a5d722"'
libadd = $(opal_common_libfabric_embedded_LIBADD)
libfabric_core_headers = \
libfabric/include/fi.h \
libfabric/include/fi_enosys.h \
libfabric/include/fi_indexer.h \
libfabric/include/fi_list.h \
libfabric/include/fi_rbuf.h \
libfabric/include/prov.h \
libfabric/include/linux/osd.h \
libfabric/include/osx/osd.h \
libfabric/include/rdma/fabric.h \
libfabric/include/rdma/fi_atomic.h \
libfabric/include/rdma/fi_cm.h \
libfabric/include/rdma/fi_domain.h \
libfabric/include/rdma/fi_endpoint.h \
libfabric/include/rdma/fi_eq.h \
libfabric/include/rdma/fi_errno.h \
libfabric/include/rdma/fi_log.h \
libfabric/include/rdma/fi_prov.h \
libfabric/include/rdma/fi_rma.h \
libfabric/include/rdma/fi_tagged.h \
libfabric/include/rdma/fi_trigger.h
libfabric_core_sources = \
libfabric/src/fabric.c \
libfabric/src/fi_tostr.c \
libfabric/src/common.c \
libfabric/src/enosys.c \
libfabric/src/log.c
libfabric_usnic_headers = \
libfabric/prov/usnic/src/fi_ext_usnic.h \
libfabric/prov/usnic/src/usdf.h \
libfabric/prov/usnic/src/usdf_av.h \
libfabric/prov/usnic/src/usdf_cm.h \
libfabric/prov/usnic/src/usdf_cq.h \
libfabric/prov/usnic/src/usdf_dgram.h \
libfabric/prov/usnic/src/usdf_endpoint.h \
libfabric/prov/usnic/src/usdf_msg.h \
libfabric/prov/usnic/src/usdf_progress.h \
libfabric/prov/usnic/src/usdf_rdm.h \
libfabric/prov/usnic/src/usdf_rudp.h \
libfabric/prov/usnic/src/usdf_timer.h \
libfabric/prov/usnic/src/usnic_direct/cq_desc.h \
libfabric/prov/usnic/src/usnic_direct/cq_enet_desc.h \
libfabric/prov/usnic/src/usnic_direct/kcompat.h \
libfabric/prov/usnic/src/usnic_direct/kcompat_priv.h \
libfabric/prov/usnic/src/usnic_direct/libnl1_utils.h \
libfabric/prov/usnic/src/usnic_direct/libnl3_utils.h \
libfabric/prov/usnic/src/usnic_direct/libnl_utils.h \
libfabric/prov/usnic/src/usnic_direct/linux/delay.h \
libfabric/prov/usnic/src/usnic_direct/linux/slab.h \
libfabric/prov/usnic/src/usnic_direct/linux_types.h \
libfabric/prov/usnic/src/usnic_direct/rq_enet_desc.h \
libfabric/prov/usnic/src/usnic_direct/usd.h \
libfabric/prov/usnic/src/usnic_direct/usd_caps.h \
libfabric/prov/usnic/src/usnic_direct/usd_dest.h \
libfabric/prov/usnic/src/usnic_direct/usd_device.h \
libfabric/prov/usnic/src/usnic_direct/usd_ib_cmd.h \
libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.h \
libfabric/prov/usnic/src/usnic_direct/usd_post.h \
libfabric/prov/usnic/src/usnic_direct/usd_queue.h \
libfabric/prov/usnic/src/usnic_direct/usd_socket.h \
libfabric/prov/usnic/src/usnic_direct/usd_time.h \
libfabric/prov/usnic/src/usnic_direct/usd_util.h \
libfabric/prov/usnic/src/usnic_direct/usd_vnic.h \
libfabric/prov/usnic/src/usnic_direct/usnic_abi.h \
libfabric/prov/usnic/src/usnic_direct/usnic_direct.h \
libfabric/prov/usnic/src/usnic_direct/usnic_ib_abi.h \
libfabric/prov/usnic/src/usnic_direct/usnic_ip_utils.h \
libfabric/prov/usnic/src/usnic_direct/usnic_user_utils.h \
libfabric/prov/usnic/src/usnic_direct/vnic_cq.h \
libfabric/prov/usnic/src/usnic_direct/vnic_devcmd.h \
libfabric/prov/usnic/src/usnic_direct/vnic_dev.h \
libfabric/prov/usnic/src/usnic_direct/vnic_enet.h \
libfabric/prov/usnic/src/usnic_direct/vnic_resource.h \
libfabric/prov/usnic/src/usnic_direct/vnic_rq.h \
libfabric/prov/usnic/src/usnic_direct/vnic_stats.h \
libfabric/prov/usnic/src/usnic_direct/vnic_wq.h \
libfabric/prov/usnic/src/usnic_direct/wq_enet_desc.h
libfabric_usnic_sources = \
libfabric/prov/usnic/src/usdf_av.c \
libfabric/prov/usnic/src/usdf_cm.c \
libfabric/prov/usnic/src/usdf_cq.c \
libfabric/prov/usnic/src/usdf_dgram.c \
libfabric/prov/usnic/src/usdf_domain.c \
libfabric/prov/usnic/src/usdf_endpoint.c \
libfabric/prov/usnic/src/usdf_ep_dgram.c \
libfabric/prov/usnic/src/usdf_ep_msg.c \
libfabric/prov/usnic/src/usdf_ep_rdm.c \
libfabric/prov/usnic/src/usdf_eq.c \
libfabric/prov/usnic/src/usdf_fabric.c \
libfabric/prov/usnic/src/usdf_mem.c \
libfabric/prov/usnic/src/usdf_msg.c \
libfabric/prov/usnic/src/usdf_pep.c \
libfabric/prov/usnic/src/usdf_progress.c \
libfabric/prov/usnic/src/usdf_rdm.c \
libfabric/prov/usnic/src/usdf_timer.c \
libfabric/prov/usnic/src/usnic_direct/libnl_utils_common.c \
libfabric/prov/usnic/src/usnic_direct/usd_caps.c \
libfabric/prov/usnic/src/usnic_direct/usd_dest.c \
libfabric/prov/usnic/src/usnic_direct/usd_device.c \
libfabric/prov/usnic/src/usnic_direct/usd_event.c \
libfabric/prov/usnic/src/usnic_direct/usd_ib_cmd.c \
libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c \
libfabric/prov/usnic/src/usnic_direct/usd_mem.c \
libfabric/prov/usnic/src/usnic_direct/usd_poll.c \
libfabric/prov/usnic/src/usnic_direct/usd_post.c \
libfabric/prov/usnic/src/usnic_direct/usd_post_raw_normal.c \
libfabric/prov/usnic/src/usnic_direct/usd_post_udp_normal.c \
libfabric/prov/usnic/src/usnic_direct/usd_post_udp_pio.c \
libfabric/prov/usnic/src/usnic_direct/usd_queues.c \
libfabric/prov/usnic/src/usnic_direct/usd_socket.c \
libfabric/prov/usnic/src/usnic_direct/usd_vnic.c \
libfabric/prov/usnic/src/usnic_direct/usnic_ip_utils.c \
libfabric/prov/usnic/src/usnic_direct/vnic_cq.c \
libfabric/prov/usnic/src/usnic_direct/vnic_dev.c \
libfabric/prov/usnic/src/usnic_direct/vnic_rq.c \
libfabric/prov/usnic/src/usnic_direct/vnic_wq.c
libfabric_psm_headers = \
libfabric/prov/psm/src/psm_am.h \
libfabric/prov/psm/src/psmx.h
libfabric_psm_sources = \
libfabric/prov/psm/src/psmx_init.c \
libfabric/prov/psm/src/psmx_domain.c \
libfabric/prov/psm/src/psmx_cq.c \
libfabric/prov/psm/src/psmx_eq.c \
libfabric/prov/psm/src/psmx_cntr.c \
libfabric/prov/psm/src/psmx_av.c \
libfabric/prov/psm/src/psmx_ep.c \
libfabric/prov/psm/src/psmx_cm.c \
libfabric/prov/psm/src/psmx_tagged.c \
libfabric/prov/psm/src/psmx_msg.c \
libfabric/prov/psm/src/psmx_msg2.c \
libfabric/prov/psm/src/psmx_rma.c \
libfabric/prov/psm/src/psmx_atomic.c \
libfabric/prov/psm/src/psmx_am.c \
libfabric/prov/psm/src/psmx_mr.c \
libfabric/prov/psm/src/psmx_wait.c \
libfabric/prov/psm/src/psmx_poll.c \
libfabric/prov/psm/src/psmx_util.c
sources = $(libfabric_core_sources)
if OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_USNIC
sources += $(libfabric_usnic_sources)
endif OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_USNIC
if OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_PSM
sources += $(libfabric_psm_sources)
endif OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_PSM
headers = $(libfabric_core_headers)
if OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_USNIC
headers += $(libfabric_usnic_headers)
endif OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_USNIC
if OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_PSM
headers += $(libfabric_psm_headers)
endif OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_PSM
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_SOURCES = $(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_CPPFLAGS = $(cppflags)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LDFLAGS = \
-version-info $(libmca_opal_common_libfabric_so_version)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LIBADD = $(libadd)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_SOURCES = $(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_CPPFLAGS = $(cppflags)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_LIBADD = $(libadd)
# These two rules will sym link the "noinst" libtool library filename
# to the installable libtool library filename in the case where we are
# compiling this component statically (case 2), described above).
# See Makefile.ompi-rules for an explanation of the "V" macros, below
V=0
OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V)
ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY)
ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`;
all-local:
$(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \
rm -f "$(comp_inst)"; \
$(LN_S) "$(comp_noinst)" "$(comp_inst)"; \
fi
clean-local:
if test -z "$(lib_LTLIBRARIES)"; then \
rm -f "$(comp_inst)"; \
fi
endif OPAL_COMMON_LIBFABRIC_BUILD_EMBEDDED

Просмотреть файл

@ -1,511 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_opal_common_libfabric_CONFIG([action-if-can-copalle],
# [action-if-cant-copalle])
#
# Will also set $opal_common_libfabric_happy to 0 or 1 (0 = no
# libfabric support, 1 = libfabric support). Will also set
# $opal_common_libfabric_build_embedded to 0 or 1 (1 = building
# embedded libfabric, 0 = not building embedded libfabric).
# ------------------------------------------------
AC_DEFUN([MCA_opal_common_libfabric_CONFIG],[
AC_CONFIG_FILES([opal/mca/common/libfabric/Makefile])
AC_CONFIG_HEADERS([opal/mca/common/libfabric/libfabric/config.h])
# Initially state that we're unhappy
opal_common_libfabric_happy=0
opal_common_libfabric_build_embedded=0
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_SETUP
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM_SETUP
# Setup the --with switches to allow users to specify where
# libfabric stuff lives.
AC_REQUIRE([_OPAL_COMMON_LIBFABRIC_WITH_FLAGS])
AS_IF([test "$opal_want_libfabric" != "no"],
[ # Regardless of whether we build embedded or external,
# libfabric is only supported on Linux.
AC_MSG_CHECKING([if we are on Linux])
AS_CASE([$host_os],
[*linux*], [AC_MSG_RESULT([yes])
_OPAL_COMMON_LIBFABRIC_CONFIGURE],
[*], [AC_MSG_RESULT([no])],
)
])
# AM conditionals must be executed unconditionally
_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED_CONDITIONALS
AM_CONDITIONAL([OPAL_COMMON_LIBFABRIC_BUILD_EMBEDDED],
[test $opal_common_libfabric_build_embedded -eq 1])
# This is for components that build with libfabric support
AC_SUBST(opal_common_libfabric_CPPFLAGS)
AC_SUBST(opal_common_libfabric_LDFLAGS)
AC_SUBST(opal_common_libfabric_LIBADD)
# This is for building the libfabric component itself
opal_common_libfabric_embedded_CPPFLAGS=$opal_common_libfabric_CPPFLAGS
AC_SUBST(opal_common_libfabric_embedded_CPPFLAGS)
AC_SUBST(opal_common_libfabric_embedded_CFLAGS)
AC_SUBST(opal_common_libfabric_embedded_LIBADD)
# Ensure that the wrappers get what they need (e.g., for static
# builds).
common_libfabric_WRAPPER_EXTRA_LIBS=$opal_common_libfabric_embedded_LIBADD
# Did libfabric configure successfully?
AS_IF([test $opal_common_libfabric_happy -eq 1],
[$1],
[AS_IF([test "$opal_want_libfabric" = "yes"],
[AC_MSG_WARN([Libfabric support requested (via --with-libfabric) but not found.])
AC_MSG_ERROR([Cannot continue])])
$2])
])
# --------------------------------------------------------
# _OPAL_COMMON_LIBFABRIC_WITH_FLAGS (internal)
# --------------------------------------------------------
# Add --with-libfabric options, and if directories are specified,
# sanity check them.
#
# At the end of this macro:
#
# 1. $opal_want_libfabric will be set to:
# "yes" if --with-libfabric or --with-libfabric=DIR was specified
# "no" if --without-libfabric was specified)
# "optional" if neither --with-libfabric* nor --without-libfabric
# was specified
#
# 2. $opal_libfabric_dir and $opal_libfabric_libdir with either both
# be set or both be empty.
#
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_WITH_FLAGS],[
# Add --with options
AC_ARG_WITH([libfabric],
[AC_HELP_STRING([--with-libfabric(=DIR)],
[Build libfabric support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
AC_ARG_WITH([libfabric-libdir],
[AC_HELP_STRING([--with-libfabric-libdir=DIR],
[Search for libfabric libraries in DIR])])
# Sanity check the --with values
OPAL_CHECK_WITHDIR([libfabric], [$with_libfabric],
[include/rdma/fabric.h])
OPAL_CHECK_WITHDIR([libfabric-libdir], [$with_libfabric_libdir],
[libfabric.*])
# Set standardized shell variables for libfabric lovin' components to
# use. Either both of $opal_libfabric_dir and
# $libfabric_libdir will be set, or neither will be set.
opal_want_libfabric=no
AS_IF([test -z "$with_libfabric"],
[opal_want_libfabric=optional],
[AS_IF([test "$with_libfabric" = "no"],
[opal_want_libfabric=no],
[opal_want_libfabric=yes])
])
opal_libfabric_dir=
AS_IF([test -n "$with_libfabric" && \
test "$with_libfabric" != "yes" && \
test "$with_libfabric" != "no"],
[opal_libfabric_dir=$with_libfabric])
opal_libfabric_libdir=
AS_IF([test -n "$with_libfabric_libdir" && \
test "$with_libfabric_libdir" != "yes" && \
test "$with_libfabric_libdir" != "no"],
[opal_libfabric_libdir=$with_libfabric_libdir])
])
# --------------------------------------------------------
# Internal helper macro to configure an internal or external libfabric.
#
# arg 1: action if will build libfabric
# arg 2: action if will not build libfabric
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_CONFIGURE],[
opal_check_libfabric_save_CPPFLAGS=$CPPFLAGS
opal_check_libfabric_save_LDFLAGS=$LDFLAGS
opal_check_libfabric_save_LIBS=$LIBS
# Use the internal or external libfabric?
AS_IF([test -z "$opal_libfabric_dir" && \
test -z "$opal_libfabric_libdir"],
[_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED],
[_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EXTERNAL])
CPPFLAGS=$opal_check_libfabric_save_CPPFLAGS
LDFLAGS=$opal_check_libfabric_save_LDFLAGS
LIBS=$opal_check_libfabric_save_LIBS
AS_IF([test $opal_common_libfabric_happy -eq 1], [$1], [$2])
])
# --------------------------------------------------------
# Internal helper macros to setup the embedded libfabric.
#
# The internal libfabric is *TEMPORARY* and only for convenience of
# development. Ultimately, the embedded libfabric will disappear and
# you will need to have libfabric installed.
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED_CONDITIONALS],[
AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [false])
AM_CONDITIONAL([HAVE_DIRECT], [false])
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_CONDITIONALS
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM_CONDITIONALS
])
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED],[
AC_MSG_NOTICE([Setting up for EMBEDDED libfabric])
# Replicate a few libfabric configure tests
opal_common_libfabric_happy=1
AC_CHECK_HEADER([infiniband/verbs.h], [],
[opal_common_libfabric_happy=0])
AC_CHECK_LIB(pthread, pthread_mutex_init, [],
[opal_common_libfabric_happy=0])
AC_CHECK_LIB(rt, clock_gettime, [],
[opal_common_libfabric_happy=0])
# Add flags for libfabric core
AS_IF([test $opal_common_libfabric_happy -eq 1],
[opal_common_libfabric_CPPFLAGS="-I$OPAL_TOP_SRCDIR/opal/mca/common/libfabric/libfabric -I$OPAL_TOP_SRCDIR/opal/mca/common/libfabric/libfabric/include"
opal_common_libfabric_build_embedded=1
opal_common_libfabric_LIBADD="\$(OPAL_TOP_BUILDDIR)/opal/mca/common/libfabric/lib${OPAL_LIB_PREFIX}mca_common_libfabric.la"
# OMPI's debugging compile flags are fairly aggressive,
# and include -pedantic. Unfortunately, there's a bunch
# of code in libfabric that complains about -pedantic, so
# remove it from the CFLAGS.
for flag in $CFLAGS; do
case $flag in
-pedantic) ;;
-Wmissing-prototypes) ;;
-Wsign-compare) ;;
*) opal_common_libfabric_embedded_CFLAGS="$opal_common_libfabric_embedded_CFLAGS $flag" ;;
esac
done
# Specifically disabling (by not defining anything)
# libfabric features: valgrind support, symbol versioning
# support.
# Check for gcc atomic intrinsics
AC_MSG_CHECKING([if compiler support for c11 atomics])
AC_TRY_LINK([#include <stdatomic.h>],
[atomic_int a;
atomic_init(&a, 0);
#ifdef __STDC_NO_ATOMICS__
#error c11 atomics are not supported
#else
return 0;
#endif
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ATOMICS, 1, [Set to use c11 atomic functions])
],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([if linker supports the alias attribute])
AC_LINK_IFELSE(
[AC_LANG_SOURCE[
int foo(int arg);
int foo(int arg) { return arg + 3; };
int foo2(int arg) __attribute__ (( __alias__("foo")));
]],
[AC_MSG_RESULT([yes])
opal_common_libfabric_alias_symbols=1],
[AC_MSG_RESULT([no])
opal_common_libfabric_alias_symbols=0])
AC_DEFINE_UNQUOTED([HAVE_ALIAS_ATTRIBUTE],
[$opal_common_libfabric_alias_symbols],
[Define to 1 if the linker supports alias attribute.])
AC_CHECK_FUNC([pthread_spin_init],
[opal_common_libfabric_have_spinlock=1],
[opal_common_libfabric_have_spinlock=0])
AC_DEFINE_UNQUOTED([PT_LOCK_SPIN],
[$opal_common_libfabric_have_spinlock],
[Define PT_LOCK_SPIN to 1 if available.])
# Do stuff for specific providers
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM
# Hard-coding to not build the sockets or verbs providers
AC_DEFINE([HAVE_SOCKETS], [0],
[libfabric: do not build sockets provider])
AC_DEFINE([HAVE_SOCKETS_DL], [0],
[libfabric: do not build sockets provider])
AC_DEFINE([HAVE_VERBS], [0],
[libfabric: do not build verbs provider])
AC_DEFINE([HAVE_VERBS_DL], [0],
[libfabric: do not build verbs provider])
])
])
# --------------------------------------------------------
# Internal helper macro to setup for an external libfabric
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EXTERNAL],[
AC_MSG_NOTICE([Setting up for EXTERNAL libfabric])
# If the top dir was specified but the libdir was not, look for
# it. Note that if the user needs a specific libdir (i.e., if our
# hueristic ordering below is not sufficient), they need to
# specify it.
AS_IF([test -z "$opal_libfabric_libdir" -a -n "$opal_libfabric_dir"],
[_OPAL_COMMON_LIBFABRIC_CHECK_LIBDIR(["$opal_libfabric_dir/lib"])])
AS_IF([test -z "$opal_libfabric_libdir" -a -n "$opal_libfabric_dir"],
[_OPAL_COMMON_LIBFABRIC_CHECK_LIBDIR(["$opal_libfabric_dir/lib64"])])
AS_IF([test -z "$opal_libfabric_libdir" -a -n "$opal_libfabric_dir"],
[_OPAL_COMMON_LIBFABRIC_CHECK_LIBDIR(["$opal_libfabric_dir/lib32"])])
AS_IF([test -z "$opal_libfabric_libdir" -a -n "$opal_libfabric_dir"],
[AC_MSG_WARN([Could not find libiblibfabric in the usual locations under $opal_libfabric_dir])
AC_MSG_ERROR([Cannot continue])
])
# If the libdir was specified, but the top dir was not, look for
# it. Note that if the user needs a specific top dir (i.e., if
# our hueristic below is not sufficient), they need to specify it.
AS_IF([test -z "$opal_libfabric" -a -n "$opal_libfabric_libdir"],
[_OPAL_COMMON_LIBFABRIC_CHECK_INCDIR([`dirname "$opal_libfabric_libdir"`])])
AS_IF([test -z "$opal_libfabric_dir" -a -n "$opal_libfabric_libdir"],
[AC_MSG_WARN([Could not find libfabric.h in the usual locations under $opal_libfabric_dir])
AC_MSG_ERROR([Cannot continue])
])
# Now actually check to ensure that the external libfabric works
OPAL_CHECK_PACKAGE([opal_common_libfabric],
[rdma/fabric.h],
[fabric],
[fi_getinfo],
[],
[$opal_libfabric_dir],
[$opal_libfabric_libdir],
[opal_common_libfabric_happy=1],
[opal_common_libfabric_happy=0])
opal_common_libfabric_LDFLAGS="-L$opal_libfabric_libdir"
opal_common_libfabric_LIBADD="-lfabric"
])
# --------------------------------------------------------
# Internal helper macro to look for the libfabric libdir
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_CHECK_LIBDIR],[
AS_IF([test -d "$1"],
[AS_IF([test "x`ls $1/libfabric.* 2> /dev/null`" != "x"],
[opal_libfabric_libdir="$1"])
])
])
# --------------------------------------------------------
# Internal helper macro to look for the libfabric dir
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_CHECK_INCDIR],[
AS_IF([test -d "$1"],
[AS_IF([test -f "$1/include/rdma/fabric.h"],
[opal_libfabric_dir="$1"])
])
])
# --------------------------------------------------------
# Internal helper macro to setup the embedded usnic provider
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_SETUP],[
opal_common_libfabric_usnic_happy=0
])
# --------------------------------------------------------
# Internal helper macro to look for the things the usnic provider
# needs
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC],[
opal_common_libfabric_usnic_happy=1
AC_CHECK_HEADER([linux/netlink.h], [],
[opal_common_libfabric_usnic_happy=0], [
#include <sys/types.h>
#include <net/if.h>
])
_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_CHECK_LIBNL3(
[opal_common_libfabric_LIBNL_CPPFLAGS],
[opal_common_libfabric_LIBNL_LIBS], [0])
AS_IF([test "$opal_common_libfabric_LIBNL_LIBS" == ""],
[opal_common_libfabric_usnic_happy=0])
AC_DEFINE_UNQUOTED([HAVE_USNIC], [$opal_common_libfabric_usnic_happy],
[libfabric: whether to build the usnic provider or not])
AC_DEFINE([HAVE_USNIC_DL], 0,
[libfabric: do not build usnic provider as a DL])
AS_IF([test $opal_common_libfabric_usnic_happy -eq 1],
[opal_common_libfabric_CPPFLAGS="$opal_common_libfabric_CPPFLAGS $opal_common_libfabric_LIBNL_CPPFLAGS -I$OPAL_TOP_SRCDIR/opal/mca/common/libfabric/libfabric/prov/usnic/src -I$OPAL_TOP_SRCDIR/opal/mca/common/libfabric/libfabric/prov/usnic/src/usnic_direct -D__LIBUSNIC__ -DHAVE_LIBNL3=$HAVE_LIBNL3 -DWANT_DEBUG_MSGS=0"
opal_common_libfabric_embedded_LIBADD=$opal_common_libfabric_LIBNL_LIBS])
])
# --------------------------------------------------------
# Internal helper macro for usnic AM conditionals (that must be run
# unconditionally)
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_CONDITIONALS],[
AM_CONDITIONAL([OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_USNIC],
[test $opal_common_libfabric_usnic_happy -eq 1])
])
dnl --------------------------------------------------------
dnl
dnl Check for libnl; prefer version 3 instead of version 1. Abort (i.e.,
dnl AC_MSG_ERROR) if neither libnl v1 or v3 can be found.
dnl
dnl Outputs:
dnl
dnl - Set $1 to the CPPFLAGS necessary to compile with libnl
dnl - Set $2 to the LIBS necessary to link with libnl
dnl - If $3 is 1, AC_MSG_ERROR (i.e., abort) if neither libnl or
dnl libnl3 can be found
dnl - Set HAVE_LIBNL3 to 1 if libnl3 will be used; 0 if libnl1 will be used
dnl - AC_SUBST $HAVE_LIBNL3
dnl - AC_DEFINE HAVE_LIBNL3
dnl
dnl --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC_CHECK_LIBNL3],[
# More libnl v1/v3 sadness: the two versions are not compatible
# and will not work correctly if simultaneously linked into the
# same applications. Unfortunately, they *will* link into the
# same image! On platforms like SLES 12, libibverbs depends on
# libnl-3.so.200 and friends, while a naive implementation of
# our configure logic would link libnl.so.1 to libdaplusnic,
# resulting in both versions in the dependency map at the same
# time. As a coarse fix, just check for libnl-3 first and use
# it if present on the system.
# GROSS: libnl wants us to either use pkg-config (which we
# can't assume is always present) or we need to look in a
# particular directory for the right libnl3 include files. For
# now, just hard code the special path into this logic.
save_CPPFLAGS=$CPPFLAGS
save_LIBS=$LIBS
$1="-I/usr/include/libnl3"
CPPFLAGS="$$1 $CPPFLAGS"
AC_MSG_CHECKING([for /usr/include/libnl3])
AS_IF([test -d "/usr/include/libnl3"],
[AC_MSG_RESULT([present])
AC_CHECK_HEADER(
[netlink/version.h],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <netlink/netlink.h>
#include <netlink/version.h>
#ifndef LIBNL_VER_MAJ
#error "LIBNL_VER_MAJ not defined!"
#endif
/* to the best of our knowledge, version.h only exists in libnl3 */
#if LIBNL_VER_MAJ < 3
#error "LIBNL_VER_MAJ < 3, this is very unusual"
#endif
]],[[/* empty body */]])],
[HAVE_LIBNL3=1], dnl our program compiled
[HAVE_LIBNL3=0])], dnl our program failed to compile
[HAVE_LIBNL3=0], dnl AC_CHECK_HEADER failed
[#include <netlink/netlink.h>
])],
[AC_MSG_RESULT([missing])
HAVE_LIBNL3=0]) dnl "/usr/include/libnl3" does not exist
# nl_recvmsgs_report is a symbol that is only present in v3
AS_IF([test "$HAVE_LIBNL3" -eq 1],
[AC_SEARCH_LIBS([nl_recvmsgs_report], [nl-3],
[# We also need libnl-route-3
AC_SEARCH_LIBS([nl_rtgen_request], [nl-route-3],
[$2="-lnl-3 -lnl-route-3"
HAVE_LIBNL3=1],
[HAVE_LIBNL3=0])],
[HAVE_LIBNL3=0])])
AS_IF([test "$HAVE_LIBNL3" -eq 1],
[AC_MSG_NOTICE([using libnl-3])],
[# restore $1 since we are falling back to libnl (v1)
$1=""
AC_SEARCH_LIBS([nl_connect], [nl],
[$2="-lnl"],
[AC_MSG_WARN([Cannot find libnl-3 nor libnl])
AS_IF([test "$3" = "1"],
[AC_MSG_ERROR([Cannot continue])])
])
AC_MSG_NOTICE([using libnl (v1)])])
# libnl_utils.h does not include configure-generated config.h,
# so it may not see the HAVE_LIBNL3 #define. Hence, we set
# HAVE_LIBNL3 as both a C preprocessor macro (in case some
# other file includes config.h before libnl_utils.h) and a
# Makefile macro (so that the app can set HAVE_LIBNL3 via
# CPPFLAGS). Also, this macro may be used in multiple
# different libraries; setting HAVE_LIBNL3 both ways lets the
# application choose which way to set it.
AC_SUBST([HAVE_LIBNL3])
AC_DEFINE_UNQUOTED([HAVE_LIBNL3],[$HAVE_LIBNL3],
[set to 1 if should use libnl v3, set to 0 for libnl v11])
LIBS=$save_LIBS
AS_UNSET([save_LIBS])
CPPFLAGS=$save_CPPFLAGS
AS_UNSET([save_CPPFLAGS])
])
# --------------------------------------------------------
# Internal helper macro to setup the embedded PSM provider
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM_SETUP],[
opal_common_libfabric_psm_happy=0
])
# --------------------------------------------------------
# Internal helper macro to look for the things the psm provider
# needs
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM],[
opal_common_libfabric_psm_happy=1
AC_CHECK_HEADER([psm.h], [], [opal_common_libfabric_psm_happy=0])
AC_CHECK_LIB([psm_infinipath], [psm_init], [],
[opal_common_libfabric_psm_happy=0])
AS_IF([test x"$opal_common_libfabric_psm_happy" = x"1"],
[AC_CHECK_TYPE([psm_epconn_t], [], [opal_common_libfabric_psm_happy=0], [[#include <psm.h>]])])
AC_DEFINE_UNQUOTED([HAVE_PSM], [$opal_common_libfabric_psm_happy],
[libfabric: whether to build the PSM provider or not])
AC_DEFINE([HAVE_PSM_DL], 0,
[libfabric: do not build PSM provider as a DL])
AS_IF([test $opal_common_libfabric_psm_happy -eq 1],
[opal_common_libfabric_CPPFLAGS="$opal_common_libfabric_CPPFLAGS -I$OPAL_TOP_SRCDIR/opal/mca/common/libfabric/libfabric/prov/psm/src"
opal_common_libfabric_embedded_LIBADD="-lpsm_infinipath"])
])
# --------------------------------------------------------
# Internal helper macro for psm AM conditionals (that must be run
# unconditionally)
# --------------------------------------------------------
AC_DEFUN([_OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM_CONDITIONALS],[
AM_CONDITIONAL([OPAL_COMMON_LIBFABRIC_HAVE_PROVIDER_PSM],
[test $opal_common_libfabric_psm_happy -eq 1])
])

Просмотреть файл

@ -1,23 +0,0 @@
Sean Hefty <sean.hefty@intel.com>
Reese Faucette <rfaucett@cisco.com>
Jeff Squyres <jsquyres@cisco.com>
Jianxin Xiong <jianxin.xiong@intel.com>
Sayantan Sur <sayantan.sur@intel.com>
Xuyang Wang <xuywang@cisco.com>
Patrick McCormick <patrick.m.mccormick@intel.com>
Dave Goodell <dgoodell@cisco.com>
Jithin Jose <jithin.jose@intel.com>
Miao Luo <miao.luo@intel.com>
Arun C Ilango <arun.ilango@intel.com>
Ben Turrubiates <bturrubiates@lanl.gov>
Gilles Gouaillardet <gilles.gouaillardet@iferc.org>
Howard Pritchard <howardp@lanl.gov>
Jay Sternberg <jay.e.sternberg@intel.com>
Jeff Hammond <jeff.science@gmail.com>
Ken Raffenetti <raffenet@mcs.anl.gov>
Patrick MacArthur <pmacarth@iol.unh.edu>
Shantonu Hossain <shantonu.hossain@intel.com>
Chen Zhao <chen.zhao@netapp.com>
Stan Smith <stan.smith@intel.com>
Sung-Eun Choi <sungeunchoi@users.noreply.github.com>
Yohann Burette <yohann.burette@intel.com>

Просмотреть файл

@ -1,378 +0,0 @@
This software is available to you under a choice of one of two
licenses. You may choose to be licensed under the terms of the the
BSD license or the GNU General Public License (GPL) Version
2, both included below.
Copyright (c) 2005 Intel Corporation. All rights reserved.
==================================================================
BSD license
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
==================================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

Просмотреть файл

@ -1,466 +0,0 @@
# Makefile.am for libfabric
AM_CPPFLAGS = \
-I$(srcdir)/include \
-D_GNU_SOURCE \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DRDMADIR=\"@rdmadir@\" \
-DPROVDLDIR=\"$(pkglibdir)\"
lib_LTLIBRARIES = src/libfabric.la
pkglib_LTLIBRARIES = $(DL_PROVIDERS)
ACLOCAL_AMFLAGS = -I config
AM_CFLAGS = -g -Wall
if HAVE_LD_VERSION_SCRIPT
libfabric_version_script = -Wl,--version-script=$(srcdir)/libfabric.map
else !HAVE_LD_VERSION_SCRIPT
libfabric_version_script =
endif !HAVE_LD_VERSION_SCRIPT
rdmaincludedir = $(includedir)/rdma
rdmainclude_HEADERS =
# internal utility functions shared by in-tree providers:
common_srcs = \
src/common.c \
src/enosys.c \
src/log.c
# ensure dl-built providers link back to libfabric
linkback = $(top_builddir)/src/libfabric.la
src_libfabric_la_SOURCES = \
include/fi.h \
include/fi_enosys.h \
include/fi_indexer.h \
include/fi_list.h \
include/fi_rbuf.h \
include/prov.h \
src/fabric.c \
src/fi_tostr.c \
$(common_srcs)
if MACOS
src_libfabric_la_SOURCES += src/osx/osd.c
src_libfabric_la_SOURCES += include/osx/osd.h
endif
if LINUX
src_libfabric_la_SOURCES += include/linux/osd.h
endif
src_libfabric_la_CPPFLAGS = $(AM_CPPFLAGS)
src_libfabric_la_LDFLAGS =
src_libfabric_la_LIBADD =
if HAVE_SOCKETS
_sockets_files = \
prov/sockets/src/sock.h \
prov/sockets/src/sock_av.c \
prov/sockets/src/sock_dom.c \
prov/sockets/src/sock_eq.c \
prov/sockets/src/sock_cq.c \
prov/sockets/src/sock_cntr.c \
prov/sockets/src/sock_poll.c \
prov/sockets/src/sock_wait.c \
prov/sockets/src/sock_ep_rdm.c \
prov/sockets/src/sock_ep_dgram.c \
prov/sockets/src/sock_ep_msg.c \
prov/sockets/src/sock_fabric.c \
prov/sockets/src/sock_ep.c \
prov/sockets/src/sock_ctx.c \
prov/sockets/src/sock_rx_entry.c \
prov/sockets/src/sock_progress.c \
prov/sockets/src/sock_comm.c \
prov/sockets/src/sock_conn.c \
prov/sockets/src/sock_msg.c \
prov/sockets/src/sock_rma.c \
prov/sockets/src/sock_atomic.c \
prov/sockets/src/sock_util.h \
prov/sockets/src/indexer.c
if HAVE_SOCKETS_DL
pkglib_LTLIBRARIES += libsockets-fi.la
libsockets_fi_la_SOURCES = $(_sockets_files) $(common_srcs)
libsockets_fi_la_LIBADD = $(linkback) $(sockets_shm_LIBS)
libsockets_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic
libsockets_fi_la_DEPENDENCIES = $(linkback)
else !HAVE_SOCKETS_DL
src_libfabric_la_SOURCES += $(_sockets_files)
src_libfabric_la_LIBADD += $(sockets_shm_LIBS)
endif !HAVE_SOCKETS_DL
endif HAVE_SOCKETS
if HAVE_VERBS
_verbs_files = prov/verbs/src/fi_verbs.c
if HAVE_VERBS_DL
pkglib_LTLIBRARIES += libverbs-fi.la
libverbs_fi_la_SOURCES = $(_verbs_files) $(common_srcs)
# Technically, verbs_ibverbs_CPPFLAGS and verbs_rdmacm_CPPFLAGS could
# be different, but it is highly unlikely that they ever will be. So
# only list verbs_ibverbs_CPPFLAGS here. Same with verbs_*_LDFLAGS,
# below.
libverbs_fi_la_CPPFLAGS = $(AM_CPPFLAGS) $(verbs_ibverbs_CPPFLAGS)
libverbs_fi_la_LDFLAGS = \
-module -avoid-version -shared -export-dynamic $(verbs_ibverbs_LDFLAGS)
libverbs_fi_la_LIBADD = $(linkback) $(verbs_rdmacm_LIBS) $(verbs_ibverbs_LIBS)
libverbs_fi_la_DEPENDENCIES = $(linkback)
else !HAVE_VERBS_DL
src_libfabric_la_SOURCES += $(_verbs_files)
src_libfabric_la_CPPFLAGS += $(verbs_ibverbs_CPPFLAGS)
src_libfabric_la_LDFLAGS += $(verbs_ibverbs_LDFLAGS)
src_libfabric_la_LIBADD += $(verbs_rdmacm_LIBS) $(verbs_ibverbs_LIBS)
endif !HAVE_VERBS_DL
endif HAVE_VERBS
if HAVE_USNIC
libusnic_direct_sources = \
prov/usnic/src/usnic_direct/cq_desc.h \
prov/usnic/src/usnic_direct/cq_enet_desc.h \
prov/usnic/src/usnic_direct/kcompat.h \
prov/usnic/src/usnic_direct/kcompat_priv.h \
prov/usnic/src/usnic_direct/libnl1_utils.h \
prov/usnic/src/usnic_direct/libnl3_utils.h \
prov/usnic/src/usnic_direct/libnl_utils_common.c \
prov/usnic/src/usnic_direct/libnl_utils.h \
prov/usnic/src/usnic_direct/linux/delay.h \
prov/usnic/src/usnic_direct/linux/slab.h \
prov/usnic/src/usnic_direct/linux_types.h \
prov/usnic/src/usnic_direct/rq_enet_desc.h \
prov/usnic/src/usnic_direct/usd_caps.c \
prov/usnic/src/usnic_direct/usd_caps.h \
prov/usnic/src/usnic_direct/usd_dest.c \
prov/usnic/src/usnic_direct/usd_dest.h \
prov/usnic/src/usnic_direct/usd_device.c \
prov/usnic/src/usnic_direct/usd_device.h \
prov/usnic/src/usnic_direct/usd_event.c \
prov/usnic/src/usnic_direct/usd.h \
prov/usnic/src/usnic_direct/usd_ib_cmd.c \
prov/usnic/src/usnic_direct/usd_ib_cmd.h \
prov/usnic/src/usnic_direct/usd_ib_sysfs.c \
prov/usnic/src/usnic_direct/usd_ib_sysfs.h \
prov/usnic/src/usnic_direct/usd_mem.c \
prov/usnic/src/usnic_direct/usd_poll.c \
prov/usnic/src/usnic_direct/usd_post.c \
prov/usnic/src/usnic_direct/usd_post.h \
prov/usnic/src/usnic_direct/usd_post_raw_normal.c \
prov/usnic/src/usnic_direct/usd_post_udp_normal.c \
prov/usnic/src/usnic_direct/usd_post_udp_pio.c \
prov/usnic/src/usnic_direct/usd_queue.h \
prov/usnic/src/usnic_direct/usd_queues.c \
prov/usnic/src/usnic_direct/usd_socket.c \
prov/usnic/src/usnic_direct/usd_socket.h \
prov/usnic/src/usnic_direct/usd_time.h \
prov/usnic/src/usnic_direct/usd_util.h \
prov/usnic/src/usnic_direct/usd_vnic.c \
prov/usnic/src/usnic_direct/usd_vnic.h \
prov/usnic/src/usnic_direct/usnic_abi.h \
prov/usnic/src/usnic_direct/usnic_direct.h \
prov/usnic/src/usnic_direct/usnic_ib_abi.h \
prov/usnic/src/usnic_direct/usnic_ip_utils.c \
prov/usnic/src/usnic_direct/usnic_ip_utils.h \
prov/usnic/src/usnic_direct/usnic_user_utils.h \
prov/usnic/src/usnic_direct/vnic_cq.c \
prov/usnic/src/usnic_direct/vnic_cq.h \
prov/usnic/src/usnic_direct/vnic_dev.c \
prov/usnic/src/usnic_direct/vnic_devcmd.h \
prov/usnic/src/usnic_direct/vnic_dev.h \
prov/usnic/src/usnic_direct/vnic_enet.h \
prov/usnic/src/usnic_direct/vnic_resource.h \
prov/usnic/src/usnic_direct/vnic_rq.c \
prov/usnic/src/usnic_direct/vnic_rq.h \
prov/usnic/src/usnic_direct/vnic_stats.h \
prov/usnic/src/usnic_direct/vnic_wq.c \
prov/usnic/src/usnic_direct/vnic_wq.h \
prov/usnic/src/usnic_direct/wq_enet_desc.h
_usnic_files = \
$(libusnic_direct_sources) \
prov/usnic/src/fi_ext_usnic.h \
prov/usnic/src/usdf.h \
prov/usnic/src/usdf_av.c \
prov/usnic/src/usdf_av.h \
prov/usnic/src/usdf_cm.c \
prov/usnic/src/usdf_cm.h \
prov/usnic/src/usdf_cq.c \
prov/usnic/src/usdf_cq.h \
prov/usnic/src/usdf_dgram.c \
prov/usnic/src/usdf_dgram.h \
prov/usnic/src/usdf_domain.c \
prov/usnic/src/usdf_endpoint.c \
prov/usnic/src/usdf_endpoint.h \
prov/usnic/src/usdf_ep_dgram.c \
prov/usnic/src/usdf_ep_msg.c \
prov/usnic/src/usdf_ep_rdm.c \
prov/usnic/src/usdf_eq.c \
prov/usnic/src/usdf_fabric.c \
prov/usnic/src/usdf_mem.c \
prov/usnic/src/usdf_msg.c \
prov/usnic/src/usdf_msg.h \
prov/usnic/src/usdf_pep.c \
prov/usnic/src/usdf_progress.c \
prov/usnic/src/usdf_progress.h \
prov/usnic/src/usdf_rdm.c \
prov/usnic/src/usdf_rdm.h \
prov/usnic/src/usdf_rudp.h \
prov/usnic/src/usdf_timer.c \
prov/usnic/src/usdf_timer.h
if HAVE_VERBS
_usnic_files += prov/usnic/src/usdf_fake_ibv.c
endif
_usnic_cppflags = \
-D__LIBUSNIC__ -DWANT_DEBUG_MSGS=0 \
-DHAVE_LIBNL3=$(HAVE_LIBNL3) $(usnic_nl_CPPFLAGS) \
-I$(top_srcdir)/prov/usnic/src/usnic_direct
rdmainclude_HEADERS += \
prov/usnic/src/fi_ext_usnic.h
if HAVE_USNIC_DL
pkglib_LTLIBRARIES += libusnic-fi.la
libusnic_fi_la_CPPFLAGS = $(AM_CPPFLAGS) $(_usnic_cppflags)
libusnic_fi_la_SOURCES = $(_usnic_files) $(common_srcs)
libusnic_fi_la_LDFLAGS = \
$(usnic_ln_LDFLAGS) \
-module -avoid-version -shared -export-dynamic
libusnic_fi_la_LIBADD = $(linkback) $(usnic_nl_LIBS)
libusnic_fi_la_DEPENDENCIES = $(linkback)
else !HAVE_USNIC_DL
src_libfabric_la_SOURCES += $(_usnic_files)
src_libfabric_la_CPPFLAGS += $(_usnic_cppflags)
src_libfabric_la_LDFLAGS += $(usnic_nl_LDFLAGS)
src_libfabric_la_LIBADD += $(usnic_nl_LIBS)
endif !HAVE_USNIC_DL
endif HAVE_USNIC
if HAVE_PSM
_psm_files = \
prov/psm/src/psm_am.h \
prov/psm/src/psmx.h \
prov/psm/src/psm_am.h \
prov/psm/src/psmx_init.c \
prov/psm/src/psmx_domain.c \
prov/psm/src/psmx_cq.c \
prov/psm/src/psmx_eq.c \
prov/psm/src/psmx_cntr.c \
prov/psm/src/psmx_av.c \
prov/psm/src/psmx_ep.c \
prov/psm/src/psmx_cm.c \
prov/psm/src/psmx_tagged.c \
prov/psm/src/psmx_msg.c \
prov/psm/src/psmx_msg2.c \
prov/psm/src/psmx_rma.c \
prov/psm/src/psmx_atomic.c \
prov/psm/src/psmx_am.c \
prov/psm/src/psmx_mr.c \
prov/psm/src/psmx_wait.c \
prov/psm/src/psmx_poll.c \
prov/psm/src/psmx_util.c
if HAVE_PSM_DL
pkglib_LTLIBRARIES += libpsmx-fi.la
libpsmx_fi_la_SOURCES = $(_psm_files) $(common_srcs)
libpsmx_fi_la_CPPFLAGS = $(AM_CPPFLAGS) $(psm_CPPFLAGS)
libpsmx_fi_la_LDFLAGS = \
-module -avoid-version -shared -export-dynamic $(psm_LDFLAGS)
libpsmx_fi_la_LIBADD = $(linkback) $(psm_LIBS)
libpsmx_fi_la_DEPENDENCIES = $(linkback)
else !HAVE_PSM_DL
src_libfabric_la_SOURCES += $(_psm_files)
src_libfabric_la_CPPFLAGS += $(psm_CPPFLAGS)
src_libfabric_la_LDFLAGS += $(psm_LDFLAGS)
src_libfabric_la_LIBADD += $(psm_LIBS)
endif !HAVE_PSM_DL
endif HAVE_PSM
src_libfabric_la_LDFLAGS += -version-info 1 -export-dynamic \
$(libfabric_version_script)
src_libfabric_la_DEPENDENCIES = $(srcdir)/libfabric.map
rdmainclude_HEADERS += \
$(top_srcdir)/include/rdma/fabric.h \
$(top_srcdir)/include/rdma/fi_atomic.h \
$(top_srcdir)/include/rdma/fi_cm.h \
$(top_srcdir)/include/rdma/fi_domain.h \
$(top_srcdir)/include/rdma/fi_eq.h \
$(top_srcdir)/include/rdma/fi_log.h \
$(top_srcdir)/include/rdma/fi_prov.h \
$(top_srcdir)/include/rdma/fi_rma.h \
$(top_srcdir)/include/rdma/fi_endpoint.h \
$(top_srcdir)/include/rdma/fi_errno.h \
$(top_srcdir)/include/rdma/fi_tagged.h \
$(top_srcdir)/include/rdma/fi_trigger.h
if HAVE_DIRECT
nodist_rdmainclude_HEADERS = \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_domain.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_endpoint.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_tagged.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_rma.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_atomic_def.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_atomic.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_cm.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_eq.h \
$(top_srcdir)/prov/$(PROVIDER_DIRECT)/include/rdma/fi_direct_trigger.h
endif HAVE_DIRECT
real_man_pages = \
man/man3/fi_av.3 \
man/man3/fi_cm.3 \
man/man3/fi_cntr.3 \
man/man3/fi_control.3 \
man/man3/fi_cq.3 \
man/man3/fi_domain.3 \
man/man3/fi_endpoint.3 \
man/man3/fi_errno.3 \
man/man3/fi_eq.3 \
man/man3/fi_fabric.3 \
man/man3/fi_getinfo.3 \
man/man3/fi_mr.3 \
man/man3/fi_msg.3 \
man/man3/fi_poll.3 \
man/man3/fi_rma.3 \
man/man3/fi_tagged.3 \
man/man3/fi_trigger.3 \
man/man3/fi_version.3 \
man/man7/fabric.7 \
man/man7/fi_provider.7 \
man/man7/fi_psm.7 \
man/man7/fi_sockets.7 \
man/man7/fi_usnic.7 \
man/man7/fi_verbs.7 \
man/man7/fi_direct.7
dummy_man_pages = \
man/man3/fi_accept.3 \
man/man3/fi_alias.3 \
man/man3/fi_atomic_valid.3 \
man/man3/fi_atomicmsg.3 \
man/man3/fi_atomicv.3 \
man/man3/fi_av_bind.3 \
man/man3/fi_av_insert.3 \
man/man3/fi_av_insertsvc.3 \
man/man3/fi_av_lookup.3 \
man/man3/fi_av_open.3 \
man/man3/fi_av_remove.3 \
man/man3/fi_av_straddr.3 \
man/man3/fi_cancel.3 \
man/man3/fi_close.3 \
man/man3/fi_cntr_add.3 \
man/man3/fi_cntr_open.3 \
man/man3/fi_cntr_read.3 \
man/man3/fi_cntr_set.3 \
man/man3/fi_cntr_wait.3 \
man/man3/fi_compare_atomic.3 \
man/man3/fi_compare_atomic_valid.3 \
man/man3/fi_compare_atomicmsg.3 \
man/man3/fi_compare_atomicv.3 \
man/man3/fi_connect.3 \
man/man3/fi_cq_open.3 \
man/man3/fi_cq_read.3 \
man/man3/fi_cq_readerr.3 \
man/man3/fi_cq_readfrom.3 \
man/man3/fi_cq_sread.3 \
man/man3/fi_cq_sreadfrom.3 \
man/man3/fi_cq_strerror.3 \
man/man3/fi_cq_signal.3 \
man/man3/fi_domain_bind.3 \
man/man3/fi_domain_query.3 \
man/man3/fi_dupinfo.3 \
man/man3/fi_enable.3 \
man/man3/fi_ep_bind.3 \
man/man3/fi_eq_open.3 \
man/man3/fi_eq_read.3 \
man/man3/fi_eq_readerr.3 \
man/man3/fi_eq_sread.3 \
man/man3/fi_eq_strerror.3 \
man/man3/fi_eq_write.3 \
man/man3/fi_fetch_atomic.3 \
man/man3/fi_fetch_atomic_valid.3 \
man/man3/fi_fetch_atomicmsg.3 \
man/man3/fi_fetch_atomicv.3 \
man/man3/fi_freeinfo.3 \
man/man3/fi_getname.3 \
man/man3/fi_getopt.3 \
man/man3/fi_getpeer.3 \
man/man3/fi_inject.3 \
man/man3/fi_injectdata.3 \
man/man3/fi_inject_atomic.3 \
man/man3/fi_inject_write.3 \
man/man3/fi_inject_writedata.3 \
man/man3/fi_join.3 \
man/man3/fi_leave.3 \
man/man3/fi_listen.3 \
man/man3/fi_mr_bind.3 \
man/man3/fi_mr_desc.3 \
man/man3/fi_mr_key.3 \
man/man3/fi_mr_reg.3 \
man/man3/fi_mr_regattr.3 \
man/man3/fi_mr_regv.3 \
man/man3/fi_open.3 \
man/man3/fi_open_ops.3 \
man/man3/fi_passive_ep.3 \
man/man3/fi_pep_bind.3 \
man/man3/fi_poll_add.3 \
man/man3/fi_poll_del.3 \
man/man3/fi_poll_open.3 \
man/man3/fi_read.3 \
man/man3/fi_readmsg.3 \
man/man3/fi_readv.3 \
man/man3/fi_recv.3 \
man/man3/fi_recvmsg.3 \
man/man3/fi_recvv.3 \
man/man3/fi_reject.3 \
man/man3/fi_rx_addr.3 \
man/man3/fi_rx_size_left.3 \
man/man3/fi_scalable_ep_bind.3 \
man/man3/fi_send.3 \
man/man3/fi_senddata.3 \
man/man3/fi_sendmsg.3 \
man/man3/fi_sendv.3 \
man/man3/fi_setopt.3 \
man/man3/fi_shutdown.3 \
man/man3/fi_strerror.3 \
man/man3/fi_tinject.3 \
man/man3/fi_tinjectdata.3 \
man/man3/fi_tostr.3 \
man/man3/fi_trecv.3 \
man/man3/fi_trecvmsg.3 \
man/man3/fi_trecvv.3 \
man/man3/fi_tsend.3 \
man/man3/fi_tsenddata.3 \
man/man3/fi_tsendmsg.3 \
man/man3/fi_tsendv.3 \
man/man3/fi_tx_size_left.3 \
man/man3/fi_wait.3 \
man/man3/fi_wait_open.3 \
man/man3/fi_write.3 \
man/man3/fi_writedata.3 \
man/man3/fi_writemsg.3 \
man/man3/fi_writev.3
man_MANS = $(real_man_pages) $(dummy_man_pages)
nroff:
@for file in $(real_man_pages); do \
source=`echo $$file | sed -e 's@/man[0-9]@@'`; \
config/md2nroff.pl --source=$$source.md; \
done
EXTRA_DIST = libfabric.map libfabric.spec.in config/distscript.pl $(man_MANS)
dist-hook: libfabric.spec
cp libfabric.spec $(distdir)
"$(top_srcdir)/config/distscript.pl" "$(distdir)" "$(PACKAGE_VERSION)"

Просмотреть файл

@ -1,78 +0,0 @@
Version Libfabric v1.0.0
Released on 2015-05-04
Introduction
============
Libfabric is a communication library that exports interfaces for
fabric services to applications. Libfabric is the core component
of the Open Fabrics Interfaces (OFI) framework.
Libfabric has the following objectives:
* High-performance: provide optimized software paths to hardware
- Independent of hardware implementations
* Scalable: targets support for millions of processes
- Designed to reduce cache and memory footprint
- Scalable address resolution and storage
- Tight data structures
* Application-centric
- Interfaces co-designed with application developers and hardware
vendors
* Extensible
- Easily adaptable to support future application needs
OFI is being developed by the OFI Working Group (OFIWG) a subgroup
of the OpenFabrics Alliance (OFA). Participation in OFIWG
(pronounced o-fee-wig) is open to anyone, regardless of their
membership in OFA.
The goal of OFI and libfabric is to define interfaces that enable
a tight semantic map between applications and underlying fabric
services. Specifically, libfabric software interfaces have been
co-designed with fabric hardware providers and application developers,
with an initial focus on the needs of HPC users. OFI supports multiple
interface semantics, is fabric and hardware implementation agnostic,
and leverages and expands the existing RDMA open source community.
For more information regarding the OFI project, please visit the OFIWG
GitHub site:
http://ofiwg.github.io/libfabric/
Support
=======
OFI targets support for the Linux operating system. A reasonable effort
is made to support all major, modern Linux distributions; however,
validation is limited to the most recent 2-3 releases of RedHat
Enterprise Linux (RHEL)and SUSE Linux Enterprise Server (SLES).
OFI aligns its supported distributions with the most current
OpenFabrics Enterprise Distribution (OFED) software releases. With
the exception of the sockets provider, which is provided for development
purposes, distro support for a specific provider is vendor specific.
Libfabric will also run on OS-X, but OS X support is provided as a convenience
for developers.
Bugs, issues, or requests for feature enhancements may be made directly to
the github issues list:
https://github.com/ofiwg/libfabric/issues
Additionally, users may post questions, comments, bugs, etc. to the OFIWG
mailing list. (Don't be bashful. We don't bite.)
ofiwg@lists.openfabrics.org
Patches may be submitted using github (preferred) or posted to the OFIWG
mail list.
Building
========
To install from a libfabric source package run the following commands:
./configure && make && make install
If building directly from the libfabric git tree, run './autogen.sh'
before the configure step.

Просмотреть файл

@ -1,135 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* defined to 1 if libfabric was configured with --enable-debug, 0 otherwise
*/
#undef ENABLE_DEBUG
/* Define to 1 if the linker supports alias attribute. */
#undef HAVE_ALIAS_ATTRIBUTE
/* Set to 1 to use c11 atomic functions */
#undef HAVE_ATOMICS
/* Define to 1 if clock_gettime is available. */
#undef HAVE_CLOCK_GETTIME
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if host_clock_get_service is available. */
#undef HAVE_HOST_GET_CLOCK_SERVICE
/* Define to 1 if you have the <infiniband/verbs.h> header file. */
#undef HAVE_INFINIBAND_VERBS_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Whether we have libl or libnl3 */
#undef HAVE_LIBNL3
/* Define to 1 if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netlink/netlink.h> header file. */
#undef HAVE_NETLINK_NETLINK_H
/* Define to 1 if you have the <netlink/version.h> header file. */
#undef HAVE_NETLINK_VERSION_H
/* psm provider is built */
#undef HAVE_PSM
/* psm provider is built as DSO */
#undef HAVE_PSM_DL
/* Define to 1 if you have the <psm.h> header file. */
#undef HAVE_PSM_H
/* Define to 1 if you have the <rdma/rsocket.h> header file. */
#undef HAVE_RDMA_RSOCKET_H
/* sockets provider is built */
#undef HAVE_SOCKETS
/* sockets provider is built as DSO */
#undef HAVE_SOCKETS_DL
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* assembler has .symver support */
#undef HAVE_SYMVER_SUPPORT
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* usnic provider is built */
#undef HAVE_USNIC
/* usnic provider is built as DSO */
#undef HAVE_USNIC_DL
/* verbs provider is built */
#undef HAVE_VERBS
/* verbs provider is built as DSO */
#undef HAVE_VERBS_DL
/* Define to 1 to enable valgrind annotations */
#undef INCLUDE_VALGRIND
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if pthread_spin_init is available. */
#undef PT_LOCK_SPIN
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

Просмотреть файл

@ -1,114 +0,0 @@
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX qw(strftime);
my $builddir = shift(@ARGV);
my $version = shift(@ARGV);
# Sanity check
die "Must specify builddir, version"
if (!defined($builddir) || !$builddir || ! -d $builddir ||
!defined($version) || !$version);
my $today = strftime "%Y-%m-%d", localtime;
#------------------------------------------------------------------------------
# Helper function to re-write files
#------------------------------------------------------------------------------
sub subst {
my $file = shift;
my $orig;
open(IN, $file) || die "Can't read $file: $!";
$orig .= $_
while (<IN>);
close(IN);
my $copy = $orig;
$copy =~ s/\@VERSION\@/Libfabric v$version/g;
$copy =~ s/\@DATE\@/$today/g;
# Note that there appears to be a bug in some versions of Pandoc
# that will escape the appearance of @ in generated man pages
# (e.g., in the "@VERSION@" that appears in the man page version
# field). So rather than be clever in the regexp's above, do the
# simple/clear thing and repeat the same regexp's as above, but
# with double-escaped @'s.
$copy =~ s/\\\@VERSION\\\@/Libfabric v$version/g;
$copy =~ s/\\\@DATE\\\@/$today/g;
if ($copy ne $orig) {
print "*** VERSION/DATE-ifying $file...\n";
open(OUT, ">$file") || die "Can't write to $file: $!";
print OUT $copy;
close(OUT);
}
}
###############################################################################
# Check to see that the source tree is clean / has no local changes
###############################################################################
if (-d ".git") {
open(GIT_STATUS, "git status --porcelain|") ||
die "Can't run git status to verify that the source tree is clean";
my $clean = 1;
while (<GIT_STATUS>) {
chomp;
if ($_ =~ m/^([^?! ].|.[^?! ]) (.+)$/) {
my $file = $2;
print "*** WARNING: found modified file in source tree: $file\n";
# There is one exception that is allowed: the nightly
# tarball script changes configure.ac to set the correct
# version number. In this case, the nightly tarball
# script will set a magic environment variable with the
# SHA1 hash of the ok-to-be-modified file. See if it is
# set, and if the SHA1 hash agrees.
if (exists($ENV{"LIBFABRIC_DISTSCRIPT_SHA1_$file"})) {
my $sha1 = `sha1sum $file`;
chomp($sha1);
if ($sha1 eq $ENV{"LIBFABRIC_DISTSCRIPT_SHA1_$file"}) {
print "*** ...but an environment variable override says that this is ok!\n";
} else {
$clean = 0;
}
} else {
$clean = 0;
}
}
}
close(GIT_STATUS);
if (!$clean) {
print "*** WARNING: Source tree is not clean.\n";
die "Refusing to make tarball";
}
}
###############################################################################
# Change into the new distribution tree
###############################################################################
chdir($builddir);
subst("README");
chdir("man");
opendir(my $dh, ".") || die "Can't open man directory: $!";
my @subdirs = grep { /man\d+/ && -d "./$_" } readdir($dh);
closedir $dh;
foreach my $dir (@subdirs) {
opendir(my $dh, $dir) || die "Can't open man/$dir directory: $!";
my @files = grep { /\.\d$/ && -f "$dir/$_" } readdir($dh);
closedir $dh;
foreach my $file (@files) {
subst("$dir/$file");
}
}
exit(0);

Просмотреть файл

@ -1,215 +0,0 @@
dnl -*- m4 -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
dnl
dnl This file derived from config/opal_check_package.m4 in Open MPI.
dnl
dnl _FI_CHECK_PACKAGE_HEADER(prefix, header, dir-prefix,
dnl [action-if-found], [action-if-not-found],
dnl includes)
dnl --------------------------------------------------------------------
AC_DEFUN([_FI_CHECK_PACKAGE_HEADER], [
# This is stolen from autoconf to peek under the covers to get the
# cache variable for the library check.
AS_VAR_PUSHDEF([fi_Header], [ac_cv_header_$2])
# There's unfortunately no way to get through the progression of
# header includes without killing off the cache variable and
# trying again...
unset fi_Header
fi_check_package_header_happy="no"
AS_IF([test "$3" = "/usr" || test "$3" = "/usr/local"],
[ # try as is...
AC_VERBOSE([looking for header without includes])
AC_CHECK_HEADERS([$2], [fi_check_package_header_happy="yes"], [])
AS_IF([test "$fi_check_package_header_happy" = "no"],
[# no go on the as is - reset the cache and try again
unset fi_Header])])
AS_IF([test "$fi_check_package_header_happy" = "no"],
[AS_IF([test "$3" != ""],
[$1_CPPFLAGS="$$1_CPPFLAGS -I$3/include"
CPPFLAGS="$CPPFLAGS -I$3/include"])
AC_CHECK_HEADERS([$2], [fi_check_package_header_happy="yes"], [], [$6])
AS_IF([test "$fi_check_package_header_happy" = "yes"], [$4], [$5])],
[$4])
unset fi_check_package_header_happy
AS_VAR_POPDEF([fi_Header])dnl
])
dnl _FI_CHECK_PACKAGE_LIB(prefix, library, function, extra-libraries,
dnl dir-prefix, libdir,
dnl [action-if-found], [action-if-not-found]])
dnl --------------------------------------------------------------------
AC_DEFUN([_FI_CHECK_PACKAGE_LIB], [
# This is stolen from autoconf to peek under the covers to get the
# cache variable for the library check.
AS_LITERAL_IF([$2],
[AS_VAR_PUSHDEF([fi_Lib], [ac_cv_lib_$2_$3])],
[AS_VAR_PUSHDEF([fi_Lib], [ac_cv_lib_$2''_$3])])dnl
# See comment above
unset fi_Lib
fi_check_package_lib_happy="no"
AS_IF([test "$6" != ""],
[ # libdir was specified - search only there
$1_LDFLAGS="$$1_LDFLAGS -L$6"
LDFLAGS="$LDFLAGS -L$6"
AC_CHECK_LIB([$2], [$3],
[fi_check_package_lib_happy="yes"],
[fi_check_package_lib_happy="no"], [$4])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[LDFLAGS="$fi_check_package_$1_save_LDFLAGS"
$1_LDFLAGS="$fi_check_package_$1_orig_LDFLAGS"
unset fi_Lib])],
[ # libdir was not specified - go through search path
fi_check_package_libdir="$5"
AS_IF([test "$fi_check_package_libdir" = "" || \
test "$fi_check_package_libdir" = "/usr" || \
test "$fi_check_package_libdir" = "/usr/local"],
[ # try as is...
AC_VERBOSE([looking for library without search path])
AC_CHECK_LIB([$2], [$3],
[fi_check_package_lib_happy="yes"],
[fi_check_package_lib_happy="no"], [$4])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[ # no go on the as is.. see what happens later...
LDFLAGS="$fi_check_package_$1_save_LDFLAGS"
$1_LDFLAGS="$fi_check_package_$1_orig_LDFLAGS"
unset fi_Lib])])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[AS_IF([test "$fi_check_package_libdir" != ""],
[$1_LDFLAGS="$$1_LDFLAGS -L$fi_check_package_libdir/lib"
LDFLAGS="$LDFLAGS -L$fi_check_package_libdir/lib"
AC_VERBOSE([looking for library in lib])
AC_CHECK_LIB([$2], [$3],
[fi_check_package_lib_happy="yes"],
[fi_check_package_lib_happy="no"], [$4])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[ # no go on the as is.. see what happens later...
LDFLAGS="$fi_check_package_$1_save_LDFLAGS"
$1_LDFLAGS="$fi_check_package_$1_orig_LDFLAGS"
unset fi_Lib])])])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[AS_IF([test "$fi_check_package_libdir" != ""],
[$1_LDFLAGS="$$1_LDFLAGS -L$fi_check_package_libdir/lib64"
LDFLAGS="$LDFLAGS -L$fi_check_package_libdir/lib64"
AC_VERBOSE([looking for library in lib64])
AC_CHECK_LIB([$2], [$3],
[fi_check_package_lib_happy="yes"],
[fi_check_package_lib_happy="no"], [$4])
AS_IF([test "$fi_check_package_lib_happy" = "no"],
[ # no go on the as is.. see what happens later...
LDFLAGS="$fi_check_package_$1_save_LDFLAGS"
$1_LDFLAGS="$fi_check_package_$1_orig_LDFLAGS"
unset fi_Lib])])])])
AS_IF([test "$fi_check_package_lib_happy" = "yes"],
[$1_LIBS="-l$2 $4"
$7], [$8])
AS_VAR_POPDEF([fi_Lib])dnl
])
dnl FI_CHECK_PACKAGE(prefix,
dnl header,
dnl library,
dnl function,
dnl extra-libraries,
dnl dir-prefix,
dnl libdir-prefix,
dnl [action-if-found], [action-if-not-found],
dnl includes)
dnl -----------------------------------------------------------
dnl Check for package defined by header and libs, and probably
dnl located in dir-prefix, possibly with libs in libdir-prefix.
dnl Both dir-prefix and libdir-prefix can be empty. Will set
dnl prefix_{CPPFLAGS, LDFLAGS, LIBS} as needed.
dnl
dnl The general intent of this macro is to provide finer-grained scoping
dnl of C preprocessor flags, linker flags, and libraries (as opposed to
dnl unconditionally adding to the top-level CPFLAGS, LDFLAGS, and LIBS,
dnl which get used to compile/link *everything*).
dnl
dnl Here's a breakdown of the parameters:
dnl
dnl * prefix: the macro sets $prefix_CPPFLAGS, $prefix_LDFLAGS, and
dnl $prefix_LIBS (and AC_SUBSTs all of them). For example, if a
dnl provider uses this macro to check for a header/library that it
dnl needs, it might well set prefix to be its provider name.
dnl * header_filename: the foo.h file to check for
dnl * library_name / function_name: check for function function_name in
dnl -llibrary_name. Specifically, for library_name, use the "foo" form,
dnl as opposed to "libfoo".
dnl * extra_libraries: if the library_name you are checking for requires
dnl additonal -l arguments to link successfully, list them here.
dnl * dir_prefix: if the header/library is located in a non-standard
dnl location (e.g., /opt/foo as opposed to /usr), list it here
dnl * libdir_prefix: if the library is not under $dir_prefix/lib or
dnl $dir_prefix/lib64, list it here.
dnl * action_if_found: if both the header and library are found and
dnl usable, execute action_if_found
dnl * action_if_not_found: otherwise, execute action_if_not_found
dnl * extra_includes: if including header_filename requires additional
dnl headers to be included first, list them here
dnl
dnl The output _CPPFLAGS, _LDFLAGS, and _LIBS can be used to limit the
dnl scope various flags in Makefiles.
dnl
AC_DEFUN([FI_CHECK_PACKAGE],[
fi_check_package_$1_save_CPPFLAGS="$CPPFLAGS"
fi_check_package_$1_save_LDFLAGS="$LDFLAGS"
fi_check_package_$1_save_LIBS="$LIBS"
fi_check_package_$1_orig_CPPFLAGS="$$1_CPPFLAGS"
fi_check_package_$1_orig_LDFLAGS="$$1_LDFLAGS"
fi_check_package_$1_orig_LIBS="$$1_LIBS"
_FI_CHECK_PACKAGE_HEADER([$1], [$2], [$6],
[_FI_CHECK_PACKAGE_LIB([$1], [$3], [$4], [$5], [$6], [$7],
[fi_check_package_happy="yes"],
[fi_check_package_happy="no"])],
[fi_check_package_happy="no"],
[$10])
AS_IF([test "$fi_check_package_happy" = "yes"],
[$8],
[$1_CPPFLAGS="$fi_check_package_$1_orig_CPPFLAGS"
$1_LDFLAGS="$fi_check_package_$1_orig_LDFLAGS"
$1_LIBS="$fi_check_package_$1_orig_LIBS"
$9])
AC_SUBST($1_CPPFLAGS)
AC_SUBST($1_LDFLAGS)
AC_SUBST($1_LIBS)
CPPFLAGS="$fi_check_package_$1_save_CPPFLAGS"
LDFLAGS="$fi_check_package_$1_save_LDFLAGS"
LIBS="$fi_check_package_$1_save_LIBS"
])

Просмотреть файл

@ -1,182 +0,0 @@
dnl Macros to help setup FI providers
dnl
dnl Helper macro called from top-level configure.ac to get ready to
dnl configure providers.
dnl
AC_DEFUN([FI_PROVIDER_INIT],[
PROVIDERS_TO_BUILD=
PROVIDERS_DL=
PROVIDERS_STATIC=
PROVIDERS_COUNT=
m4_include(config/fi_check_package.m4)
])
dnl
dnl Helper macro called from top-level configure.ac to finalize
dnl after all providers have been initialized
dnl
AC_DEFUN([FI_PROVIDER_FINI],[
AC_SUBST(PROVIDERS_TO_BUILD)
AC_SUBST(PROVIDERS_DL)
AC_SUBST(PROVIDERS_STATIC)
])
dnl Helper macro called from top-level configure.ac to setup a
dnl provider.
dnl
dnl 1. Sets up --enable-<provider_name>
dnl 2. Checks for --enable-<provider_name>=dl;
dnl sets $<provider_name>_dl to 0 or 1
dnl 3. Sets $enable_<provider_name> to "yes" or "no"
dnl 4. Calls <provider_name>_CONFIGURE m4 macro
dnl 5. If a directory was provider in --enable-<provider_name>, ensure
dnl it is sane
dnl 6. Calls <provider_name>_CONDITIONALS m4 macro
dnl 7. Outputs whether this provider will be built or not, and if so,
dnl whether it is static or a DSO
dnl
dnl Arguments:
dnl
dnl $1: provider name (must be same as directory name)
dnl
dnl Shell variable outputs:
dnl
dnl enable_$1: yes, no, or auto
dnl $1_dl: 1 if the provider is supposed to be built as a DSO, 0 otherwise
dnl
dnl AC_DEFINE outputs:
dnl
dnl HAVE_$1_DL: same value as $1_dl
dnl
AC_DEFUN([FI_PROVIDER_SETUP],[
AC_MSG_NOTICE([*** Configuring $1 provider])
AC_ARG_ENABLE([$1],
[AS_HELP_STRING([--enable-$1],
[Enable $1 provider @<:@default=auto@:>@])
],
[],
[enable_$1=auto])
# Check the --enable-<$1> value
$1_dl=0
AS_CASE([$enable_$1],
[yes|no], [],
[dl], [enable_$1=yes $1_dl=1],
[auto], [],
[FI_CHECK_PREFIX_DIR([$enable_$1])
enable_$1=yes]
)
# Call the provider's CONFIGURE and CONDITIONALS macros
m4_include([prov/]$1[/configure.m4])
_FI_PROVIDER_INVOKE($1, [CONFIGURE], [yes], [yes])
_FI_PROVIDER_INVOKE($1, [CONDITIONALS], [no], [no])
# See if the provider configured successfully
AS_IF([test $$1_happy -eq 1],
[PROVIDERS_TO_BUILD="$PROVIDERS_TO_BUILD $1"
PROVIDERS_COUNT=$((PROVIDERS_COUNT+1))
AS_IF([test $$1_dl -eq 1],
[PROVIDERS_DL="prov/$1/lib$1.la $PROVIDERS_DL"
AS_IF([test x"$enable_static" = x"yes" &&
test x"$enable_shared" = x"no"],
[AC_MSG_WARN([$1 provider was selected to be built as DL])
AC_MSG_WARN([but libfabric is being built as static-only])
AC_MSG_ERROR([This is an impossible situation. Cannot continue.])])
AC_MSG_NOTICE([$1 provider: build as plugin])
],
[PROVIDERS_STATIC="prov/$1/lib$1.la $PROVIDERS_STATIC"
AC_MSG_NOTICE([$1 provider: include in libfabric])])
],
[AC_MSG_NOTICE([$1 provider: disabled])])
AC_DEFINE_UNQUOTED([HAVE_]m4_translit([$1], [a-z], [A-Z]), $$1_happy, [$1 provider is built])
AC_DEFINE_UNQUOTED([HAVE_]m4_translit([$1], [a-z], [A-Z])[_DL], $$1_dl, [$1 provider is built as DSO])
# Set AM conditionals for HAVE_<provider> and HAVE_<provider>_DL
# as well as AC defines
AM_CONDITIONAL([HAVE_]m4_translit([$1], [a-z], [A-Z]),
[test $$1_happy -eq 1])
AM_CONDITIONAL([HAVE_]m4_translit([$1], [a-z], [A-Z])[_DL],
[test $$1_dl -eq 1])
# If this provier was specifically requested but we can't
# build it, error.
AS_IF([test "$enable_$1 $$1_happy" = "yes 0"],
[AC_MSG_WARN([$1 provider was requested, but cannot be compiled])
AC_MSG_ERROR([Cannot continue])
])
# If this provider was requested for direct build, ensure that
# provider's fi_direct.h exists in tree. Error otherwise.
AS_IF([test x"$enable_direct" = x"$1"],
[AC_CHECK_FILE(prov/$1/include/rdma/fi_direct.h, [],
[AC_MSG_WARN([$1 provider was requested as direct, but is missing required files])
AC_MSG_ERROR([Cannot continue])])])
])
dnl
dnl Helper macro that can use to check that a user-provided directory
dnl is valid as the root of an installation tree. I.e., that it has an
dnl include and lib or lib64 directory. This helps prevent users from
dnl specifying incorrect/invalid directories on the configure command line
dnl (e.g., typoing a directory name and then wondering why a given
dnl provider chooses not to build).
dnl
dnl Arguments:
dnl
dnl $1: directory to check
dnl
AC_DEFUN([FI_CHECK_PREFIX_DIR],[
# Check that the base directory exists
AS_IF([test ! -d "$1"],
[AC_MSG_WARN([supplied directory "$1" does not exist])
AC_MSG_ERROR([Cannot continue])
])
# Check that base/include exists
AS_IF([test -d "$1/include"],
[CPPFLAGS="-I$1/include"],
[AC_MSG_WARN([could not find "include" subdirectory in supplied "$1" directory"])
AC_MSG_ERROR([Cannot continue])
])
# Check that base/lib or base/lib64 exists
AS_IF([test -d "$1/lib"],
[LDFLAGS="-L$1/lib"],
[AS_IF([test -d "$1/lib64"],
[LDFLAGS="-L$1/lib64"],
[AC_MSG_WARN([could not find "lib" or "lib64" subdirectories in supplied "$1" directory"])
AC_MSG_ERROR([Cannot continue])
])
])
])
dnl ------------------------------------------------------------------------
dnl
dnl Internal; should not be called from provder .m4 scripts.
dnl Helper macro to invoke the AC_DEFUN'ed macros down in the providers
dnl
dnl Arguments:
dnl
dnl $1: name of the provider
dnl $2: suffix of the macro to invoke
dnl $3: whether to pass the happy/sad parameters to the invoked macro
dnl $4: whether the macro must exist or not
dnl
AC_DEFUN([_FI_PROVIDER_INVOKE],[
dnl If the FI_<provider>_<suffix> macro is defined, invoke it.
m4_ifdef([FI_]m4_translit([$1], [a-z], [A-Z])[_$2],
[m4_if([$3], [yes],
[FI_]m4_translit([$1], [a-z], [A-Z])[_$2([$1_happy=1],[$1_happy=0])],
[FI_]m4_translit([$1], [a-z], [A-Z])[_$2()]
)],
dnl If $4 is yes and the macro does not exist, error
[m4_if([$4], [yes],
[m4_fatal([$1 provider did not define FI_]m4_translit([$1], [a-z], [A-Z])[_$2 macro in prov/$1/configure.m4])],
[])]
)
])

Просмотреть файл

@ -1,222 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT([libfabric], [1.0.0], [ofiwg@lists.openfabrics.org])
AC_CONFIG_SRCDIR([src/fabric.c])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign -Wall -Werror subdir-objects parallel-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CANONICAL_HOST
macos=0
linux=0
case $host_os in
*darwin*)
macos=1
;;
*linux*)
linux=1
;;
*)
AC_MSG_ERROR([libfabric only builds on Linux & OS X])
;;
esac
AM_CONDITIONAL([MACOS], [test "x$macos" = "x1"])
AM_CONDITIONAL([LINUX], [test "x$linux" = "x1"])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[Enable debugging @<:@default=no@:>@])
],
[CFLAGS="$CFLAGS -g -O0 -Wall"
dbg=1],
[enable_debug=no
dbg=0])
AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[$dbg],
[defined to 1 if libfabric was configured with --enable-debug, 0 otherwise])
dnl Fix autoconf's habit of adding -g -O2 by default
AS_IF([test -z "$CFLAGS"],
[CFLAGS='-fvisibility=hidden -O2 -DNDEBUG -Wall'])
# AM PROG_AR did not exist pre AM 1.11.x (where x is somewhere >0 and
# <3), but it is necessary in AM 1.12.x.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_ARG_WITH([valgrind],
AC_HELP_STRING([--with-valgrind],
[Enable valgrind annotations @<:@default=no@:>@]))
if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then
AC_DEFINE([INCLUDE_VALGRIND], 1,
[Define to 1 to enable valgrind annotations])
if test -d $with_valgrind; then
CPPFLAGS="$CPPLFAGS -I$with_valgrind/include"
fi
fi
AC_ARG_ENABLE([direct],
[AS_HELP_STRING([--enable-direct=@<:@provider@:>@],
[Enable direct calls to a fabric provider @<:@default=no@:>@])
],
[],
[enable_direct=no])
dnl Checks for programs
AC_PROG_CC_C99
dnl Checks for header files.
AC_HEADER_STDC
LT_INIT
dnl dlopen support is optional
AC_ARG_WITH([dlopen],
AC_HELP_STRING([--with-dlopen],
[dl-loadable provider support @<:@default=yes@:>@]),
)
AS_IF([test x"$with_dlopen" != x"no"], [
AC_CHECK_LIB(dl, dlopen, [],
AC_MSG_ERROR([dlopen not found. libfabric requires libdl.]))
])
dnl Checks for libraries
AC_CHECK_LIB(pthread, pthread_mutex_init, [],
AC_MSG_ERROR([pthread_mutex_init() not found. libfabric requires libpthread.]))
AC_CHECK_FUNC([pthread_spin_init],
[have_spinlock=1],
[have_spinlock=0])
AC_DEFINE_UNQUOTED([PT_LOCK_SPIN], [$have_spinlock],
[Define to 1 if pthread_spin_init is available.])
have_clock_gettime=0
have_host_get_clock_service=0
AC_SEARCH_LIBS([clock_gettime],[rt],
[have_clock_gettime=1],
[AC_CHECK_FUNCS([host_get_clock_service],
[have_host_get_clock_service=1],
[AC_MSG_ERROR([clock_gettime or host_get_clock_service
not found.])])])
AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME, [$have_clock_gettime],
[Define to 1 if clock_gettime is available.])
AC_DEFINE_UNQUOTED(HAVE_HOST_GET_CLOCK_SERVICE, [$have_host_get_clock_service],
[Define to 1 if host_clock_get_service is available.])
dnl Check for gcc atomic intrinsics
AC_MSG_CHECKING(compiler support for c11 atomics)
AC_TRY_LINK([#include <stdatomic.h>],
[atomic_int a;
atomic_init(&a, 0);
#ifdef __STDC_NO_ATOMICS__
#error c11 atomics are not supported
#else
return 0;
#endif
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ATOMICS, 1, [Set to 1 to use c11 atomic functions])
],
[AC_MSG_RESULT(no)])
if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then
AC_CHECK_HEADER(valgrind/memcheck.h, [],
AC_MSG_ERROR([valgrind requested but <valgrind/memcheck.h> not found.]))
fi
AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
ac_cv_version_script=yes
else
ac_cv_version_script=no
fi)
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
dnl Disable symbol versioning with icc + ipo, with it ipo is disabled by icc.
dnl The gcc equivalent ipo (-fwhole-program) seems to work fine.
AS_IF([case "$CFLAGS" in
*-ipo*) true ;;
*) false ;;
esac],
[AC_MSG_NOTICE([disabling symbol versioning support with -ipo CFLAG])],
[
AC_CACHE_CHECK(for .symver assembler support, ac_cv_asm_symver_support,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[asm("symbol:\n.symver symbol, api@ABI\n");]])],
[ac_cv_asm_symver_support=yes],
[ac_cv_asm_symver_support=no])])
]) dnl AS_IF
if test x$ac_cv_asm_symver_support = xyes; then
AC_DEFINE([HAVE_SYMVER_SUPPORT], 1, [assembler has .symver support])
fi
AC_LINK_IFELSE(
[AC_LANG_SOURCE[
int foo(int arg);
int foo(int arg) { return arg + 3; };
int foo2(int arg) __attribute__ (( __alias__("foo")));
]],
[ac_cv_prog_cc_alias_symbols=1],
[ac_cv_prog_cc_alias_symbols=0])
AC_DEFINE_UNQUOTED([HAVE_ALIAS_ATTRIBUTE], [$ac_cv_prog_cc_alias_symbols],
[Define to 1 if the linker supports alias attribute.])
dnl Provider-specific checks
FI_PROVIDER_INIT
FI_PROVIDER_SETUP([psm])
FI_PROVIDER_SETUP([sockets])
FI_PROVIDER_SETUP([verbs])
FI_PROVIDER_SETUP([usnic])
FI_PROVIDER_FINI
# If the user requested to build in direct mode, but
# we have more than one provider, error.
AS_IF([test x"$enable_direct" != x"no"],
[AS_IF([test "$PROVIDERS_COUNT" -eq "1"],
[AC_SUBST(PROVIDER_DIRECT, "$enable_direct")],
[AC_MSG_NOTICE([Only one provider can be chosen when using --enable-direct])
AC_MSG_ERROR(Cannot continue)])])
AM_CONDITIONAL([HAVE_DIRECT], [test x"$enable_direct" != x"no"])
AC_CONFIG_FILES([Makefile libfabric.spec])
AC_OUTPUT
dnl helpful output
if test "$PROVIDERS_TO_BUILD" = ""; then
echo "***"
echo "*** No providers were configured. This may not be what you wanted."
echo "***"
exit 1
fi
for i in $PROVIDERS_TO_BUILD; do
v=${i}_dl
if test `eval echo \\$${v}` == "1"; then
dso="$i ${dso}"
else
builtin="$i ${builtin}"
fi
done
cat <<EOF
***
*** Built-in providers: ${builtin}
*** DSO providers: ${dso}
***
EOF

Просмотреть файл

@ -1,347 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_H_
#define _FI_H_
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <assert.h>
#include <string.h>
#include <pthread.h>
#include <rdma/fabric.h>
#include <rdma/fi_prov.h>
#include <rdma/fi_atomic.h>
#include <rdma/fi_log.h>
#ifdef __APPLE__
#include <osx/osd.h>
#else
#include <linux/osd.h>
#endif
#ifdef HAVE_ATOMICS
# include <stdatomic.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef INCLUDE_VALGRIND
# include <valgrind/memcheck.h>
# ifndef VALGRIND_MAKE_MEM_DEFINED
# warning "Valgrind requested, but VALGRIND_MAKE_MEM_DEFINED undefined"
# endif
#endif
#ifndef VALGRIND_MAKE_MEM_DEFINED
# define VALGRIND_MAKE_MEM_DEFINED(addr, len)
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
#ifndef htonll
static inline uint64_t htonll(uint64_t x) { return bswap_64(x); }
#endif
#ifndef ntohll
static inline uint64_t ntohll(uint64_t x) { return bswap_64(x); }
#endif
#else
#ifndef htonll
static inline uint64_t htonll(uint64_t x) { return x; }
#endif
#ifndef ntohll
static inline uint64_t ntohll(uint64_t x) { return x; }
#endif
#endif
#define sizeof_field(type, field) sizeof(((type *)0)->field)
#define MIN(a, b) ((a) < (b) ? a : b)
#define MAX(a, b) ((a) > (b) ? a : b)
/* Restrict to size of struct fi_context */
struct fi_prov_context {
int disable_logging;
};
struct fi_filter {
char **names;
int negated;
};
extern struct fi_filter prov_log_filter;
void fi_create_filter(struct fi_filter *filter, const char *env_name);
void fi_free_filter(struct fi_filter *filter);
int fi_apply_filter(struct fi_filter *filter, const char *name);
void fi_log_init(void);
void fi_log_fini(void);
/* flsll is defined on BSD systems, but is different. */
static inline int fi_flsll(long long int i)
{
return i ? 65 - ffsll(htonll(i)) : 0;
}
static inline uint64_t roundup_power_of_two(uint64_t n)
{
return 1ULL << fi_flsll(n - 1);
}
#define FI_TAG_GENERIC 0xAAAAAAAAAAAAAAAAULL
#if PT_LOCK_SPIN == 1
#define fastlock_t_ pthread_spinlock_t
#define fastlock_init_(lock) pthread_spin_init(lock, PTHREAD_PROCESS_PRIVATE)
#define fastlock_destroy_(lock) pthread_spin_destroy(lock)
#define fastlock_acquire_(lock) pthread_spin_lock(lock)
#define fastlock_release_(lock) pthread_spin_unlock(lock)
#else
#define fastlock_t_ pthread_mutex_t
#define fastlock_init_(lock) pthread_mutex_init(lock, NULL)
#define fastlock_destroy_(lock) pthread_mutex_destroy(lock)
#define fastlock_acquire_(lock) pthread_mutex_lock(lock)
#define fastlock_release_(lock) pthread_mutex_unlock(lock)
#endif /* PT_LOCK_SPIN */
#if ENABLE_DEBUG
typedef struct {
fastlock_t_ impl;
int is_initialized;
} fastlock_t;
# define fastlock_init(lock) \
do { \
(lock)->is_initialized = 1; \
fastlock_init_(&(lock)->impl); \
} while (0)
# define fastlock_destroy(lock) \
do { \
assert((lock)->is_initialized); \
(lock)->is_initialized = 0; \
fastlock_destroy_(&(lock)->impl); \
} while (0)
static inline int fastlock_acquire(fastlock_t *lock)
{
assert(lock->is_initialized);
return fastlock_acquire_(&lock->impl);
}
# define fastlock_release(lock) \
do { \
assert((lock)->is_initialized); \
fastlock_release_(&(lock)->impl); \
} while (0)
#else /* !ENABLE_DEBUG */
# define fastlock_t fastlock_t_
# define fastlock_init(lock) fastlock_init_(lock)
# define fastlock_destroy(lock) fastlock_destroy_(lock)
# define fastlock_acquire(lock) fastlock_acquire_(lock)
# define fastlock_release(lock) fastlock_release_(lock)
#endif
#if ENABLE_DEBUG
#define ATOMIC_IS_INITIALIZED(atomic) assert(atomic->is_initialized)
#else
#define ATOMIC_IS_INITIALIZED(atomic)
#endif
#ifdef HAVE_ATOMICS
typedef struct {
atomic_int val;
#if ENABLE_DEBUG
int is_initialized;
#endif
} atomic_t;
static inline int atomic_inc(atomic_t *atomic)
{
ATOMIC_IS_INITIALIZED(atomic);
return atomic_fetch_add_explicit(&atomic->val, 1, memory_order_acq_rel) + 1;
}
static inline int atomic_dec(atomic_t *atomic)
{
ATOMIC_IS_INITIALIZED(atomic);
return atomic_fetch_sub_explicit(&atomic->val, 1, memory_order_acq_rel) - 1;
}
static inline int atomic_set(atomic_t *atomic, int value)
{
ATOMIC_IS_INITIALIZED(atomic);
atomic_store(&atomic->val, value);
return value;
}
static inline int atomic_get(atomic_t *atomic)
{
ATOMIC_IS_INITIALIZED(atomic);
return atomic_load(&atomic->val);
}
/* avoid using "atomic_init" so we don't conflict with symbol/macro from stdatomic.h */
static inline void atomic_initialize(atomic_t *atomic, int value)
{
atomic_init(&atomic->val, value);
#if ENABLE_DEBUG
atomic->is_initialized = 1;
#endif
}
#else
typedef struct {
fastlock_t lock;
int val;
#if ENABLE_DEBUG
int is_initialized;
#endif
} atomic_t;
static inline int atomic_inc(atomic_t *atomic)
{
int v;
ATOMIC_IS_INITIALIZED(atomic);
fastlock_acquire(&atomic->lock);
v = ++(atomic->val);
fastlock_release(&atomic->lock);
return v;
}
static inline int atomic_dec(atomic_t *atomic)
{
int v;
ATOMIC_IS_INITIALIZED(atomic);
fastlock_acquire(&atomic->lock);
v = --(atomic->val);
fastlock_release(&atomic->lock);
return v;
}
static inline int atomic_set(atomic_t *atomic, int value)
{
ATOMIC_IS_INITIALIZED(atomic);
fastlock_acquire(&atomic->lock);
atomic->val = value;
fastlock_release(&atomic->lock);
return value;
}
/* avoid using "atomic_init" so we don't conflict with symbol/macro from stdatomic.h */
static inline void atomic_initialize(atomic_t *atomic, int value)
{
fastlock_init(&atomic->lock);
atomic->val = value;
#if ENABLE_DEBUG
atomic->is_initialized = 1;
#endif
}
static inline int atomic_get(atomic_t *atomic)
{
ATOMIC_IS_INITIALIZED(atomic);
return atomic->val;
}
#endif // HAVE_ATOMICS
/* non exported symbols */
int fi_read_file(const char *dir, const char *file, char *buf, size_t size);
int fi_poll_fd(int fd, int timeout);
int fi_wait_cond(pthread_cond_t *cond, pthread_mutex_t *mut, int timeout);
size_t fi_datatype_size(enum fi_datatype datatype);
uint64_t fi_tag_bits(uint64_t mem_tag_format);
uint64_t fi_tag_format(uint64_t tag_bits);
int fi_send_allowed(uint64_t caps);
int fi_recv_allowed(uint64_t caps);
int fi_rma_initiate_allowed(uint64_t caps);
int fi_rma_target_allowed(uint64_t caps);
uint64_t fi_gettime_ms(void);
int fi_fd_nonblock(int fd);
#define RDMA_CONF_DIR SYSCONFDIR "/" RDMADIR
#define FI_CONF_DIR RDMA_CONF_DIR "/fabric"
#define DEFAULT_ABI "FABRIC_1.0"
#if HAVE_ALIAS_ATTRIBUTE == 1
#define DEFAULT_SYMVER_PRE(a) a##_
#else
#define DEFAULT_SYMVER_PRE(a) a
#endif
/* symbol -> external symbol mappings */
#ifdef HAVE_SYMVER_SUPPORT
# define SYMVER(name, api, ver) \
asm(".symver " #name "," #api "@" #ver)
# define DEFAULT_SYMVER(name, api) \
asm(".symver " #name "," #api "@@" DEFAULT_ABI)
#else
# define SYMVER(Name, api, ver)
#if HAVE_ALIAS_ATTRIBUTE == 1
# define DEFAULT_SYMVER(name, api) \
extern typeof (name) api __attribute__((alias(#name)));
#else
# define DEFAULT_SYMVER(name, api)
#endif /* HAVE_ALIAS_ATTRIBUTE == 1*/
#endif /* HAVE_SYMVER_SUPPORT */
#ifdef __cplusplus
}
#endif
#endif /* _FI_H_ */

Просмотреть файл

@ -1,445 +0,0 @@
/*
* Copyright (c); 2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL); Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_ENOSYS_H_
#define _FI_ENOSYS_H_
#include <rdma/fabric.h>
#include <rdma/fi_atomic.h>
#include <rdma/fi_cm.h>
#include <rdma/fi_domain.h>
#include <rdma/fi_endpoint.h>
#include <rdma/fi_eq.h>
#include <rdma/fi_rma.h>
#include <rdma/fi_tagged.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
static struct fi_ops X = {
.size = sizeof(struct fi_ops),
.close = X,
.bind = fi_no_bind,
.control = fi_no_control,
.ops_open = fi_no_ops_open,
};
*/
int fi_no_bind(struct fid *fid, struct fid *bfid, uint64_t flags);
int fi_no_control(struct fid *fid, int command, void *arg);
int fi_no_ops_open(struct fid *fid, const char *name,
uint64_t flags, void **ops, void *context);
/*
static struct fi_ops_fabric X = {
.size = sizeof(struct fi_ops_fabric),
.domain = fi_no_domain,
.passive_ep = fi_no_passive_ep,
.eq_open = fi_no_eq_open,
.wait_open = fi_no_wait_open,
};
*/
int fi_no_domain(struct fid_fabric *fabric, struct fi_domain_attr *attr,
struct fid_domain **dom, void *context);
int fi_no_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
struct fid_pep **pep, void *context);
int fi_no_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr,
struct fid_eq **eq, void *context);
int fi_no_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr,
struct fid_wait **waitset);
/*
static struct fi_ops_atomic X = {
.size = sizeof(struct fi_ops_atomic),
.write = fi_no_atomic_write,
.writev = fi_no_atomic_writev,
.writemsg = fi_no_atomic_writemsg,
.inject = fi_no_atomic_inject,
.readwrite = fi_no_atomic_readwrite,
.readwritev = fi_no_atomic_readwritev,
.readwritemsg = fi_no_atomic_readwritemsg,
.compwrite = fi_no_atomic_compwrite,
.compwritev = fi_no_atomic_compwritev,
.compwritemsg = fi_no_atomic_compwritemsg,
.writevalid = fi_no_atomic_writevalid,
.readwritevalid = fi_no_atomic_readwritevalid,
.compwritevalid = fi_no_atomic_compwritevalid,
};
*/
ssize_t fi_no_atomic_write(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_writev(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_writemsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg, uint64_t flags);
ssize_t fi_no_atomic_inject(struct fid_ep *ep, const void *buf, size_t count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op);
ssize_t fi_no_atomic_readwrite(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
void *result, void *result_desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_readwritev(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_readwritemsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags);
ssize_t fi_no_atomic_compwrite(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
const void *compare, void *compare_desc,
void *result, void *result_desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_compwritev(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t fi_no_atomic_compwritemsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags);
int fi_no_atomic_writevalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
int fi_no_atomic_readwritevalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
int fi_no_atomic_compwritevalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
/*
static struct fi_ops_cm X = {
.size = sizeof(struct fi_ops_cm),
.setname = fi_no_setname,
.getname = fi_no_getname,
.getpeer = fi_no_getpeer,
.connect = fi_no_connect,
.listen = fi_no_listen,
.accept = fi_no_accept,
.reject = fi_no_reject,
.shutdown = fi_no_shutdown,
};
*/
int fi_no_setname(fid_t fid, void *addr, size_t addrlen);
int fi_no_getname(fid_t fid, void *addr, size_t *addrlen);
int fi_no_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen);
int fi_no_connect(struct fid_ep *ep, const void *addr,
const void *param, size_t paramlen);
int fi_no_listen(struct fid_pep *pep);
int fi_no_accept(struct fid_ep *ep, const void *param, size_t paramlen);
int fi_no_reject(struct fid_pep *pep, fid_t handle,
const void *param, size_t paramlen);
int fi_no_shutdown(struct fid_ep *ep, uint64_t flags);
/*
static struct fi_ops_domain X = {
.size = sizeof(struct fi_ops_domain),
.av_open = fi_no_av_open,
.cq_open = fi_no_cq_open,
.endpoint = fi_no_endpoint,
.scalable_ep = fi_no_scalable_ep,
.cntr_open = fi_no_cntr_open,
.poll_open = fi_no_poll_open,
.stx_ctx = fi_no_stx_context,
.srx_ctx = fi_no_srx_context,
};
*/
int fi_no_av_open(struct fid_domain *domain, struct fi_av_attr *attr,
struct fid_av **av, void *context);
int fi_no_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr,
struct fid_cq **cq, void *context);
int fi_no_endpoint(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **ep, void *context);
int fi_no_scalable_ep(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **sep, void *context);
int fi_no_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr,
struct fid_cntr **cntr, void *context);
int fi_no_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr,
struct fid_poll **pollset);
int fi_no_stx_context(struct fid_domain *domain, struct fi_tx_attr *attr,
struct fid_stx **stx, void *context);
int fi_no_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr,
struct fid_ep **rx_ep, void *context);
/*
static struct fi_ops_mr X = {
.size = sizeof(struct fi_ops_mr),
.reg = fi_no_mr_reg,
.regv = fi_no_mr_regv,
.regattr = fi_no_mr_regattr,
};
*/
int fi_no_mr_reg(struct fid *fid, const void *buf, size_t len,
uint64_t access, uint64_t offset, uint64_t requested_key,
uint64_t flags, struct fid_mr **mr, void *context);
int fi_no_mr_regv(struct fid *fid, const struct iovec *iov,
size_t count, uint64_t access,
uint64_t offset, uint64_t requested_key,
uint64_t flags, struct fid_mr **mr, void *context);
int fi_no_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr,
uint64_t flags, struct fid_mr **mr);
/*
static struct fi_ops_ep X = {
.size = sizeof(struct fi_ops_ep),
.cancel = fi_no_cancel,
.getopt = fi_no_getopt,
.setopt = fi_no_setopt,
.tx_ctx = fi_no_tx_ctx,
.rx_ctx = fi_no_rx_ctx,
.rx_size_left = fi_no_rx_size_left,
.tx_size_left = fi_no_tx_size_left,
};
*/
ssize_t fi_no_cancel(fid_t fid, void *context);
int fi_no_getopt(fid_t fid, int level, int optname,
void *optval, size_t *optlen);
int fi_no_setopt(fid_t fid, int level, int optname,
const void *optval, size_t optlen);
int fi_no_tx_ctx(struct fid_ep *sep, int index,
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
void *context);
int fi_no_rx_ctx(struct fid_ep *sep, int index,
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
void *context);
ssize_t fi_no_rx_size_left(struct fid_ep *ep);
ssize_t fi_no_tx_size_left(struct fid_ep *ep);
/*
static struct fi_ops_msg X = {
.size = sizeof(struct fi_ops_msg),
.recv = fi_no_msg_recv,
.recvv = fi_no_msg_recvv,
.recvmsg = fi_no_msg_recvmsg,
.send = fi_no_msg_send,
.sendv = fi_no_msg_sendv,
.sendmsg = fi_no_msg_sendmsg,
.inject = fi_no_msg_inject,
.senddata = fi_no_msg_senddata,
.injectdata = fi_no_msg_injectdata,
};
*/
ssize_t fi_no_msg_recv(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, void *context);
ssize_t fi_no_msg_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, void *context);
ssize_t fi_no_msg_recvmsg(struct fid_ep *ep, const struct fi_msg *msg,
uint64_t flags);
ssize_t fi_no_msg_send(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, void *context);
ssize_t fi_no_msg_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, void *context);
ssize_t fi_no_msg_sendmsg(struct fid_ep *ep, const struct fi_msg *msg,
uint64_t flags);
ssize_t fi_no_msg_inject(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr);
ssize_t fi_no_msg_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, void *context);
ssize_t fi_no_msg_injectdata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr);
/*
static struct fi_ops_wait X = {
.size = sizeof(struct fi_ops_wait),
.wait = X,
};
*/
/*
static struct fi_ops_poll X = {
.size = sizeof(struct fi_ops_poll),
.poll = X,
.poll_add = X,
.poll_del = X,
};
*/
/*
static struct fi_ops_eq X = {
.size = sizeof(struct fi_ops_eq),
.read = X,
.readerr = X,
.write = fi_no_eq_write,
.sread = fi_no_eq_sread,
.strerror = X,
};
*/
ssize_t fi_no_eq_write(struct fid_eq *eq, uint32_t event,
const void *buf, size_t len, uint64_t flags);
ssize_t fi_no_eq_sread(struct fid_eq *eq, uint32_t *event,
void *buf, size_t len, int timeout, uint64_t flags);
/*
static struct fi_ops_cq X = {
.size = sizeof(struct fi_ops_cq),
.read = X,
.readfrom = fi_no_cq_readfrom,
.readerr = X,
.sread = fi_no_cq_sread,
.sreadfrom = fi_no_cq_sreadfrom,
.signal = fi_no_cq_signal,
.strerror = X,
};
*/
ssize_t fi_no_cq_readfrom(struct fid_cq *cq, void *buf, size_t count,
fi_addr_t *src_addr);
ssize_t fi_no_cq_sread(struct fid_cq *cq, void *buf, size_t count,
const void *cond, int timeout);
ssize_t fi_no_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count,
fi_addr_t *src_addr, const void *cond, int timeout);
int fi_no_cq_signal(struct fid_cq *cq);
/*
static struct fi_ops_cntr X = {
.size = sizeof(struct fi_ops_cntr),
.read = X,
.readerr = X,
.add = fi_no_cntr_add,
.set = fi_no_cntr_set,
.wait = fi_no_cntr_wait,
};
*/
int fi_no_cntr_add(struct fid_cntr *cntr, uint64_t value);
int fi_no_cntr_set(struct fid_cntr *cntr, uint64_t value);
int fi_no_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout);
/*
static struct fi_ops_rma X = {
.size = sizeof(struct fi_ops_rma),
.read = fi_no_rma_read,
.readv = fi_no_rma_readv,
.readmsg = fi_no_rma_readmsg,
.write = fi_no_rma_write,
.writev = fi_no_rma_writev,
.writemsg = fi_no_rma_writemsg,
.inject = fi_no_rma_inject,
.writedata = fi_no_rma_writedata,
.injectdata = fi_no_rma_injectdata,
};
*/
ssize_t fi_no_rma_read(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context);
ssize_t fi_no_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t fi_no_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg,
uint64_t flags);
ssize_t fi_no_rma_write(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context);
ssize_t fi_no_rma_writev(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t fi_no_rma_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg,
uint64_t flags);
ssize_t fi_no_rma_inject(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t addr, uint64_t key);
ssize_t fi_no_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t fi_no_rma_injectdata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key);
/*
static struct fi_ops_tagged X = {
.size = sizeof(struct fi_ops_tagged),
.recv = fi_no_tagged_recv,
.recvv = fi_no_tagged_recvv,
.recvmsg = fi_no_tagged_recvmsg,
.send = fi_no_tagged_send,
.sendv = fi_no_tagged_sendv,
.sendmsg = fi_no_tagged_sendmsg,
.inject = fi_no_tagged_inject,
.senddata = fi_no_tagged_senddata,
.injectdata = fi_no_tagged_injectdata,
.search = fi_no_tagged_search,
};
*/
ssize_t fi_no_tagged_recv(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context);
ssize_t fi_no_tagged_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr,
uint64_t tag, uint64_t ignore, void *context);
ssize_t fi_no_tagged_recvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg,
uint64_t flags);
ssize_t fi_no_tagged_send(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t fi_no_tagged_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t fi_no_tagged_sendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg,
uint64_t flags);
ssize_t fi_no_tagged_inject(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t tag);
ssize_t fi_no_tagged_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t fi_no_tagged_injectdata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t tag);
ssize_t fi_no_tagged_search(struct fid_ep *ep, uint64_t *tag, uint64_t ignore,
uint64_t flags, fi_addr_t *src_addr, size_t *len, void *context);
/*
static struct fi_ops_av X = {
.size = sizeof(struct fi_ops_av),
.insert = fi_no_av_insert,
.insertsvc = fi_no_av_insertsvc,
.insertsym = fi_no_av_insertsym,
.remove = fi_no_av_remove,
.lookup = X,
.straddr = X,
};
*/
int fi_no_av_insert(struct fid_av *av, const void *addr, size_t count,
fi_addr_t *fi_addr, uint64_t flags, void *context);
int fi_no_av_insertsvc(struct fid_av *av, const char *node,
const char *service, fi_addr_t *fi_addr, uint64_t flags,
void *context);
int fi_no_av_insertsym(struct fid_av *av, const char *node, size_t nodecnt,
const char *service, size_t svccnt, fi_addr_t *fi_addr,
uint64_t flags, void *context);
int fi_no_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count,
uint64_t flags);
#ifdef __cplusplus
}
#endif
#endif /* _FI_ENOSYS_H_ */

Просмотреть файл

@ -1,107 +0,0 @@
/*
* Copyright (c) 2011 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#if !defined(INDEXER_H)
#define INDEXER_H
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
/*
* Indexer - to find a structure given an index. Synchronization
* must be provided by the caller. Caller must initialize the
* indexer by setting free_list and size to 0.
*/
union idx_entry {
void *item;
int next;
};
#define IDX_INDEX_BITS 16
#define IDX_ENTRY_BITS 10
#define IDX_ENTRY_SIZE (1 << IDX_ENTRY_BITS)
#define IDX_ARRAY_SIZE (1 << (IDX_INDEX_BITS - IDX_ENTRY_BITS))
#define IDX_MAX_INDEX ((1 << IDX_INDEX_BITS) - 1)
struct indexer
{
union idx_entry *array[IDX_ARRAY_SIZE];
int free_list;
int size;
};
#define idx_array_index(index) (index >> IDX_ENTRY_BITS)
#define idx_entry_index(index) (index & (IDX_ENTRY_SIZE - 1))
int idx_insert(struct indexer *idx, void *item);
void *idx_remove(struct indexer *idx, int index);
void idx_replace(struct indexer *idx, int index, void *item);
static inline void *idx_at(struct indexer *idx, int index)
{
return (idx->array[idx_array_index(index)] + idx_entry_index(index))->item;
}
/*
* Index map - associates a structure with an index. Synchronization
* must be provided by the caller. Caller must initialize the
* index map by setting it to 0.
*/
struct index_map
{
void **array[IDX_ARRAY_SIZE];
int count[IDX_ARRAY_SIZE];
};
int idm_set(struct index_map *idm, int index, void *item);
void *idm_clear(struct index_map *idm, int index);
static inline void *idm_at(struct index_map *idm, int index)
{
void **entry;
entry = idm->array[idx_array_index(index)];
return entry[idx_entry_index(index)];
}
static inline void *idm_lookup(struct index_map *idm, int index)
{
return ((index <= IDX_MAX_INDEX) && idm->array[idx_array_index(index)]) ?
idm_at(idm, index) : NULL;
}
#endif /* INDEXER_H */

Просмотреть файл

@ -1,291 +0,0 @@
/*
* Copyright (c) 2011 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#if !defined(LIST_H)
#define LIST_H
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <fi.h>
#include <rdma/fi_errno.h>
/*
* Double-linked list
*/
struct dlist_entry {
struct dlist_entry *next;
struct dlist_entry *prev;
};
static inline void dlist_init(struct dlist_entry *head)
{
head->next = head;
head->prev = head;
}
static inline int dlist_empty(struct dlist_entry *head)
{
return head->next == head;
}
static inline void
dlist_insert_after(struct dlist_entry *item, struct dlist_entry *head)
{
item->next = head->next;
item->prev = head;
head->next->prev = item;
head->next = item;
}
static inline void
dlist_insert_before(struct dlist_entry *item, struct dlist_entry *head)
{
dlist_insert_after(item, head->prev);
}
#define dlist_insert_head dlist_insert_after
#define dlist_insert_tail dlist_insert_before
static inline void dlist_remove(struct dlist_entry *item)
{
item->prev->next = item->next;
item->next->prev = item->prev;
}
typedef int dlist_match_func_t(struct dlist_entry *item, const void *arg);
static inline struct dlist_entry *
dlist_remove_first_match(struct dlist_entry *head, dlist_match_func_t *match,
const void *arg)
{
struct dlist_entry *item;
for (item = head->next; item != head; item = item->next) {
if (match(item, arg)) {
dlist_remove(item);
return item;
}
}
return NULL;
}
/*
* Single-linked list
*/
struct slist_entry {
struct slist_entry *next;
};
struct slist {
struct slist_entry *head;
struct slist_entry *tail;
};
static inline void slist_init(struct slist *list)
{
list->head = list->tail = NULL;
}
static inline int slist_empty(struct slist *list)
{
return !list->head;
}
static inline void slist_insert_head(struct slist_entry *item, struct slist *list)
{
if (slist_empty(list))
list->tail = item;
else
item->next = list->head;
list->head = item;
}
static inline void slist_insert_tail(struct slist_entry *item, struct slist *list)
{
if (slist_empty(list))
list->head = item;
else
list->tail->next = item;
list->tail = item;
}
static inline struct slist_entry *slist_remove_head(struct slist *list)
{
struct slist_entry *item;
item = list->head;
if (list->head == list->tail)
slist_init(list);
else
list->head = item->next;
return item;
}
typedef int slist_match_func_t(struct slist_entry *item, const void *arg);
static inline struct slist_entry *
slist_remove_first_match(struct slist *list, slist_match_func_t *match, const void *arg)
{
struct slist_entry *item, *prev;
for (prev = NULL, item = list->head; item; prev = item, item = item->next) {
if (match(item, arg)) {
if (prev)
prev->next = item->next;
else
list->head = item->next;
if (!item->next)
list->tail = prev;
return item;
}
}
return NULL;
}
/*
* Double-linked list with blocking wait-until-avail support
*/
enum {
LIST_READ_FD = 0,
LIST_WRITE_FD
};
struct dlistfd_head {
struct dlist_entry list;
int fdrcnt;
int fdwcnt;
int fd[2];
};
static inline int dlistfd_head_init(struct dlistfd_head *head)
{
int ret;
dlist_init(&head->list);
ret = socketpair(AF_UNIX, SOCK_STREAM, 0, head->fd);
if (ret < 0)
return -errno;
ret = fcntl(head->fd[LIST_READ_FD], F_SETFL, O_NONBLOCK);
if (ret < 0)
goto err;
return 0;
err:
close(head->fd[0]);
close(head->fd[1]);
return -errno;
}
static inline void dlistfd_head_free(struct dlistfd_head *head)
{
close(head->fd[0]);
close(head->fd[1]);
}
static inline int dlistfd_empty(struct dlistfd_head *head)
{
return dlist_empty(&head->list);
}
static inline void dlistfd_signal(struct dlistfd_head *head)
{
char c = 0;
if (head->fdwcnt == head->fdrcnt) {
if (write(head->fd[LIST_WRITE_FD], &c, sizeof c) == sizeof c)
head->fdwcnt++;
}
}
static inline void dlistfd_reset(struct dlistfd_head *head)
{
char c;
if (dlistfd_empty(head) && (head->fdrcnt < head->fdwcnt)) {
if (read(head->fd[LIST_READ_FD], &c, sizeof c) == sizeof c)
head->fdrcnt++;
}
}
static inline void
dlistfd_insert_head(struct dlist_entry *item, struct dlistfd_head *head)
{
dlist_insert_after(item, &head->list);
dlistfd_signal(head);
}
static inline void
dlistfd_insert_tail(struct dlist_entry *item, struct dlistfd_head *head)
{
dlist_insert_before(item, &head->list);
dlistfd_signal(head);
}
static inline void dlistfd_remove(struct dlist_entry *item, struct dlistfd_head *head)
{
dlist_remove(item);
dlistfd_reset(head);
}
static inline int dlistfd_wait_avail(struct dlistfd_head *head, int timeout)
{
int ret;
if(!dlistfd_empty(head))
return 1;
ret = fi_poll_fd(head->fd[LIST_READ_FD], timeout);
if(ret < 0)
return ret;
return (ret == 0) ? -FI_ETIMEDOUT : !dlistfd_empty(head);
}
#endif /* LIST_H */

Просмотреть файл

@ -1,293 +0,0 @@
/*
* Copyright (c) 2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#if !defined(RBUF_H)
#define RBUF_H
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <fcntl.h>
#include <fi.h>
/*
* Simple ring buffer
*/
struct ringbuf {
size_t size;
size_t size_mask;
size_t rcnt;
size_t wcnt;
size_t wpos;
void *buf;
};
static inline int rbinit(struct ringbuf *rb, size_t size)
{
rb->size = roundup_power_of_two(size);
rb->size_mask = rb->size - 1;
rb->rcnt = 0;
rb->wcnt = 0;
rb->wpos = 0;
rb->buf = calloc(1, rb->size);
if (!rb->buf)
return -ENOMEM;
return 0;
}
static inline void rbfree(struct ringbuf *rb)
{
free(rb->buf);
}
static inline int rbfull(struct ringbuf *rb)
{
return rb->wcnt - rb->rcnt >= rb->size;
}
static inline int rbempty(struct ringbuf *rb)
{
return rb->wcnt == rb->rcnt;
}
static inline size_t rbused(struct ringbuf *rb)
{
return rb->wcnt - rb->rcnt;
}
static inline size_t rbavail(struct ringbuf *rb)
{
return rb->size - rbused(rb);
}
static inline void rbwrite(struct ringbuf *rb, const void *buf, size_t len)
{
size_t endlen;
endlen = rb->size - (rb->wpos & rb->size_mask);
if (len <= endlen) {
memcpy((char*)rb->buf + (rb->wpos & rb->size_mask), buf, len);
} else {
memcpy((char*)rb->buf + (rb->wpos & rb->size_mask), buf, endlen);
memcpy(rb->buf, (char*)buf + endlen, len - endlen);
}
rb->wpos += len;
}
static inline void rbcommit(struct ringbuf *rb)
{
rb->wcnt = rb->wpos;
}
static inline void rbabort(struct ringbuf *rb)
{
rb->wpos = rb->wcnt;
}
static inline void rbpeek(struct ringbuf *rb, void *buf, size_t len)
{
size_t endlen;
endlen = rb->size - (rb->rcnt & rb->size_mask);
if (len <= endlen) {
memcpy(buf, (char*)rb->buf + (rb->rcnt & rb->size_mask), len);
} else {
memcpy(buf, (char*)rb->buf + (rb->rcnt & rb->size_mask), endlen);
memcpy((char*)buf + endlen, rb->buf, len - endlen);
}
}
static inline void rbread(struct ringbuf *rb, void *buf, size_t len)
{
rbpeek(rb, buf, len);
rb->rcnt += len;
}
static inline size_t rbdiscard(struct ringbuf *rb, size_t len)
{
size_t used_len = MIN(rbused(rb), len);
rb->rcnt += used_len;
return used_len;
}
/*
* Ring buffer with blocking read support using an fd
*/
enum {
RB_READ_FD,
RB_WRITE_FD
};
struct ringbuffd {
struct ringbuf rb;
int fdrcnt;
int fdwcnt;
int fd[2];
};
static inline int rbfdinit(struct ringbuffd *rbfd, size_t size)
{
int ret, flags;
rbfd->fdrcnt = 0;
rbfd->fdwcnt = 0;
ret = rbinit(&rbfd->rb, size);
if (ret)
return ret;
ret = socketpair(AF_UNIX, SOCK_STREAM, 0, rbfd->fd);
if (ret < 0)
goto err1;
flags = fcntl(rbfd->fd[RB_READ_FD], F_GETFL, 0);
ret = fcntl(rbfd->fd[RB_READ_FD], F_SETFL, flags | O_NONBLOCK);
if (ret < 0)
goto err2;
return 0;
err2:
close(rbfd->fd[0]);
close(rbfd->fd[1]);
err1:
rbfree(&rbfd->rb);
return -errno;
}
static inline void rbfdfree(struct ringbuffd *rbfd)
{
rbfree(&rbfd->rb);
close(rbfd->fd[0]);
close(rbfd->fd[1]);
}
static inline int rbfdfull(struct ringbuffd *rbfd)
{
return rbfull(&rbfd->rb);
}
static inline int rbfdempty(struct ringbuffd *rbfd)
{
return rbempty(&rbfd->rb);
}
static inline size_t rbfdused(struct ringbuffd *rbfd)
{
return rbused(&rbfd->rb);
}
static inline size_t rbfdavail(struct ringbuffd *rbfd)
{
return rbavail(&rbfd->rb);
}
static inline void rbfdsignal(struct ringbuffd *rbfd)
{
char c = 0;
if (rbfd->fdwcnt == rbfd->fdrcnt) {
if (write(rbfd->fd[RB_WRITE_FD], &c, sizeof c) == sizeof c)
rbfd->fdwcnt++;
}
}
static inline void rbfdreset(struct ringbuffd *rbfd)
{
char c;
if (rbfdempty(rbfd) && (rbfd->fdrcnt < rbfd->fdwcnt)) {
if (read(rbfd->fd[RB_READ_FD], &c, sizeof c) == sizeof c)
rbfd->fdrcnt++;
}
}
static inline void rbfdwrite(struct ringbuffd *rbfd, const void *buf, size_t len)
{
rbwrite(&rbfd->rb, buf, len);
}
static inline void rbfdcommit(struct ringbuffd *rbfd)
{
rbcommit(&rbfd->rb);
rbfdsignal(rbfd);
}
static inline void rbfdabort(struct ringbuffd *rbfd)
{
rbabort(&rbfd->rb);
}
static inline void rbfdpeek(struct ringbuffd *rbfd, void *buf, size_t len)
{
rbpeek(&rbfd->rb, buf, len);
}
static inline void rbfdread(struct ringbuffd *rbfd, void *buf, size_t len)
{
rbread(&rbfd->rb, buf, len);
rbfdreset(rbfd);
}
static inline size_t rbfdsread(struct ringbuffd *rbfd, void *buf, size_t len,
int timeout)
{
int ret;
size_t avail;
avail = rbfdused(rbfd);
if (avail) {
len = MIN(len, avail);
rbfdread(rbfd, buf, len);
return len;
}
ret = fi_poll_fd(rbfd->fd[RB_READ_FD], timeout);
if (ret == 1) {
len = MIN(len, rbfdused(rbfd));
rbfdread(rbfd, buf, len);
return len;
}
return ret;
}
static inline size_t rbfdwait(struct ringbuffd *rbfd, int timeout)
{
return fi_poll_fd(rbfd->fd[RB_READ_FD], timeout);
}
#endif /* RBUF_H */

Просмотреть файл

@ -1,34 +0,0 @@
/*
* Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <byteswap.h>
#include <endian.h>

Просмотреть файл

@ -1,71 +0,0 @@
/*
* Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _MACH_CLOCK_GETTIME_H_
#define _MACH_CLOCK_GETTIME_H_
#include <sys/time.h>
#include <time.h>
#include <mach/clock.h>
#include <mach/mach.h>
#include <machine/endian.h>
#include <libkern/OSByteOrder.h>
#include <pthread.h>
#define CLOCK_REALTIME CALENDAR_CLOCK
#define CLOCK_MONOTONIC SYSTEM_CLOCK
#define pthread_yield pthread_yield_np
#define bswap_64 OSSwapInt64
#ifdef _POSIX_HOST_NAME_MAX
#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
#else
#define HOST_NAME_MAX 255
#endif
typedef int clockid_t;
#ifdef __cplusplus
extern "C" {
#endif
int clock_gettime(clockid_t clk_id, struct timespec *tp);
#ifdef __cplusplus
}
#endif
#endif

Просмотреть файл

@ -1,96 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _PROV_H_
#define _PROV_H_
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <rdma/fi_prov.h>
/* Provider initialization function signature that built-in providers
* must specify. */
#define INI_SIG(name) struct fi_provider* name(void)
/* for each provider defines for three scenarios:
* dl: externally visible ctor with known name (see fi_prov.h)
* built-in: ctor function def, don't export symbols
* not built: no-op call for ctor
*/
#if (HAVE_VERBS) && (HAVE_VERBS_DL)
# define VERBS_INI FI_EXT_INI
# define VERBS_INIT NULL
#elif (HAVE_VERBS)
# define VERBS_INI INI_SIG(fi_verbs_ini)
# define VERBS_INIT fi_verbs_ini()
VERBS_INI ;
#else
# define VERBS_INIT NULL
#endif
#if (HAVE_PSM) && (HAVE_PSM_DL)
# define PSM_INI FI_EXT_INI
# define PSM_INIT NULL
#elif (HAVE_PSM)
# define PSM_INI INI_SIG(fi_psm_ini)
# define PSM_INIT fi_psm_ini()
PSM_INI ;
#else
# define PSM_INIT NULL
#endif
#if (HAVE_SOCKETS) && (HAVE_SOCKETS_DL)
# define SOCKETS_INI FI_EXT_INI
# define SOCKETS_INIT NULL
#elif (HAVE_SOCKETS)
# define SOCKETS_INI INI_SIG(fi_sockets_ini)
# define SOCKETS_INIT fi_sockets_ini()
SOCKETS_INI ;
#else
# define SOCKETS_INIT NULL
#endif
#if (HAVE_USNIC) && (HAVE_USNIC_DL)
# define USNIC_INI FI_EXT_INI
# define USNIC_INIT NULL
#elif (HAVE_USNIC)
# define USNIC_INI INI_SIG(fi_usnic_ini)
# define USNIC_INIT fi_usnic_ini()
USNIC_INI ;
#else
# define USNIC_INIT NULL
#endif
#endif /* _PROV_H_ */

Просмотреть файл

@ -1,475 +0,0 @@
/*
* Copyright (c) 2013-2015 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FABRIC_H_
#define _FABRIC_H_
#include <stdint.h>
#include <stddef.h>
#include <sys/socket.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef container_of
#define container_of(ptr, type, field) \
((type *) ((char *)ptr - offsetof(type, field)))
#endif
enum {
FI_MAJOR_VERSION = 1,
FI_MINOR_VERSION = 0,
FI_PATH_MAX = 256,
FI_NAME_MAX = 64,
FI_VERSION_MAX = 64
};
#define FI_VERSION(major, minor) ((major << 16) | (minor))
#define FI_MAJOR(version) (version >> 16)
#define FI_MINOR(version) (version & 0xFFFF)
#define FI_VERSION_GE(v1, v2) ((FI_MAJOR(v1) > FI_MAJOR(v2)) || \
(FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) == FI_MINOR(v2)) || \
(FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) > FI_MINOR(v2)))
uint32_t fi_version(void);
struct fid;
struct fid_fabric;
struct fid_domain;
struct fid_av;
struct fid_wait;
struct fid_poll;
struct fid_eq;
struct fid_cq;
struct fid_cntr;
struct fid_ep;
struct fid_pep;
struct fid_stx;
struct fid_mr;
typedef struct fid *fid_t;
/*
* Provider specific values are indicated by setting the high-order bit.
*/
#define FI_PROV_SPECIFIC (1 << 31)
/*
* Flags
* The 64-bit flag field is used as follows:
* 1-grow up common (usable with multiple operations)
* 59-grow down operation specific (used for single call/class)
* 60 - 63 provider specific
*/
#define FI_MSG (1ULL << 1)
#define FI_RMA (1ULL << 2)
#define FI_TAGGED (1ULL << 3)
#define FI_ATOMIC (1ULL << 4)
#define FI_ATOMICS FI_ATOMIC
#define FI_READ (1ULL << 8)
#define FI_WRITE (1ULL << 9)
#define FI_RECV (1ULL << 10)
#define FI_SEND (1ULL << 11)
#define FI_TRANSMIT FI_SEND
#define FI_REMOTE_READ (1ULL << 12)
#define FI_REMOTE_WRITE (1ULL << 13)
#define FI_MULTI_RECV (1ULL << 16)
#define FI_REMOTE_CQ_DATA (1ULL << 17)
#define FI_MORE (1ULL << 18)
#define FI_PEEK (1ULL << 19)
#define FI_TRIGGER (1ULL << 20)
#define FI_FENCE (1ULL << 21)
#define FI_COMPLETION (1ULL << 24)
#define FI_EVENT FI_COMPLETION
#define FI_INJECT (1ULL << 25)
#define FI_INJECT_COMPLETE (1ULL << 26)
#define FI_TRANSMIT_COMPLETE (1ULL << 27)
#define FI_DELIVERY_COMPLETE (1ULL << 28)
/* fi_getinfo()-specific flags/caps */
#define FI_NUMERICHOST (1ULL << 55)
#define FI_RMA_EVENT (1ULL << 56)
#define FI_SOURCE (1ULL << 57)
#define FI_NAMED_RX_CTX (1ULL << 58)
#define FI_DIRECTED_RECV (1ULL << 59)
struct fi_ioc {
void *addr;
size_t count;
};
/*
* Format for transport addresses to insert into address vectors
*/
enum {
FI_FORMAT_UNSPEC, /* void * */
FI_SOCKADDR, /* struct sockaddr */
FI_SOCKADDR_IN, /* struct sockaddr_in */
FI_SOCKADDR_IN6, /* struct sockaddr_in6 */
FI_SOCKADDR_IB, /* struct sockaddr_ib */
FI_ADDR_PSMX, /* uint64_t */
};
#define FI_ADDR_UNSPEC UINT64_MAX
#define FI_ADDR_NOTAVAIL UINT64_MAX
#define FI_SHARED_CONTEXT (-(size_t)1)
typedef uint64_t fi_addr_t;
enum fi_av_type {
FI_AV_UNSPEC,
FI_AV_MAP,
FI_AV_TABLE
};
enum fi_mr_mode {
FI_MR_UNSPEC,
FI_MR_BASIC,
FI_MR_SCALABLE
};
enum fi_progress {
FI_PROGRESS_UNSPEC,
FI_PROGRESS_AUTO,
FI_PROGRESS_MANUAL
};
enum fi_threading {
FI_THREAD_UNSPEC,
FI_THREAD_SAFE,
FI_THREAD_FID,
FI_THREAD_DOMAIN,
FI_THREAD_COMPLETION,
FI_THREAD_ENDPOINT,
};
enum fi_resource_mgmt {
FI_RM_UNSPEC,
FI_RM_DISABLED,
FI_RM_ENABLED
};
#define FI_ORDER_NONE 0
#define FI_ORDER_RAR (1 << 0)
#define FI_ORDER_RAW (1 << 1)
#define FI_ORDER_RAS (1 << 2)
#define FI_ORDER_WAR (1 << 3)
#define FI_ORDER_WAW (1 << 4)
#define FI_ORDER_WAS (1 << 5)
#define FI_ORDER_SAR (1 << 6)
#define FI_ORDER_SAW (1 << 7)
#define FI_ORDER_SAS (1 << 8)
#define FI_ORDER_STRICT 0x1FF
#define FI_ORDER_DATA (1 << 16)
enum fi_ep_type {
FI_EP_UNSPEC,
FI_EP_MSG,
FI_EP_DGRAM,
FI_EP_RDM,
/* FI_EP_RAW, */
/* FI_EP_PACKET, */
};
/* Endpoint protocol
* If two providers support the same protocol, then they shall interoperate
* when the protocol capabilities match.
*/
enum {
FI_PROTO_UNSPEC,
FI_PROTO_RDMA_CM_IB_RC,
FI_PROTO_IWARP,
FI_PROTO_IB_UD,
FI_PROTO_PSMX,
FI_PROTO_UDP,
FI_PROTO_SOCK_TCP
};
/* Mode bits */
#define FI_CONTEXT (1ULL << 59)
#define FI_MSG_PREFIX (1ULL << 58)
#define FI_ASYNC_IOV (1ULL << 57)
#define FI_RX_CQ_DATA (1ULL << 56)
#define FI_LOCAL_MR (1ULL << 55)
struct fi_tx_attr {
uint64_t caps;
uint64_t mode;
uint64_t op_flags;
uint64_t msg_order;
uint64_t comp_order;
size_t inject_size;
size_t size;
size_t iov_limit;
size_t rma_iov_limit;
};
struct fi_rx_attr {
uint64_t caps;
uint64_t mode;
uint64_t op_flags;
uint64_t msg_order;
uint64_t comp_order;
size_t total_buffered_recv;
size_t size;
size_t iov_limit;
};
struct fi_ep_attr {
enum fi_ep_type type;
uint32_t protocol;
uint32_t protocol_version;
size_t max_msg_size;
size_t msg_prefix_size;
size_t max_order_raw_size;
size_t max_order_war_size;
size_t max_order_waw_size;
uint64_t mem_tag_format;
size_t tx_ctx_cnt;
size_t rx_ctx_cnt;
};
struct fi_domain_attr {
struct fid_domain *domain;
char *name;
enum fi_threading threading;
enum fi_progress control_progress;
enum fi_progress data_progress;
enum fi_resource_mgmt resource_mgmt;
enum fi_av_type av_type;
enum fi_mr_mode mr_mode;
size_t mr_key_size;
size_t cq_data_size;
size_t cq_cnt;
size_t ep_cnt;
size_t tx_ctx_cnt;
size_t rx_ctx_cnt;
size_t max_ep_tx_ctx;
size_t max_ep_rx_ctx;
size_t max_ep_stx_ctx;
size_t max_ep_srx_ctx;
};
struct fi_fabric_attr {
struct fid_fabric *fabric;
char *name;
char *prov_name;
uint32_t prov_version;
};
struct fi_info {
struct fi_info *next;
uint64_t caps;
uint64_t mode;
uint32_t addr_format;
size_t src_addrlen;
size_t dest_addrlen;
void *src_addr;
void *dest_addr;
fid_t handle;
struct fi_tx_attr *tx_attr;
struct fi_rx_attr *rx_attr;
struct fi_ep_attr *ep_attr;
struct fi_domain_attr *domain_attr;
struct fi_fabric_attr *fabric_attr;
};
enum {
FI_CLASS_UNSPEC,
FI_CLASS_FABRIC,
FI_CLASS_DOMAIN,
FI_CLASS_EP,
FI_CLASS_SEP,
FI_CLASS_RX_CTX,
FI_CLASS_SRX_CTX,
FI_CLASS_TX_CTX,
FI_CLASS_STX_CTX,
FI_CLASS_PEP,
FI_CLASS_INTERFACE,
FI_CLASS_AV,
FI_CLASS_MR,
FI_CLASS_EQ,
FI_CLASS_CQ,
FI_CLASS_CNTR,
FI_CLASS_WAIT,
FI_CLASS_POLL,
FI_CLASS_CONNREQ
};
struct fi_eq_attr;
struct fi_wait_attr;
/* fi_bind()-specific flags */
#define FI_SELECTIVE_COMPLETION (1ULL << 59)
struct fi_ops {
size_t size;
int (*close)(struct fid *fid);
int (*bind)(struct fid *fid, struct fid *bfid, uint64_t flags);
int (*control)(struct fid *fid, int command, void *arg);
int (*ops_open)(struct fid *fid, const char *name,
uint64_t flags, void **ops, void *context);
};
/* All fabric interface descriptors must start with this structure */
struct fid {
size_t fclass;
void *context;
struct fi_ops *ops;
};
int fi_getinfo(uint32_t version, const char *node, const char *service,
uint64_t flags, struct fi_info *hints, struct fi_info **info);
void fi_freeinfo(struct fi_info *info);
struct fi_info *fi_dupinfo(const struct fi_info *info);
static inline struct fi_info *fi_allocinfo(void)
{
return fi_dupinfo(NULL);
}
struct fi_ops_fabric {
size_t size;
int (*domain)(struct fid_fabric *fabric, struct fi_info *info,
struct fid_domain **dom, void *context);
int (*passive_ep)(struct fid_fabric *fabric, struct fi_info *info,
struct fid_pep **pep, void *context);
int (*eq_open)(struct fid_fabric *fabric, struct fi_eq_attr *attr,
struct fid_eq **eq, void *context);
int (*wait_open)(struct fid_fabric *fabric, struct fi_wait_attr *attr,
struct fid_wait **waitset);
};
struct fid_fabric {
struct fid fid;
struct fi_ops_fabric *ops;
};
int fi_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, void *context);
#define FI_CHECK_OP(ops, opstype, op) \
((ops->size > offsetof(opstype, op)) && ops->op)
static inline int fi_close(struct fid *fid)
{
return fid->ops->close(fid);
}
struct fi_alias {
struct fid **fid;
uint64_t flags;
};
/* control commands */
enum {
FI_GETFIDFLAG, /* uint64_t flags */
FI_SETFIDFLAG, /* uint64_t flags */
FI_GETOPSFLAG, /* uint64_t flags */
FI_SETOPSFLAG, /* uint64_t flags */
/* Duplicate a fid_t. This allows for 2 fids that refer to a single
* HW resource. Each fid may reference functions that are optimized
* for different use cases.
*/
FI_ALIAS, /* struct fi_alias * */
FI_GETWAIT, /* void * wait object */
FI_ENABLE, /* NULL */
};
static inline int fi_control(struct fid *fid, int command, void *arg)
{
return fid->ops->control(fid, command, arg);
}
static inline int fi_alias(struct fid *fid, struct fid **alias_fid, uint64_t flags)
{
struct fi_alias alias;
alias.fid = alias_fid;
alias.flags = flags;
return fi_control(fid, FI_ALIAS, &alias);
}
static inline int
fi_open_ops(struct fid *fid, const char *name, uint64_t flags,
void **ops, void *context)
{
return fid->ops->ops_open(fid, name, flags, ops, context);
}
enum fi_type {
FI_TYPE_INFO,
FI_TYPE_EP_TYPE,
FI_TYPE_CAPS,
FI_TYPE_OP_FLAGS,
FI_TYPE_ADDR_FORMAT,
FI_TYPE_TX_ATTR,
FI_TYPE_RX_ATTR,
FI_TYPE_EP_ATTR,
FI_TYPE_DOMAIN_ATTR,
FI_TYPE_FABRIC_ATTR,
FI_TYPE_THREADING,
FI_TYPE_PROGRESS,
FI_TYPE_PROTOCOL,
FI_TYPE_MSG_ORDER,
FI_TYPE_MODE,
FI_TYPE_AV_TYPE,
FI_TYPE_ATOMIC_TYPE,
FI_TYPE_ATOMIC_OP,
FI_TYPE_VERSION,
FI_TYPE_EQ_EVENT,
FI_TYPE_CQ_EVENT_FLAGS,
};
char *fi_tostr(const void *data, enum fi_type datatype);
#ifndef FABRIC_DIRECT
struct fi_context {
void *internal[4];
};
#else // FABRIC_DIRECT
#include <rdma/fi_direct.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FABRIC_H_ */

Просмотреть файл

@ -1,313 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_ATOMIC_H_
#define _FI_ATOMIC_H_
#include <rdma/fabric.h>
#include <rdma/fi_endpoint.h>
#include <rdma/fi_rma.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef FABRIC_DIRECT
enum fi_datatype {
FI_INT8,
FI_UINT8,
FI_INT16,
FI_UINT16,
FI_INT32,
FI_UINT32,
FI_INT64,
FI_UINT64,
FI_FLOAT,
FI_DOUBLE,
FI_FLOAT_COMPLEX,
FI_DOUBLE_COMPLEX,
FI_LONG_DOUBLE,
FI_LONG_DOUBLE_COMPLEX,
FI_DATATYPE_LAST
};
enum fi_op {
FI_MIN,
FI_MAX,
FI_SUM,
FI_PROD,
FI_LOR,
FI_LAND,
FI_BOR,
FI_BAND,
FI_LXOR,
FI_BXOR,
FI_ATOMIC_READ,
FI_ATOMIC_WRITE,
FI_CSWAP,
FI_CSWAP_NE,
FI_CSWAP_LE,
FI_CSWAP_LT,
FI_CSWAP_GE,
FI_CSWAP_GT,
FI_MSWAP,
FI_ATOMIC_OP_LAST
};
#else
#include <rdma/fi_direct_atomic_def.h>
#endif /* FABRIC_DIRECT */
struct fi_msg_atomic {
const struct fi_ioc *msg_iov;
void **desc;
size_t iov_count;
fi_addr_t addr;
const struct fi_rma_ioc *rma_iov;
size_t rma_iov_count;
enum fi_datatype datatype;
enum fi_op op;
void *context;
uint64_t data;
};
struct fi_ops_atomic {
size_t size;
ssize_t (*write)(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*writev)(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*writemsg)(struct fid_ep *ep,
const struct fi_msg_atomic *msg, uint64_t flags);
ssize_t (*inject)(struct fid_ep *ep, const void *buf, size_t count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op);
ssize_t (*readwrite)(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
void *result, void *result_desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*readwritev)(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*readwritemsg)(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags);
ssize_t (*compwrite)(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
const void *compare, void *compare_desc,
void *result, void *result_desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*compwritev)(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context);
ssize_t (*compwritemsg)(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags);
int (*writevalid)(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
int (*readwritevalid)(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
int (*compwritevalid)(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count);
};
#ifndef FABRIC_DIRECT
static inline ssize_t
fi_atomic(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->write(ep, buf, count, desc, dest_addr, addr, key,
datatype, op, context);
}
static inline ssize_t
fi_atomicv(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->writev(ep, iov, desc, count, dest_addr, addr, key,
datatype, op, context);
}
static inline ssize_t
fi_atomicmsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg, uint64_t flags)
{
return ep->atomic->writemsg(ep, msg, flags);
}
static inline ssize_t
fi_inject_atomic(struct fid_ep *ep, const void *buf, size_t count,
fi_addr_t dest_addr, uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op)
{
return ep->atomic->inject(ep, buf, count, dest_addr, addr,
key, datatype, op);
}
static inline ssize_t
fi_fetch_atomic(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
void *result, void *result_desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->readwrite(ep, buf, count, desc, result, result_desc,
dest_addr, addr, key, datatype, op, context);
}
static inline ssize_t
fi_fetch_atomicv(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->readwritev(ep, iov, desc, count,
resultv, result_desc, result_count,
dest_addr, addr, key, datatype, op, context);
}
static inline ssize_t
fi_fetch_atomicmsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags)
{
return ep->atomic->readwritemsg(ep, msg, resultv, result_desc,
result_count, flags);
}
static inline ssize_t
fi_compare_atomic(struct fid_ep *ep,
const void *buf, size_t count, void *desc,
const void *compare, void *compare_desc,
void *result, void *result_desc,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->compwrite(ep, buf, count, desc,
compare, compare_desc, result, result_desc,
dest_addr, addr, key, datatype, op, context);
}
static inline ssize_t
fi_compare_atomicv(struct fid_ep *ep,
const struct fi_ioc *iov, void **desc, size_t count,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
fi_addr_t dest_addr,
uint64_t addr, uint64_t key,
enum fi_datatype datatype, enum fi_op op, void *context)
{
return ep->atomic->compwritev(ep, iov, desc, count,
comparev, compare_desc, compare_count,
resultv, result_desc, result_count,
dest_addr, addr, key, datatype, op, context);
}
static inline ssize_t
fi_compare_atomicmsg(struct fid_ep *ep,
const struct fi_msg_atomic *msg,
const struct fi_ioc *comparev, void **compare_desc, size_t compare_count,
struct fi_ioc *resultv, void **result_desc, size_t result_count,
uint64_t flags)
{
return ep->atomic->compwritemsg(ep, msg,
comparev, compare_desc, compare_count,
resultv, result_desc, result_count, flags);
}
static inline int
fi_atomicvalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count)
{
return ep->atomic->writevalid(ep, datatype, op, count);
}
static inline int
fi_fetch_atomicvalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count)
{
return ep->atomic->readwritevalid(ep, datatype, op, count);
}
static inline int
fi_compare_atomicvalid(struct fid_ep *ep,
enum fi_datatype datatype, enum fi_op op, size_t *count)
{
return ep->atomic->compwritevalid(ep, datatype, op, count);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_atomic.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_ATOMIC_H_ */

Просмотреть файл

@ -1,116 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_CM_H_
#define _FI_CM_H_
#include <rdma/fi_endpoint.h>
#ifdef __cplusplus
extern "C" {
#endif
struct fi_ops_cm {
size_t size;
int (*setname)(fid_t fid, void *addr, size_t addrlen);
int (*getname)(fid_t fid, void *addr, size_t *addrlen);
int (*getpeer)(struct fid_ep *ep, void *addr, size_t *addrlen);
int (*connect)(struct fid_ep *ep, const void *addr,
const void *param, size_t paramlen);
int (*listen)(struct fid_pep *pep);
int (*accept)(struct fid_ep *ep, const void *param, size_t paramlen);
int (*reject)(struct fid_pep *pep, fid_t handle,
const void *param, size_t paramlen);
int (*shutdown)(struct fid_ep *ep, uint64_t flags);
};
#ifndef FABRIC_DIRECT
static inline int fi_setname(fid_t fid, void *addr, size_t addrlen)
{
struct fid_ep *ep = container_of(fid, struct fid_ep, fid);
return ep->cm->setname(fid, addr, addrlen);
}
static inline int fi_getname(fid_t fid, void *addr, size_t *addrlen)
{
struct fid_ep *ep = container_of(fid, struct fid_ep, fid);
return ep->cm->getname(fid, addr, addrlen);
}
static inline int fi_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen)
{
return ep->cm->getpeer(ep, addr, addrlen);
}
static inline int fi_listen(struct fid_pep *pep)
{
return pep->cm->listen(pep);
}
static inline int
fi_connect(struct fid_ep *ep, const void *addr,
const void *param, size_t paramlen)
{
return ep->cm->connect(ep, addr, param, paramlen);
}
static inline int
fi_accept(struct fid_ep *ep, const void *param, size_t paramlen)
{
return ep->cm->accept(ep, param, paramlen);
}
static inline int
fi_reject(struct fid_pep *pep, fid_t handle,
const void *param, size_t paramlen)
{
return pep->cm->reject(pep, handle, param, paramlen);
}
static inline int fi_shutdown(struct fid_ep *ep, uint64_t flags)
{
return ep->cm->shutdown(ep, flags);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_cm.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_CM_H_ */

Просмотреть файл

@ -1,293 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_DOMAIN_H_
#define _FI_DOMAIN_H_
#include <rdma/fabric.h>
#include <rdma/fi_eq.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* AV = Address Vector
* Maps and stores transport/network addresses.
*/
#define FI_SYMMETRIC (1ULL << 59)
struct fi_av_attr {
enum fi_av_type type;
int rx_ctx_bits;
size_t count;
size_t ep_per_node;
const char *name;
void *map_addr;
uint64_t flags;
};
struct fi_ops_av {
size_t size;
int (*insert)(struct fid_av *av, const void *addr, size_t count,
fi_addr_t *fi_addr, uint64_t flags, void *context);
int (*insertsvc)(struct fid_av *av, const char *node,
const char *service, fi_addr_t *fi_addr,
uint64_t flags, void *context);
int (*insertsym)(struct fid_av *av, const char *node, size_t nodecnt,
const char *service, size_t svccnt, fi_addr_t *fi_addr,
uint64_t flags, void *context);
int (*remove)(struct fid_av *av, fi_addr_t *fi_addr, size_t count,
uint64_t flags);
int (*lookup)(struct fid_av *av, fi_addr_t fi_addr, void *addr,
size_t *addrlen);
const char * (*straddr)(struct fid_av *av, const void *addr,
char *buf, size_t *len);
};
struct fid_av {
struct fid fid;
struct fi_ops_av *ops;
};
/*
* MR = Memory Region
* Tracks registered memory regions, primarily for remote access,
* but also for local access until we can remove that need.
*/
struct fid_mr {
struct fid fid;
void *mem_desc;
uint64_t key;
};
struct fi_mr_attr {
const struct iovec *mr_iov;
size_t iov_count;
uint64_t access;
uint64_t offset;
uint64_t requested_key;
void *context;
};
struct fi_cq_attr;
struct fi_cntr_attr;
struct fi_ops_domain {
size_t size;
int (*av_open)(struct fid_domain *domain, struct fi_av_attr *attr,
struct fid_av **av, void *context);
int (*cq_open)(struct fid_domain *domain, struct fi_cq_attr *attr,
struct fid_cq **cq, void *context);
int (*endpoint)(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **ep, void *context);
int (*scalable_ep)(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **sep, void *context);
int (*cntr_open)(struct fid_domain *domain, struct fi_cntr_attr *attr,
struct fid_cntr **cntr, void *context);
int (*poll_open)(struct fid_domain *domain, struct fi_poll_attr *attr,
struct fid_poll **pollset);
int (*stx_ctx)(struct fid_domain *domain,
struct fi_tx_attr *attr, struct fid_stx **stx,
void *context);
int (*srx_ctx)(struct fid_domain *domain,
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
void *context);
};
struct fi_ops_mr {
size_t size;
int (*reg)(struct fid *fid, const void *buf, size_t len,
uint64_t access, uint64_t offset, uint64_t requested_key,
uint64_t flags, struct fid_mr **mr, void *context);
int (*regv)(struct fid *fid, const struct iovec *iov,
size_t count, uint64_t access,
uint64_t offset, uint64_t requested_key,
uint64_t flags, struct fid_mr **mr, void *context);
int (*regattr)(struct fid *fid, const struct fi_mr_attr *attr,
uint64_t flags, struct fid_mr **mr);
};
/* Domain bind flags */
#define FI_REG_MR (1ULL << 59)
struct fid_domain {
struct fid fid;
struct fi_ops_domain *ops;
struct fi_ops_mr *mr;
};
#ifndef FABRIC_DIRECT
static inline int
fi_domain(struct fid_fabric *fabric, struct fi_info *info,
struct fid_domain **domain, void *context)
{
return fabric->ops->domain(fabric, info, domain, context);
}
static inline int
fi_domain_bind(struct fid_domain *domain, struct fid *fid, uint64_t flags)
{
return domain->fid.ops->bind(&domain->fid, fid, flags);
}
static inline int
fi_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr,
struct fid_cq **cq, void *context)
{
return domain->ops->cq_open(domain, attr, cq, context);
}
static inline int
fi_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr,
struct fid_cntr **cntr, void *context)
{
return domain->ops->cntr_open(domain, attr, cntr, context);
}
static inline int
fi_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr,
struct fid_wait **waitset)
{
return fabric->ops->wait_open(fabric, attr, waitset);
}
static inline int
fi_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr,
struct fid_poll **pollset)
{
return domain->ops->poll_open(domain, attr, pollset);
}
static inline int
fi_mr_reg(struct fid_domain *domain, const void *buf, size_t len,
uint64_t access, uint64_t offset, uint64_t requested_key,
uint64_t flags, struct fid_mr **mr, void *context)
{
return domain->mr->reg(&domain->fid, buf, len, access, offset,
requested_key, flags, mr, context);
}
static inline void *fi_mr_desc(struct fid_mr *mr)
{
return mr->mem_desc;
}
static inline uint64_t fi_mr_key(struct fid_mr *mr)
{
return mr->key;
}
static inline int fi_mr_bind(struct fid_mr *mr, struct fid *bfid, uint64_t flags)
{
return mr->fid.ops->bind(&mr->fid, bfid, flags);
}
static inline int
fi_av_open(struct fid_domain *domain, struct fi_av_attr *attr,
struct fid_av **av, void *context)
{
return domain->ops->av_open(domain, attr, av, context);
}
static inline int
fi_av_bind(struct fid_av *av, struct fid *fid, uint64_t flags)
{
return av->fid.ops->bind(&av->fid, fid, flags);
}
static inline int
fi_av_insert(struct fid_av *av, const void *addr, size_t count,
fi_addr_t *fi_addr, uint64_t flags, void *context)
{
return av->ops->insert(av, addr, count, fi_addr, flags, context);
}
static inline int
fi_av_insertsvc(struct fid_av *av, const char *node, const char *service,
fi_addr_t *fi_addr, uint64_t flags, void *context)
{
return av->ops->insertsvc(av, node, service, fi_addr, flags, context);
}
static inline int
fi_av_insertsym(struct fid_av *av, const char *node, size_t nodecnt,
const char *service, size_t svccnt,
fi_addr_t *fi_addr, uint64_t flags, void *context)
{
return av->ops->insertsym(av, node, nodecnt, service, svccnt,
fi_addr, flags, context);
}
static inline int
fi_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, uint64_t flags)
{
return av->ops->remove(av, fi_addr, count, flags);
}
static inline int
fi_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, size_t *addrlen)
{
return av->ops->lookup(av, fi_addr, addr, addrlen);
}
static inline const char *
fi_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len)
{
return av->ops->straddr(av, addr, buf, len);
}
static inline fi_addr_t
fi_rx_addr(fi_addr_t fi_addr, int rx_index, int rx_ctx_bits)
{
return (fi_addr_t) (((uint64_t) rx_index << (64 - rx_ctx_bits)) | fi_addr);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_domain.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_DOMAIN_H_ */

Просмотреть файл

@ -1,315 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_ENDPOINT_H_
#define _FI_ENDPOINT_H_
#include <sys/socket.h>
#include <rdma/fabric.h>
#include <rdma/fi_domain.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
struct fi_msg {
const struct iovec *msg_iov;
void **desc;
size_t iov_count;
fi_addr_t addr;
void *context;
uint64_t data;
};
/* Endpoint option levels */
enum {
FI_OPT_ENDPOINT
};
/* FI_OPT_ENDPOINT option names */
enum {
FI_OPT_MIN_MULTI_RECV, /* size_t */
FI_OPT_CM_DATA_SIZE, /* size_t */
};
struct fi_ops_ep {
size_t size;
ssize_t (*cancel)(fid_t fid, void *context);
int (*getopt)(fid_t fid, int level, int optname,
void *optval, size_t *optlen);
int (*setopt)(fid_t fid, int level, int optname,
const void *optval, size_t optlen);
int (*tx_ctx)(struct fid_ep *sep, int index,
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
void *context);
int (*rx_ctx)(struct fid_ep *sep, int index,
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
void *context);
ssize_t (*rx_size_left)(struct fid_ep *ep);
ssize_t (*tx_size_left)(struct fid_ep *ep);
};
struct fi_ops_msg {
size_t size;
ssize_t (*recv)(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, void *context);
ssize_t (*recvv)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, void *context);
ssize_t (*recvmsg)(struct fid_ep *ep, const struct fi_msg *msg,
uint64_t flags);
ssize_t (*send)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, void *context);
ssize_t (*sendv)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, void *context);
ssize_t (*sendmsg)(struct fid_ep *ep, const struct fi_msg *msg,
uint64_t flags);
ssize_t (*inject)(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr);
ssize_t (*senddata)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, void *context);
ssize_t (*injectdata)(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr);
};
struct fi_ops_cm;
struct fi_ops_rma;
struct fi_ops_tagged;
struct fi_ops_atomic;
/* struct fi_ops_collectives; */
/*
* Calls which modify the properties of a endpoint (control, setopt, bind, ...)
* must be serialized against all other operations. Those calls may modify the
* operations referenced by a endpoint in order to optimize the data transfer code
* paths.
*
* A provider may allocate the minimal size structure needed to support the
* ops requested by the user.
*/
struct fid_ep {
struct fid fid;
struct fi_ops_ep *ops;
struct fi_ops_cm *cm;
struct fi_ops_msg *msg;
struct fi_ops_rma *rma;
struct fi_ops_tagged *tagged;
struct fi_ops_atomic *atomic;
};
struct fid_pep {
struct fid fid;
struct fi_ops_ep *ops;
struct fi_ops_cm *cm;
};
struct fid_stx {
struct fid fid;
struct fi_ops_ep *ops;
};
#ifndef FABRIC_DIRECT
static inline int
fi_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
struct fid_pep **pep, void *context)
{
return fabric->ops->passive_ep(fabric, info, pep, context);
}
static inline int
fi_endpoint(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **ep, void *context)
{
return domain->ops->endpoint(domain, info, ep, context);
}
static inline int
fi_scalable_ep(struct fid_domain *domain, struct fi_info *info,
struct fid_ep **sep, void *context)
{
return domain->ops->scalable_ep(domain, info, sep, context);
}
static inline int fi_ep_bind(struct fid_ep *ep, struct fid *bfid, uint64_t flags)
{
return ep->fid.ops->bind(&ep->fid, bfid, flags);
}
static inline int fi_pep_bind(struct fid_pep *pep, struct fid *bfid, uint64_t flags)
{
return pep->fid.ops->bind(&pep->fid, bfid, flags);
}
static inline int fi_scalable_ep_bind(struct fid_ep *sep, struct fid *bfid, uint64_t flags)
{
return sep->fid.ops->bind(&sep->fid, bfid, flags);
}
static inline int fi_enable(struct fid_ep *ep)
{
return ep->fid.ops->control(&ep->fid, FI_ENABLE, NULL);
}
static inline ssize_t fi_cancel(fid_t fid, void *context)
{
struct fid_ep *ep = container_of(fid, struct fid_ep, fid);
return ep->ops->cancel(fid, context);
}
static inline int
fi_setopt(fid_t fid, int level, int optname,
const void *optval, size_t optlen)
{
struct fid_ep *ep = container_of(fid, struct fid_ep, fid);
return ep->ops->setopt(fid, level, optname, optval, optlen);
}
static inline int
fi_getopt(fid_t fid, int level, int optname,
void *optval, size_t *optlen)
{
struct fid_ep *ep = container_of(fid, struct fid_ep, fid);
return ep->ops->getopt(fid, level, optname, optval, optlen);
}
static inline int
fi_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr,
struct fid_ep **tx_ep, void *context)
{
return ep->ops->tx_ctx(ep, index, attr, tx_ep, context);
}
static inline int
fi_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr,
struct fid_ep **rx_ep, void *context)
{
return ep->ops->rx_ctx(ep, index, attr, rx_ep, context);
}
static inline ssize_t
fi_rx_size_left(struct fid_ep *ep)
{
return ep->ops->rx_size_left(ep);
}
static inline ssize_t
fi_tx_size_left(struct fid_ep *ep)
{
return ep->ops->tx_size_left(ep);
}
static inline int
fi_stx_context(struct fid_domain *domain, struct fi_tx_attr *attr,
struct fid_stx **stx, void *context)
{
return domain->ops->stx_ctx(domain, attr, stx, context);
}
static inline int
fi_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr,
struct fid_ep **rx_ep, void *context)
{
return domain->ops->srx_ctx(domain, attr, rx_ep, context);
}
static inline ssize_t
fi_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr,
void *context)
{
return ep->msg->recv(ep, buf, len, desc, src_addr, context);
}
static inline ssize_t
fi_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, void *context)
{
return ep->msg->recvv(ep, iov, desc, count, src_addr, context);
}
static inline ssize_t
fi_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags)
{
return ep->msg->recvmsg(ep, msg, flags);
}
static inline ssize_t
fi_send(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, void *context)
{
return ep->msg->send(ep, buf, len, desc, dest_addr, context);
}
static inline ssize_t
fi_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, void *context)
{
return ep->msg->sendv(ep, iov, desc, count, dest_addr, context);
}
static inline ssize_t
fi_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags)
{
return ep->msg->sendmsg(ep, msg, flags);
}
static inline ssize_t
fi_inject(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr)
{
return ep->msg->inject(ep, buf, len, dest_addr);
}
static inline ssize_t
fi_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, void *context)
{
return ep->msg->senddata(ep, buf, len, desc, data, dest_addr, context);
}
static inline ssize_t
fi_injectdata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr)
{
return ep->msg->injectdata(ep, buf, len, data, dest_addr);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_endpoint.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_ENDPOINT_H_ */

Просмотреть файл

@ -1,440 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_EQ_H_
#define _FI_EQ_H_
#include <rdma/fabric.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Wait Set
* Allows associating multiple EQs and counters with a single wait object.
*/
/* Use fi_control GETWAIT to get underlying wait object(s) */
enum fi_wait_obj {
FI_WAIT_NONE,
FI_WAIT_UNSPEC,
FI_WAIT_SET,
FI_WAIT_FD,
FI_WAIT_MUTEX_COND, /* pthread mutex & cond */
};
struct fi_wait_attr {
enum fi_wait_obj wait_obj;
uint64_t flags;
};
struct fi_ops_wait {
size_t size;
int (*wait)(struct fid_wait *waitset, int timeout);
};
struct fid_wait {
struct fid fid;
struct fi_ops_wait *ops;
};
struct fi_mutex_cond {
pthread_mutex_t *mutex;
pthread_cond_t *cond;
};
/*
* Poll Set
* Allows polling multiple event queues and counters for progress
*/
struct fi_poll_attr {
uint64_t flags;
};
struct fi_ops_poll {
size_t size;
int (*poll)(struct fid_poll *pollset, void **context, int count);
int (*poll_add)(struct fid_poll *pollset, struct fid *event_fid,
uint64_t flags);
int (*poll_del)(struct fid_poll *pollset, struct fid *event_fid,
uint64_t flags);
};
struct fid_poll {
struct fid fid;
struct fi_ops_poll *ops;
};
/*
* EQ = Event Queue
* Used to report various control (not data transfer) events and operations.
*/
struct fi_eq_attr {
size_t size;
uint64_t flags;
enum fi_wait_obj wait_obj;
int signaling_vector;
struct fid_wait *wait_set;
};
/* Standard EQ events */
enum {
FI_NOTIFY,
FI_CONNREQ,
FI_CONNECTED,
FI_SHUTDOWN,
FI_MR_COMPLETE,
FI_AV_COMPLETE,
};
struct fi_eq_entry {
fid_t fid;
void *context;
uint64_t data;
};
struct fi_eq_err_entry {
fid_t fid;
void *context;
uint64_t data;
int err;
int prov_errno;
/* err_data is available until the next time the EQ is read */
void *err_data;
size_t err_data_size;
};
struct fi_eq_cm_entry {
fid_t fid;
/* user must call fi_freeinfo to release info */
struct fi_info *info;
/* connection data placed here, up to space provided */
uint8_t data[];
};
struct fi_ops_eq {
size_t size;
ssize_t (*read)(struct fid_eq *eq, uint32_t *event,
void *buf, size_t len, uint64_t flags);
ssize_t (*readerr)(struct fid_eq *eq, struct fi_eq_err_entry *buf,
uint64_t flags);
ssize_t (*write)(struct fid_eq *eq, uint32_t event,
const void *buf, size_t len, uint64_t flags);
ssize_t (*sread)(struct fid_eq *eq, uint32_t *event,
void *buf, size_t len, int timeout, uint64_t flags);
const char * (*strerror)(struct fid_eq *eq, int prov_errno,
const void *err_data, char *buf, size_t len);
};
struct fid_eq {
struct fid fid;
struct fi_ops_eq *ops;
};
/*
* CQ = Complete Queue
* Used to report the completion of data transfer operations.
*/
enum fi_cq_format {
FI_CQ_FORMAT_UNSPEC,
FI_CQ_FORMAT_CONTEXT,
FI_CQ_FORMAT_MSG,
FI_CQ_FORMAT_DATA,
FI_CQ_FORMAT_TAGGED,
};
struct fi_cq_entry {
void *op_context;
};
struct fi_cq_msg_entry {
void *op_context;
uint64_t flags;
size_t len;
};
struct fi_cq_data_entry {
void *op_context;
uint64_t flags;
size_t len;
void *buf;
/* data depends on operation and/or flags - e.g. remote EQ data */
uint64_t data;
};
struct fi_cq_tagged_entry {
void *op_context;
uint64_t flags;
size_t len;
void *buf;
uint64_t data;
uint64_t tag;
};
struct fi_cq_err_entry {
void *op_context;
uint64_t flags;
size_t len;
void *buf;
uint64_t data;
uint64_t tag;
size_t olen;
int err;
int prov_errno;
/* err_data is available until the next time the CQ is read */
void *err_data;
};
enum fi_cq_wait_cond {
FI_CQ_COND_NONE,
FI_CQ_COND_THRESHOLD /* size_t threshold */
};
struct fi_cq_attr {
size_t size;
uint64_t flags;
enum fi_cq_format format;
enum fi_wait_obj wait_obj;
int signaling_vector;
enum fi_cq_wait_cond wait_cond;
struct fid_wait *wait_set;
};
struct fi_ops_cq {
size_t size;
ssize_t (*read)(struct fid_cq *cq, void *buf, size_t count);
ssize_t (*readfrom)(struct fid_cq *cq, void *buf, size_t count,
fi_addr_t *src_addr);
ssize_t (*readerr)(struct fid_cq *cq, struct fi_cq_err_entry *buf,
uint64_t flags);
ssize_t (*sread)(struct fid_cq *cq, void *buf, size_t count,
const void *cond, int timeout);
ssize_t (*sreadfrom)(struct fid_cq *cq, void *buf, size_t count,
fi_addr_t *src_addr, const void *cond, int timeout);
int (*signal)(struct fid_cq *cq);
const char * (*strerror)(struct fid_cq *cq, int prov_errno,
const void *err_data, char *buf, size_t len);
};
struct fid_cq {
struct fid fid;
struct fi_ops_cq *ops;
};
/*
* CNTR = Counter
* Used to report the number of completed of asynchronous operations.
*/
enum fi_cntr_events {
FI_CNTR_EVENTS_COMP
};
struct fi_cntr_attr {
enum fi_cntr_events events;
enum fi_wait_obj wait_obj;
struct fid_wait *wait_set;
uint64_t flags;
};
struct fi_ops_cntr {
size_t size;
uint64_t (*read)(struct fid_cntr *cntr);
uint64_t (*readerr)(struct fid_cntr *cntr);
int (*add)(struct fid_cntr *cntr, uint64_t value);
int (*set)(struct fid_cntr *cntr, uint64_t value);
int (*wait)(struct fid_cntr *cntr, uint64_t threshold, int timeout);
};
struct fid_cntr {
struct fid fid;
struct fi_ops_cntr *ops;
};
#ifndef FABRIC_DIRECT
static inline int
fi_wait(struct fid_wait *waitset, int timeout)
{
return waitset->ops->wait(waitset, timeout);
}
static inline int
fi_poll(struct fid_poll *pollset, void **context, int count)
{
return pollset->ops->poll(pollset, context, count);
}
static inline int
fi_poll_add(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags)
{
return pollset->ops->poll_add(pollset, event_fid, flags);
}
static inline int
fi_poll_del(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags)
{
return pollset->ops->poll_del(pollset, event_fid, flags);
}
static inline int
fi_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr,
struct fid_eq **eq, void *context)
{
return fabric->ops->eq_open(fabric, attr, eq, context);
}
static inline ssize_t
fi_eq_read(struct fid_eq *eq, uint32_t *event, void *buf,
size_t len, uint64_t flags)
{
return eq->ops->read(eq, event, buf, len, flags);
}
static inline ssize_t
fi_eq_readerr(struct fid_eq *eq, struct fi_eq_err_entry *buf, uint64_t flags)
{
return eq->ops->readerr(eq, buf, flags);
}
static inline ssize_t
fi_eq_write(struct fid_eq *eq, uint32_t event, const void *buf,
size_t len, uint64_t flags)
{
return eq->ops->write(eq, event, buf, len, flags);
}
static inline ssize_t
fi_eq_sread(struct fid_eq *eq, uint32_t *event, void *buf, size_t len,
int timeout, uint64_t flags)
{
return eq->ops->sread(eq, event, buf, len, timeout, flags);
}
static inline const char *
fi_eq_strerror(struct fid_eq *eq, int prov_errno, const void *err_data,
char *buf, size_t len)
{
return eq->ops->strerror(eq, prov_errno, err_data, buf, len);
}
static inline ssize_t fi_cq_read(struct fid_cq *cq, void *buf, size_t count)
{
return cq->ops->read(cq, buf, count);
}
static inline ssize_t
fi_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, fi_addr_t *src_addr)
{
return cq->ops->readfrom(cq, buf, count, src_addr);
}
static inline ssize_t
fi_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags)
{
return cq->ops->readerr(cq, buf, flags);
}
static inline ssize_t
fi_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, int timeout)
{
return cq->ops->sread(cq, buf, count, cond, timeout);
}
static inline ssize_t
fi_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count,
fi_addr_t *src_addr, const void *cond, int timeout)
{
return cq->ops->sreadfrom(cq, buf, count, src_addr, cond, timeout);
}
static inline int fi_cq_signal(struct fid_cq *cq)
{
return cq->ops->signal(cq);
}
static inline const char *
fi_cq_strerror(struct fid_cq *cq, int prov_errno, const void *err_data,
char *buf, size_t len)
{
return cq->ops->strerror(cq, prov_errno, err_data, buf, len);
}
static inline uint64_t fi_cntr_read(struct fid_cntr *cntr)
{
return cntr->ops->read(cntr);
}
static inline uint64_t fi_cntr_readerr(struct fid_cntr *cntr)
{
return cntr->ops->readerr(cntr);
}
static inline int fi_cntr_add(struct fid_cntr *cntr, uint64_t value)
{
return cntr->ops->add(cntr, value);
}
static inline int fi_cntr_set(struct fid_cntr *cntr, uint64_t value)
{
return cntr->ops->set(cntr, value);
}
static inline int
fi_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout)
{
return cntr->ops->wait(cntr, threshold, timeout);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_eq.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_EQ_H_ */

Просмотреть файл

@ -1,199 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_ERRNO_H_
#define _FI_ERRNO_H_
#include <errno.h>
#ifdef __cplusplus
extern "C" {
#endif
/* FI directly mapped errno values */
#define FI_SUCCESS 0
//#define FI_EPERM EPERM /* Operation not permitted */
#define FI_ENOENT ENOENT /* No such file or directory */
//#define FI_ESRCH ESRCH /* No such process */
//#define FI_EINTR EINTR /* Interrupted system call */
#define FI_EIO EIO /* I/O error */
//#define FI_ENXIO ENXIO /* No such device or address */
#define FI_E2BIG E2BIG /* Argument list too long */
//#define FI_ENOEXEC ENOEXEC /* Exec format error */
#define FI_EBADF EBADF /* Bad file number */
//#define FI_ECHILD ECHILD /* No child processes */
#define FI_EAGAIN EAGAIN /* Try again */
#define FI_ENOMEM ENOMEM /* Out of memory */
#define FI_EACCES EACCES /* Permission denied */
//#define FI_EFAULT EFAULT /* Bad address */
//#define FI_ENOTBLK ENOTBLK /* Block device required */
#define FI_EBUSY EBUSY /* Device or resource busy */
//#define FI_EEXIST EEXIST /* File exists */
//#define FI_EXDEV EXDEV /* Cross-device link */
#define FI_ENODEV ENODEV /* No such device */
//#define FI_ENOTDIR ENOTDIR /* Not a directory */
//#define FI_EISDIR EISDIR /* Is a directory */
#define FI_EINVAL EINVAL /* Invalid argument */
//#define FI_ENFILE ENFILE /* File table overflow */
#define FI_EMFILE EMFILE /* Too many open files */
//#define FI_ENOTTY ENOTTY /* Not a typewriter */
//#define FI_ETXTBSY ETXTBSY /* Text file busy */
//#define FI_EFBIG EFBIG /* File too large */
#define FI_ENOSPC ENOSPC /* No space left on device */
//#define FI_ESPIPE ESPIPE /* Illegal seek */
//#define FI_EROFS EROFS /* Read-only file system */
//#define FI_EMLINK EMLINK /* Too many links */
//#define FI_EPIPE EPIPE /* Broken pipe */
//#define FI_EDOM EDOM /* Math argument out of domain of func */
//#define FI_ERANGE ERANGE /* Math result not representable */
//#define FI_EDEADLK EDEADLK /* Resource deadlock would occur */
//#define FI_ENAMETOOLONG ENAMETOLONG /* File name too long */
//#define FI_ENOLCK ENOLCK /* No record locks available */
#define FI_ENOSYS ENOSYS /* Function not implemented */
//#define FI_ENOTEMPTY ENOTEMPTY /* Directory not empty */
//#define FI_ELOOP ELOOP /* Too many symbolic links encountered */
//#define FI_EWOULDBLOCK EWOULDBLOCK /* Operation would block */
#define FI_ENOMSG ENOMSG /* No message of desired type */
//#define FI_EIDRM EIDRM /* Identifier removed */
//#define FI_ECHRNG ECHRNG /* Channel number out of range */
//#define FI_EL2NSYNC EL2NSYCN /* Level 2 not synchronized */
//#define FI_EL3HLT EL3HLT /* Level 3 halted */
//#define FI_EL3RST EL3RST /* Level 3 reset */
//#define FI_ELNRNG ELNRNG /* Link number out of range */
//#define FI_EUNATCH EUNATCH /* Protocol driver not attached */
//#define FI_ENOCSI ENOCSI /* No CSI structure available */
//#define FI_EL2HLT EL2HLT /* Level 2 halted */
//#define FI_EBADE EBADE /* Invalid exchange */
//#define FI_EBADR EBADDR /* Invalid request descriptor */
//#define FI_EXFULL EXFULL /* Exchange full */
//#define FI_ENOANO ENOANO /* No anode */
//#define FI_EBADRQC EBADRQC /* Invalid request code */
//#define FI_EBADSLT EBADSLT /* Invalid slot */
//#define FI_EDEADLOCK EDEADLOCK /* Resource deadlock would occur */
//#define FI_EBFONT EBFONT /* Bad font file format */
//#define FI_ENOSTR ENOSTR /* Device not a stream */
#define FI_ENODATA ENODATA /* No data available */
//#define FI_ETIME ETIME /* Timer expired */
//#define FI_ENOSR ENOSR /* Out of streams resources */
//#define FI_ENONET ENONET /* Machine is not on the network */
//#define FI_ENOPKG ENOPKG /* Package not installed */
//#define FI_EREMOTE EREMOTE /* Object is remote */
//#define FI_ENOLINK ENOLINK /* Link has been severed */
//#define FI_EADV EADV /* Advertise error */
//#define FI_ESRMNT ESRMNT /* Srmount error */
//#define FI_ECOMM ECOMM /* Communication error on send */
//#define FI_EPROTO EPROTO /* Protocol error */
//#define FI_EMULTIHOP EMULTIHOP /* Multihop attempted */
//#define FI_EDOTDOT EDOTDOT /* RFS specific error */
//#define FI_EBADMSG EBADMSG /* Not a data message */
//#define FI_EOVERFLOW EOVERFLOW /* Value too large for defined data type */
//#define FI_ENOTUNIQ ENOTUNIQ /* Name not unique on network */
//#define FI_EBADFD EBADFD /* File descriptor in bad state */
//#define FI_EREMCHG EREMCHG /* Remote address changed */
//#define FI_ELIBACC ELIBACC /* Can not access a needed shared library */
//#define FI_ELIBBAD ELIBBAD /* Accessing a corrupted shared library */
//#define FI_ELIBSCN ELIBSCN /* .lib section in a.out corrupted */
//#define FI_ELIBMAX ELIBMAX /* Attempting to link in too many shared libraries */
//#define FI_ELIBEXEC ELIBEXEC /* Cannot exec a shared library directly */
//#define FI_EILSEQ EILSEQ /* Illegal byte sequence */
//#define FI_ERESTART ERESTART /* Interrupted system call should be restarted */
//#define FI_ESTRPIPE ESTRPIPE /* Streams pipe error */
//#define FI_EUSERS EUSERS /* Too many users */
//#define FI_ENOTSOCK ENOTSOCK /* Socket operation on non-socket */
//#define FI_EDESTADDRREQ EDESTADDRREQ /* Destination address required */
#define FI_EMSGSIZE EMSGSIZE /* Message too long */
//#define FI_EPROTOTYPE EPROTOTYPE /* Protocol wrong type for endpoint */
#define FI_ENOPROTOOPT ENOPROTOOPT /* Protocol not available */
//#define FI_EPROTONOSUPPORT EPROTONOSUPPORT /* Protocol not supported */
//#define FI_ESOCKTNOSUPPORT ESOCKTNOSUPPORT /* Socket type not supported */
#define FI_EOPNOTSUPP EOPNOTSUPP /* Operation not supported on transport endpoint */
//#define FI_EPFNOSUPPORT EPFNOSUPPORT /* Protocol family not supported */
//#define FI_EAFNOSUPPORT EAFNOSUPPORT /* Address family not supported by protocol */
#define FI_EADDRINUSE EADDRINUSE /* Address already in use */
#define FI_EADDRNOTAVAIL EADDRNOTAVAIL /* Cannot assign requested address */
#define FI_ENETDOWN ENETDOWN /* Network is down */
#define FI_ENETUNREACH ENETUNREACH /* Network is unreachable */
//#define FI_ENETRESET ENETRESET /* Network dropped connection because of reset */
#define FI_ECONNABORTED ECONNABORTED /* Software caused connection abort */
#define FI_ECONNRESET ECONNRESET /* Connection reset by peer */
//#define FI_ENOBUFS ENOBUFS /* No buffer space available */
#define FI_EISCONN EISCONN /* Transport endpoint is already connected */
#define FI_ENOTCONN ENOTCONN /* Transport endpoint is not connected */
#define FI_ESHUTDOWN ESHUTDOWN /* Cannot send after transport endpoint shutdown */
//#define FI_ETOOMANYREFS ETOOMANYREFS /* Too many references: cannot splice */
#define FI_ETIMEDOUT ETIMEDOUT /* Connection timed out */
#define FI_ECONNREFUSED ECONNREFUSED /* Connection refused */
//#define FI_EHOSTDOWN EHOSTDOWN /* Host is down */
#define FI_EHOSTUNREACH EHOSTUNREACH /* No route to host */
#define FI_EALREADY EALREADY /* Operation already in progress */
#define FI_EINPROGRESS EINPROGRESS /* Operation now in progress */
//#define FI_ESTALE ESTALE /* Stale NFS file handle */
//#define FI_EUCLEAN EUNCLEAN /* Structure needs cleaning */
//#define FI_ENOTNAM ENOTNAM /* Not a XENIX named type file */
//#define FI_ENAVAIL ENAVAIL /* No XENIX semaphores available */
//#define FI_EISNAM EISNAM /* Is a named type file */
#define FI_EREMOTEIO EREMOTEIO /* Remote I/O error */
//#define FI_EDQUOT EDQUOT /* Quota exceeded */
//#define FI_ENOMEDIUM ENOMEDIUM /* No medium found */
//#define FI_EMEDIUMTYPE EMEDIUMTYPE /* Wrong medium type */
#define FI_ECANCELED ECANCELED /* Operation Canceled */
//#define FI_EKEYEXPIRED EKEYEXPIRED /* Key has expired */
//#define FI_EKEYREVOKED EKEYREVOKED /* Key has been revoked */
#define FI_EKEYREJECTED EKEYREJECTED /* Key was rejected by service */
//#define FI_EOWNERDEAD EOWNERDEAD /* Owner died */
//#define FI_ENOTRECOVERABLE ENOTRECOVERABLE /* State not recoverable */
/* FI specific return values: >= 256 */
#define FI_EOTHER 256 /* Unspecified error */
#define FI_ETOOSMALL 257 /* Provided buffer is too small */
#define FI_EOPBADSTATE 258 /* Operation not permitted in current state */
#define FI_EAVAIL 259 /* Error available */
#define FI_EBADFLAGS 260 /* Flags not supported */
#define FI_ENOEQ 261 /* Missing or unavailable event queue */
#define FI_EDOMAIN 262 /* Invalid resource domain */
#define FI_ENOCQ 263 /* Missing or unavailable completion queue */
#define FI_ECRC 264 /* CRC error */
#define FI_ETRUNC 265 /* Truncation error */
#define FI_ENOKEY 266 /* Required key not available */
const char *fi_strerror(int errnum);
#ifdef __cplusplus
}
#endif
#endif /* _FI_ERRNO_H_ */

Просмотреть файл

@ -1,99 +0,0 @@
/*
* Copyright (c) 2015, Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015, Intel Corp., Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#ifndef _FI_LOG_H_
#define _FI_LOG_H_
#include <rdma/fabric.h>
#include <rdma/fi_prov.h>
#ifdef __cplusplus
extern "C" {
#endif
enum fi_log_subsys {
FI_LOG_CORE,
FI_LOG_FABRIC,
FI_LOG_DOMAIN,
FI_LOG_EP_CTRL,
FI_LOG_EP_DATA,
FI_LOG_AV,
FI_LOG_CQ,
FI_LOG_EQ,
FI_LOG_MR,
FI_LOG_SUBSYS_MAX
};
enum fi_log_level {
FI_LOG_WARN,
FI_LOG_TRACE,
FI_LOG_INFO,
FI_LOG_DEBUG,
FI_LOG_MAX
};
int fi_log_enabled(const struct fi_provider *prov, enum fi_log_level level,
enum fi_log_subsys subsys);
void fi_log(const struct fi_provider *prov, enum fi_log_level level,
enum fi_log_subsys subsys, const char *func, int line,
const char *fmt, ...);
#define FI_LOG(prov, level, subsystem, ...) \
do { \
if (fi_log_enabled(prov, level, subsystem)) \
fi_log(prov, level, subsystem, \
__func__, __LINE__, __VA_ARGS__); \
} while (0)
#define FI_WARN(prov, subsystem, ...) \
FI_LOG(prov, FI_LOG_WARN, subsystem, __VA_ARGS__)
#define FI_TRACE(prov, subsystem, ...) \
FI_LOG(prov, FI_LOG_TRACE, subsystem, __VA_ARGS__)
#define FI_INFO(prov, subsystem, ...) \
FI_LOG(prov, FI_LOG_INFO, subsystem, __VA_ARGS__)
#if ENABLE_DEBUG
#define FI_DBG(prov, subsystem, ...) \
FI_LOG(prov, FI_LOG_DEBUG, subsystem, __VA_ARGS__)
#else
#define FI_DBG(prov_name, subsystem, ...)
#endif
#ifdef __cplusplus
}
#endif
#endif /*_FI_LOG_H_ */

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005, 2006 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2005 PathScale, Inc. All rights reserved.
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_PROV_H_
#define _FI_PROV_H_
#include <rdma/fabric.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Extension that dl-loaded providers should add to their .so filename
* (probably via libtool "-release" option). For example a provider
* driver named "foo" should build a plug-in named "libfoo-fi.so", and
* place it in $prefix/$libdir/libfabric/
*/
#define FI_LIB_EXTENSION "fi"
#define FI_LIB_SUFFIX FI_LIB_EXTENSION ".so"
/*
* Dynamically loaded providers must export the following entry point.
* This is invoked by the libfabric framework when the provider library
* is loaded.
*/
#define FI_EXT_INI \
__attribute__((visibility ("default"))) struct fi_provider* fi_prov_ini(void)
struct fi_provider {
uint32_t version;
uint32_t fi_version;
struct fi_context context;
const char *name;
int (*getinfo)(uint32_t version, const char *node, const char *service,
uint64_t flags, struct fi_info *hints, struct fi_info **info);
int (*fabric)(struct fi_fabric_attr *attr, struct fid_fabric **fabric,
void *context);
void (*cleanup)(void);
};
#ifdef __cplusplus
}
#endif
#endif /* _FI_PROV_H_ */

Просмотреть файл

@ -1,169 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_RMA_H_
#define _FI_RMA_H_
#include <rdma/fabric.h>
#include <rdma/fi_endpoint.h>
#ifdef __cplusplus
extern "C" {
#endif
struct fi_rma_iov {
uint64_t addr;
size_t len;
uint64_t key;
};
struct fi_rma_ioc {
uint64_t addr;
size_t count;
uint64_t key;
};
struct fi_msg_rma {
const struct iovec *msg_iov;
void **desc;
size_t iov_count;
fi_addr_t addr;
const struct fi_rma_iov *rma_iov;
size_t rma_iov_count;
void *context;
uint64_t data;
};
struct fi_ops_rma {
size_t size;
ssize_t (*read)(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context);
ssize_t (*readv)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t (*readmsg)(struct fid_ep *ep, const struct fi_msg_rma *msg,
uint64_t flags);
ssize_t (*write)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context);
ssize_t (*writev)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t (*writemsg)(struct fid_ep *ep, const struct fi_msg_rma *msg,
uint64_t flags);
ssize_t (*inject)(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t addr, uint64_t key);
ssize_t (*writedata)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context);
ssize_t (*injectdata)(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key);
};
#ifndef FABRIC_DIRECT
static inline ssize_t
fi_read(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context)
{
return ep->rma->read(ep, buf, len, desc, src_addr, addr, key, context);
}
static inline ssize_t
fi_readv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key,
void *context)
{
return ep->rma->readv(ep, iov, desc, count, src_addr, addr, key, context);
}
static inline ssize_t
fi_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags)
{
return ep->rma->readmsg(ep, msg, flags);
}
static inline ssize_t
fi_write(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context)
{
return ep->rma->write(ep, buf, len, desc, dest_addr, addr, key, context);
}
static inline ssize_t
fi_writev(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context)
{
return ep->rma->writev(ep, iov, desc, count, dest_addr, addr, key, context);
}
static inline ssize_t
fi_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags)
{
return ep->rma->writemsg(ep, msg, flags);
}
static inline ssize_t
fi_inject_write(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t addr, uint64_t key)
{
return ep->rma->inject(ep, buf, len, dest_addr, addr, key);
}
static inline ssize_t
fi_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key,
void *context)
{
return ep->rma->writedata(ep, buf, len, desc,data, dest_addr,
addr, key, context);
}
static inline ssize_t
fi_inject_writedata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key)
{
return ep->rma->injectdata(ep, buf, len, data, dest_addr, addr, key);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_rma.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_RMA_H_ */

Просмотреть файл

@ -1,159 +0,0 @@
/*
* Copyright (c) 2013-2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_TAGGED_H_
#define _FI_TAGGED_H_
#include <rdma/fabric.h>
#include <rdma/fi_endpoint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define FI_CLAIM (1ULL << 59)
#define FI_DISCARD (1ULL << 58)
struct fi_msg_tagged {
const struct iovec *msg_iov;
void **desc;
size_t iov_count;
fi_addr_t addr;
uint64_t tag;
uint64_t ignore;
void *context;
uint64_t data;
};
struct fi_ops_tagged {
size_t size;
ssize_t (*recv)(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr,
uint64_t tag, uint64_t ignore, void *context);
ssize_t (*recvv)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr,
uint64_t tag, uint64_t ignore, void *context);
ssize_t (*recvmsg)(struct fid_ep *ep, const struct fi_msg_tagged *msg,
uint64_t flags);
ssize_t (*send)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t (*sendv)(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t (*sendmsg)(struct fid_ep *ep, const struct fi_msg_tagged *msg,
uint64_t flags);
ssize_t (*inject)(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t tag);
ssize_t (*senddata)(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context);
ssize_t (*injectdata)(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t tag);
};
#ifndef FABRIC_DIRECT
static inline ssize_t
fi_trecv(struct fid_ep *ep, void *buf, size_t len, void *desc,
fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context)
{
return ep->tagged->recv(ep, buf, len, desc, src_addr, tag, ignore,
context);
}
static inline ssize_t
fi_trecvv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t src_addr, uint64_t tag, uint64_t ignore,
void *context)
{
return ep->tagged->recvv(ep, iov, desc, count, src_addr, tag, ignore,
context);
}
static inline ssize_t
fi_trecvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, uint64_t flags)
{
return ep->tagged->recvmsg(ep, msg, flags);
}
static inline ssize_t
fi_tsend(struct fid_ep *ep, const void *buf, size_t len, void *desc,
fi_addr_t dest_addr, uint64_t tag, void *context)
{
return ep->tagged->send(ep, buf, len, desc, dest_addr, tag, context);
}
static inline ssize_t
fi_tsendv(struct fid_ep *ep, const struct iovec *iov, void **desc,
size_t count, fi_addr_t dest_addr, uint64_t tag, void *context)
{
return ep->tagged->sendv(ep, iov, desc, count, dest_addr,tag, context);
}
static inline ssize_t
fi_tsendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, uint64_t flags)
{
return ep->tagged->sendmsg(ep, msg, flags);
}
static inline ssize_t
fi_tinject(struct fid_ep *ep, const void *buf, size_t len,
fi_addr_t dest_addr, uint64_t tag)
{
return ep->tagged->inject(ep, buf, len, dest_addr, tag);
}
static inline ssize_t
fi_tsenddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context)
{
return ep->tagged->senddata(ep, buf, len, desc, data,
dest_addr, tag, context);
}
static inline ssize_t
fi_tinjectdata(struct fid_ep *ep, const void *buf, size_t len,
uint64_t data, fi_addr_t dest_addr, uint64_t tag)
{
return ep->tagged->injectdata(ep, buf, len, data, dest_addr, tag);
}
#else // FABRIC_DIRECT
#include <rdma/fi_direct_tagged.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_TAGGED_H_ */

Просмотреть файл

@ -1,74 +0,0 @@
/*
* Copyright (c) 2014 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _FI_TRIGGER_H_
#define _FI_TRIGGER_H_
#include <stdint.h>
#include <stddef.h>
#include <rdma/fabric.h>
#ifdef __cplusplus
extern "C" {
#endif
enum fi_trigger_event {
FI_TRIGGER_THRESHOLD,
};
struct fi_trigger_threshold {
struct fid_cntr *cntr;
size_t threshold;
};
#ifndef FABRIC_DIRECT
/* Size must match struct fi_context */
struct fi_triggered_context {
enum fi_trigger_event event_type;
union {
struct fi_trigger_threshold threshold;
void *internal[3];
} trigger;
};
#else // FABRIC_DIRECT
#include <rdma/fi_direct_trigger.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FI_TRIGGER_H_ */

Просмотреть файл

@ -1,13 +0,0 @@
FABRIC_1.0 {
global:
fi_getinfo;
fi_freeinfo;
fi_dupinfo;
fi_fabric;
fi_version;
fi_strerror;
fi_tostr;
fi_log_enabled;
fi_log;
local: *;
};

Просмотреть файл

@ -1,65 +0,0 @@
Name: libfabric
Version: 1.0.0
Release: 1%{?dist}
Summary: User-space RDMA Fabric Interfaces
Group: System Environment/Libraries
License: GPLv2 or BSD
Url: http://www.github.com/ofiwg/libfabric
Source: http://www.openfabrics.org/downloads/fabrics/%{name}-%{version}.tar.bz2
Prefix: ${_prefix}
BuildRequires: libnl-devel
BuildRequires: librdmacm-devel
BuildRequires: libibverbs-devel
BuildRequires: infinipath-psm-devel
%description
libfabric provides a user-space API to access high-performance fabric
services, such as RDMA.
%package devel
Summary: Development files for the libfabric library
Group: System Environment/Libraries
Requires: libfabric = %{version}
%description devel
Development files for the libfabric library.
%prep
%setup -q -n %{name}-%{version}
%build
# defaults: with-dlopen and without-valgrind can be over-rode:
%configure %{?_without_dlopen} %{?_with_valgrind} \
--enable-sockets --enable-verbs --enable-usnic --enable-psm
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%makeinstall installdirs
# remove unpackaged files from the buildroot
rm -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%dir %{_libdir}/libfabric/
%doc AUTHORS COPYING README
%files devel
%defattr(-,root,root)
%{_libdir}/libfabric*.so
%{_libdir}/*.a
%{_includedir}/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%changelog
* Sun May 3 2015 Open Fabrics Interfaces Working Group <ofiwg@lists.openfabrics.org> 1.0.0
- Release 1.0.0

Просмотреть файл

@ -1,65 +0,0 @@
Name: libfabric
Version: @VERSION@
Release: 1%{?dist}
Summary: User-space RDMA Fabric Interfaces
Group: System Environment/Libraries
License: GPLv2 or BSD
Url: http://www.github.com/ofiwg/libfabric
Source: http://www.openfabrics.org/downloads/fabrics/%{name}-%{version}.tar.bz2
Prefix: ${_prefix}
BuildRequires: libnl-devel
BuildRequires: librdmacm-devel
BuildRequires: libibverbs-devel
BuildRequires: infinipath-psm-devel
%description
libfabric provides a user-space API to access high-performance fabric
services, such as RDMA.
%package devel
Summary: Development files for the libfabric library
Group: System Environment/Libraries
Requires: libfabric = %{version}
%description devel
Development files for the libfabric library.
%prep
%setup -q -n %{name}-%{version}
%build
# defaults: with-dlopen and without-valgrind can be over-rode:
%configure %{?_without_dlopen} %{?_with_valgrind} \
--enable-sockets --enable-verbs --enable-usnic --enable-psm
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%makeinstall installdirs
# remove unpackaged files from the buildroot
rm -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%dir %{_libdir}/libfabric/
%doc AUTHORS COPYING README
%files devel
%defattr(-,root,root)
%{_libdir}/libfabric*.so
%{_libdir}/*.a
%{_includedir}/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%changelog
* Sun May 3 2015 Open Fabrics Interfaces Working Group <ofiwg@lists.openfabrics.org> 1.0.0
- Release 1.0.0

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cm.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_endpoint.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1,414 +0,0 @@
.TH fi_av 3 "2015\-04\-23" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_av - Address vector operations
.PP
fi_av_open / fi_close : Open or close an address vector
.PP
fi_av_bind : Associate an address vector with an event queue.
.PP
fi_av_insert / fi_av_insertsvc / fi_av_remove : Insert/remove an address
into/from the address vector.
.PP
fi_av_lookup : Retrieve an address stored in the address vector.
.PP
fi_av_straddr : Convert an address into a printable string.
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_domain.h>
int\ fi_av_open(struct\ fid_domain\ *domain,\ struct\ fi_av_attr\ *attr,
\ \ \ \ struct\ fid_av\ **av,\ void\ *context);
int\ fi_close(struct\ fid\ *av);
int\ fi_av_bind(struct\ fid_av\ *av,\ struct\ fid\ *eq,\ uint64_t\ flags);
int\ fi_av_insert(struct\ fid_av\ *av,\ void\ *addr,\ size_t\ count,
\ \ \ \ fi_addr_t\ *fi_addr,\ uint64_t\ flags,\ void\ *context);
int\ fi_av_insertsvc(struct\ fid_av\ *av,\ const\ char\ *node,
\ \ \ \ const\ char\ *service,\ fi_addr_t\ *fi_addr,\ uint64_t\ flags,
\ \ \ \ void\ *context);
int\ fi_av_insertsym(struct\ fid_av\ *av,\ const\ char\ *node,
\ \ \ \ size_t\ nodecnt,\ const\ char\ *service,\ size_t\ svccnt,
\ \ \ \ fi_addr_t\ *fi_addr,\ uint64_t\ flags,\ void\ *context);
int\ fi_av_remove(struct\ fid_av\ *av,\ fi_addr_t\ *fi_addr,\ size_t\ count,
\ \ \ \ uint64_t\ flags);
int\ fi_av_lookup(struct\ fid_av\ *av,\ fi_addr_t\ fi_addr,
\ \ \ \ void\ *addr,\ size_t\ *addrlen);
fi_addr_t\ fi_rx_addr(fi_addr_t\ fi_addr,\ int\ rx_index,
\ \ \ \ \ \ int\ rx_ctx_bits);
const\ char\ *\ fi_av_straddr(struct\ fid_av\ *av,\ const\ void\ *addr,
\ \ \ \ \ \ void\ *buf,\ size_t\ *len);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]domain\f[] : Resource domain
.PP
\f[I]av\f[] : Address vector
.PP
\f[I]eq\f[] : Event queue
.PP
\f[I]attr\f[] : Address vector attributes
.PP
\f[I]context\f[] : User specified context associated with the address
vector or insert operation.
.PP
\f[I]addr\f[] : Buffer containing one or more addresses to insert into
address vector.
.PP
\f[I]addrlen\f[] : On input, specifies size of addr buffer.
On output, stores number of bytes written to addr buffer.
.PP
\f[I]fi_addr\f[] : For insert, a reference to an array where returned
fabric addresses will be written.
For remove, one or more fabric addresses to remove.
.PP
\f[I]count\f[] : Number of addresses to insert/remove from an AV.
.PP
\f[I]flags\f[] : Additional flags to apply to the operation.
.SH DESCRIPTION
.PP
Address vectors are used to map higher level addresses, which may be
more natural for an application to use, into fabric specific addresses.
The mapping of addresses is fabric and provider specific, but may
involve lengthy address resolution and fabric management protocols.
AV operations are synchronous by default, but may be set to operate
asynchronously by specifying the FI_EVENT flag to \f[C]fi_av_open\f[].
When requesting asynchronous operation, the application must first bind
an event queue to the AV before inserting addresses.
.SS fi_av_open
.PP
fi_av_open allocates or opens an address vector.
The properties and behavior of the address vector are defined by
\f[C]struct\ fi_av_attr\f[].
.IP
.nf
\f[C]
struct\ fi_av_attr\ {
\ \ \ \ enum\ fi_av_type\ \ type;\ \ \ \ \ \ \ \ /*\ type\ of\ AV\ */
\ \ \ \ int\ \ \ \ \ \ \ \ \ \ \ \ \ \ rx_ctx_bits;\ /*\ address\ bits\ to\ identify\ rx\ ctx\ */
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ count;\ \ \ \ \ \ \ /*\ #\ entries\ for\ AV\ */
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ ep_per_node;\ /*\ #\ endpoints\ per\ fabric\ address\ */
\ \ \ \ const\ char\ \ \ \ \ \ \ *name;\ \ \ \ \ \ \ /*\ system\ name\ of\ AV\ */
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ *map_addr;\ \ \ /*\ base\ mmap\ address\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ flags;\ \ \ \ \ \ \ /*\ operation\ flags\ */
};
\f[]
.fi
.PP
\f[I]type\f[] : An AV type corresponds to a conceptual implementation of
an address vector.
The type specifies how an application views data stored in the AV,
including how it may be accessed.
Valid values are:
.IP \[bu] 2
\f[I]FI_AV_MAP\f[] : Addresses which are inserted into an AV are mapped
to a native fabric address for use by the application.
The use of FI_AV_MAP requires that an application store the returned
fi_addr_t value that is associated with each inserted address.
The advantage of using FI_AV_MAP is that the returned fi_addr_t value
may contain encoded address data, which is immediately available when
processing data transfer requests.
This can eliminate or reduce the number of memory lookups needed when
initiating a transfer.
The disadvantage of FI_AV_MAP is the increase in memory usage needed to
store the returned addresses.
Addresses are stored in the AV using a provider specific mechanism,
including, but not limited to a tree, hash table, or maintained on the
heap.
.IP \[bu] 2
\f[I]FI_AV_TABLE\f[] : Addresses which are inserted into an AV of type
FI_AV_TABLE are accessible using a simple index.
Conceptually, the AV may be treated as an array of addresses, though the
provider may implement the AV using a variety of mechanisms.
When FI_AV_TABLE is used, the returned fi_addr_t is an index, with the
index for an inserted address the same as its insertion order into the
table.
The index of the first address inserted into an FI_AV_TABLE will be 0,
and successive insertions will be given sequential indices.
Sequential indices will be assigned across insertion calls on the same
AV.
.PP
\f[I]Receive Context Bits (rx_ctx_bits)\f[] : The receive context bits
field is only for use with scalable endpoints.
It indicates the number of bits reserved in a returned fi_addr_t, which
will be used to identify a specific target receive context.
See fi_rx_addr() and fi_endpoint(3) for additional details on receive
contexts.
The requested number of bits should be selected such that 2 ^
rx_ctx_bits >= rx_ctx_cnt for the endpoint.
.PP
\f[I]count\f[] : Indicates the expected number of addresses that will be
inserted into the AV.
The provider uses this to optimize resource allocations.
.PP
\f[I]ep_per_node\f[] : This field indicates the number of endpoints that
will be associated with a specific fabric, or network, address.
If the number of endpoints per node is unknown, this value should be set
to 0.
The provider uses this value to optimize resource allocations.
For example, distributed, parallel applications may set this to the
number of processes allocated per node, times the number of endpoints
each process will open.
.PP
\f[I]name\f[] : An optional system name associated with the address
vector to create or open.
Address vectors may be shared across multiple processes which access the
same named domain on the same node.
The name field allows the underlying provider to identify a shared AV.
.PP
If the name field is non-NULL and the AV is not opened for read-only
access, a named AV will be created, if it does not already exist.
.PP
\f[I]map_addr\f[] : The map_addr determines the base fi_addr_t address
that a provider should use when sharing an AV of type FI_AV_MAP between
processes.
Processes that provide the same value for map_addr to a shared AV may
use the same fi_addr_t values returned from an fi_av_insert call.
.PP
The map_addr may be used by the provider to mmap memory allocated for a
shared AV between processes; however, the provider is not required to
use the map_addr in this fashion.
The only requirement is that an fi_addr_t returned as part of an
fi_av_insert call on one process is usable on another process which
opens an AV of the same name at the same map_addr value.
The relationship between the map_addr and any returned fi_addr_t is not
defined.
.PP
If name is non-NULL and map_addr is 0, then the map_addr used by the
provider will be returned through the attribute structure.
The map_addr field is ignored if name is NULL.
.PP
\f[I]flags\f[] : The following flags may be used when opening an AV.
.IP \[bu] 2
\f[I]FI_EVENT\f[] : When the flag FI_EVENT is specified, all insert
operations on this AV will occur asynchronously.
There will be one EQ error entry generated for each failed address
insertion, followed by one non-error event indicating that the insertion
operation has completed.
There will always be one non-error completion event for each insert
operation, even if all addresses fail.
The context field in all completions will be the context specified to
the insert call, and the data field in the final completion entry will
report the number of addresses successfully inserted.
If an error occurs during the asynchronous insertion, an error
completion entry is returned (see \f[C]fi_av\f[](3) for a discussion of
the fi_eq_err_entry error completion struct).
The context field of the error completion will be the context that was
specified in the insert call; the data field will contain the index of
the failed address.
There will be one error completion returned for each address that fails
to insert into the AV.
.PP
: \ : If an AV is opened with FI_EVENT, any insertions attempted before
an EQ is bound to the AV will fail with -FI_ENOEQ.
: \ : Error completions for failed insertions will contain the index of
the failed address in the index field of the error completion entry.
: \ : Note that the order of delivery of insert completions may not
match the order in which the calls to fi_av_insert were made.
The only guarantee is that all error completions for a given call to
fi_av_insert will precede the single associated non-error completion.
.IP \[bu] 2
\f[I]FI_READ\f[] : Opens an AV for read-only access.
An AV opened for read-only access must be named (name attribute
specified), and the AV must exist.
.IP \[bu] 2
\f[I]FI_SYMMETRIC\f[] : Indicates that each node will be associated with
the same number of endpoints, the same transport addresses will be
allocated on each node, and the transport addresses will be sequential.
This feature targets distributed applications on large fabrics and
allows for highly-optimized storage of remote endpoint addressing.
.SS fi_close
.PP
The fi_close call is used to release all resources associated with an
address vector.
Note that any events queued on an event queue referencing the AV are
left untouched.
It is recommended that callers retrieve all events associated with the
AV before closing it.
.PP
When closing the address vector, there must be no opened endpoints
associated with the AV.
If resources are still associated with the AV when attempting to close,
the call will return -FI_EBUSY.
.SS fi_av_bind
.PP
Associates an event queue with the AV.
If an AV has been opened with \f[C]FI_EVENT\f[], then an event queue
must be bound to the AV before any insertion calls are attempted.
Any calls to insert addresses before an event queue has been bound will
fail with \f[C]-FI_ENOEQ\f[].
.SS fi_av_insert
.PP
The fi_av_insert call inserts zero or more addresses into an AV.
The number of addresses is specified through the count parameter.
The addr parameter references an array of addresses to insert into the
AV.
Addresses inserted into an address vector must be in the same format as
specified in struct fi_info:addr_format for the corresponding domain.
.PP
For AV\[aq]s of type FI_AV_MAP, once inserted addresses have been
mapped, the mapped values are written into the buffer referenced by
fi_addr.
The fi_addr buffer must remain valid until the AV insertion has
completed and an event has been generated to an associated event queue.
The value of the returned fi_addr should be considered opaque by the
application for AVs of type FI_AV_MAP.
The returned value may point to an internal structure or a provider
specific encoding of low-level addressing data, for example.
In the latter case, use of FI_AV_MAP may be able to avoid memory
references during data transfer operations.
.PP
For AV\[aq]s of type FI_AV_TABLE, addresses are placed into the table in
order.
An address is inserted at the lowest index that corresponds to an unused
table location, with indices starting at 0.
That is, the first address inserted may be referenced at index 0, the
second at index 1, and so forth.
When addresses are inserted into an AV table, the assigned fi_addr
values will be simple indices corresponding to the entry into the table
where the address was inserted.
Index values accumulate across successive insert calls in the order the
calls are made, not necessarily in the order the insertions complete.
.PP
Because insertions occur at a pre-determined index, the fi_addr
parameter may be NULL.
If fi_addr is non-NULL, it must reference an array of fi_addr_t, and the
buffer must remain valid until the insertion operation completes.
Note that if fi_addr is NULL and synchronous operation is requested,
individual insertion failures cannot be reported and the application
must use other calls, such as \f[C]fi_av_lookup\f[] to learn which
specific addresses failed to insert.
.PP
\f[I]flags\f[] : The following flag may be passed to fi_av_insert
.IP \[bu] 2
\f[I]FI_MORE\f[] : In order to allow optimized address insertion, the
application may specify the FI_MORE flag to the insert call to give a
hint to the provider that more insertion requests will follow, allowing
the provider to aggregate insertion requests if desired.
Providers are free to ignore FI_MORE.
.SS fi_av_insertsvc
.PP
The fi_av_insertsvc call behaves similar to fi_av_insert, but allows the
application to specify the node and service names, similar to the
fi_getinfo inputs, rather than an encoded address.
The node and service parameters are defined the same as fi_getinfo(3).
Node should be a string that corresponds to a hostname or network
address.
The service string corresponds to a textual representation of a
transport address.
.SS fi_av_insertsym
.PP
fi_av_insertsym performs a symmetric insert that inserts a sequential
range of nodes and/or service addresses into an AV.
The svccnt parameter indicates the number of transport (endpoint)
addresses to insert into the AV for each node address, with the service
parameter specifying the starting transport address.
Inserted transport addresses will be of the range {service, service +
svccnt - 1}, inclusive.
All service addresses for a node will be inserted before the next node
is inserted.
.PP
The nodecnt parameter indicates the number of node (network) addresses
to insert into the AV, with the node parameter specifying the starting
node address.
Inserted node addresses will be of the range {node, node + nodecnt - 1},
inclusive.
If node is a non-numeric string, such as a hostname, it must contain a
numeric suffix if nodecnt > 1.
.PP
As an example, if node = "10.1.1.1", nodecnt = 2, service = "5000", and
svccnt = 2, the following addresses will be inserted into the AV in the
order shown: 10.1.1.1:5000, 10.1.1.1:5001, 10.1.1.2:5000, 10.1.1.2:5001.
If node were replaced by the hostname "host10", the addresses would be:
host10:5000, host10:5001, host11:5000, host11:5001.
.PP
The total number of inserted addresses will be nodecnt x svccnt.
.SS fi_av_remove
.PP
fi_av_remove removes a set of addresses from an address vector.
All resources associated with the indicated addresses are released, and
no future references to either the mapped address (in the case of
FI_AV_MAP) or index (FI_AV_TABLE) are allowed.
.PP
The use of fi_av_remove is an optimization that applications may use to
free memory allocated with addresses that will no longer be accessed.
Inserted addresses are not required to be removed.
fi_av_close will automatically cleanup any resources associated with
addresses remaining in the AV when it is invoked.
.SS fi_av_lookup
.PP
This call returns the address stored in the address vector that
corresponds to the given fi_addr.
The returned address is the same format as those stored by the AV.
On input, the addrlen parameter should indicate the size of the addr
buffer.
If the actual address is larger than what can fit into the buffer, it
will be truncated.
On output, addrlen is set to the size of the buffer needed to store the
address, which may be larger than the input value.
.SS fi_rx_addr
.PP
This function is used to convert an endpoint address, returned by
fi_av_insert, into an address that specifies a target receive context.
The specified fi_addr parameter must either be a value returned from
fi_av_insert, in the case of FI_AV_MAP, or an index, in the case of
FI_AV_TABLE.
The value for rx_ctx_bits must match that specified in the AV attributes
for the given address.
.PP
Connected endpoints that support multiple receive contexts, but are not
associated with address vectors should specify FI_ADDR_NOTAVAIL for the
fi_addr parameter.
.SS fi_av_straddr
.PP
The fi_av_straddr function converts the provided address into a
printable string.
The specified address must be of the same format as those stored by the
AV, though the address itself is not required to have been inserted.
On input, the len parameter should specify the size of the buffer
referenced by buf.
On output, addrlen is set to the size of the buffer needed to store the
address.
This size may be larger than the input len.
If the provided buffer is too small, the results will be truncated.
fi_av_straddr returns a pointer to buf.
.SH NOTES
.PP
Providers may implement AV\[aq]s using a variety of mechanisms.
Specifically, a provider may begin resolving inserted addresses as soon
as they have been added to an AV, even if asynchronous operation has
been specified.
Similarly, a provider may lazily release resources from removed entries.
.SH RETURN VALUES
.PP
Insertion calls for an AV opened for synchronous operation will return
the number of addresses that were successfully inserted.
In the case of failure, the return value will be less than the number of
addresses that were specified.
.PP
Insertion calls for an AV opened for asynchronous operation (with
FI_EVENT flag specified) will return 0 if the operation was successfully
initiated.
In the case of failure, a negative fabric errno will be returned.
.PP
All other calls return 0 on success, or a negative value corresponding
to fabric errno on error.
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH ERRORS
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_eq\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_av.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_endpoint.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_domain.3

Просмотреть файл

@ -1,211 +0,0 @@
.TH fi_cm 3 "2015\-04\-29" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_cm - Connection management operations
.PP
fi_connect / fi_listen / fi_accept / fi_reject / fi_shutdown : Manage
endpoint connection state.
.PP
fi_setname / fi_getname / fi_getpeer : Set local, or return local or
peer endpoint address.
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_cm.h>
int\ fi_connect(struct\ fid_ep\ *ep,\ const\ void\ *addr,
\ \ \ \ const\ void\ *param,\ size_t\ paramlen);
int\ fi_listen(struct\ fid_pep\ *pep);
int\ fi_accept(struct\ fid_ep\ *ep,\ const\ void\ *param,\ size_t\ paramlen);
int\ fi_reject(struct\ fid_pep\ *pep,\ fid_t\ handle,
\ \ \ \ const\ void\ *param,\ size_t\ paramlen);
int\ fi_shutdown(struct\ fid_ep\ *ep,\ uint64_t\ flags);
int\ fi_setname(fid_t\ fid,\ void\ *addr,\ size_t\ addrlen);
int\ fi_getname(fid_t\ fid,\ void\ *addr,\ size_t\ *addrlen);
int\ fi_getpeer(struct\ fid_ep\ *ep,\ void\ *addr,\ size_t\ *addrlen);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]ep / pep\f[] : Fabric endpoint on which to change connection state.
.PP
\f[I]addr\f[] : Buffer to address.
On a set call, the endpoint will be assigned the specified address.
On a get, the local address will be copied into the buffer, up to the
space provided.
For connect, this parameter indicates the peer address to connect to.
The address must be in the same format as that specified using fi_info:
addr_format when the endpoint was created.
.PP
\f[I]addrlen\f[] : On input, specifies size of addr buffer.
On output, stores number of bytes written to addr buffer.
.PP
\f[I]param\f[] : User-specified data exchanged as part of the connection
exchange.
.PP
\f[I]paramlen\f[] : Size of param buffer.
.PP
\f[I]info\f[] : Fabric information associated with a connection request.
.PP
\f[I]flags\f[] : Additional flags for controlling connection operation.
.PP
\f[I]context\f[] : User context associated with the request.
.SH DESCRIPTION
.PP
Connection management functions are used to connect an
connection-oriented endpoint to a peer endpoint.
.SS fi_listen
.PP
The fi_listen call indicates that the specified endpoint should be
transitioned into a passive connection state, allowing it to accept
incoming connection requests.
Connection requests against a listening endpoint are reported
asynchronously to the user through a bound CM event queue using the
FI_CONNREQ event type.
The number of outstanding connection requests that can be queued at an
endpoint is limited by the listening endpoint\[aq]s backlog parameter.
The backlog is initialized based on administrative configuration values,
but may be adjusted through the fi_control call.
.SS fi_connect
.PP
The fi_connect call initiates a connection request on a
connection-oriented endpoint to the destination address.
.SS fi_accept / fi_reject
.PP
The fi_accept and fi_reject calls are used on the passive (listening)
side of a connection to accept or reject a connection request,
respectively.
To accept a connection, the listening application first waits for a
connection request event (FI_CONNREQ).
After receiving such an event, the application allocates a new endpoint
to accept the connection.
This endpoint must be allocated using an fi_info structure referencing
the handle from this FI_CONNREQ event.
fi_accept is then invoked with the newly allocated endpoint.
If the listening application wishes to reject a connection request, it
calls fi_reject with the listening endpoint and a reference to the
connection request.
.PP
A successfully accepted connection request will result in the active
(connecting) endpoint seeing an FI_CONNECTED event on its associated
event queue.
A rejected or failed connection request will generate an error event.
The error entry will provide additional details describing the reason
for the failed attempt.
.PP
An FI_CONNECTED event will also be generated on the passive side for the
accepting endpoint once the connection has been properly established.
The fid of the FI_CONNECTED event will be that of the endpoint passed to
fi_accept as opposed to the listening passive endpoint.
Outbound data transfers cannot be initiated on a connection-oriented
endpoint until an FI_CONNECTED event has been generated.
However, receive buffers may be associated with an endpoint anytime.
.SS fi_shutdown
.PP
The fi_shutdown call is used to gracefully disconnect an endpoint from
its peer.
The flags parameter is reserved and must be 0.
.PP
Outstanding operations posted to the endpoint when fi_shutdown is called
will be canceled or discarded.
Notification of canceled operations will be reported by the provider to
the corresponding completion queue(s).
Discarded operations will silently be dropped, with no completions
generated.
The choice of canceling, versus discarding operations, is provider
dependent.
However, all canceled completions will be written before fi_shutdown
returns.
.PP
When called, fi_shutdown does not affect completions already written to
a completion queue.
Any queued completions associated with asynchronous operations posted to
the endpoint may still be retrieved from the corresponding completion
queue(s) after an endpoint has been shutdown.
.PP
An FI_SHUTDOWN event will be generated for an endpoint when the remote
peer issues a disconnect using fi_shutdown or abruptly closes the
endpoint.
Note that in the abrupt close case, an FI_SHUTDOWN event will only be
generated if the peer system is reachable and a service or kernel agent
on the peer system is able to notify the local endpoint that the
connection has been aborted.
.SS fi_setname
.PP
The fi_setname call may be used to modify or assign the address of the
local endpoint.
It is conceptually similar to the socket bind operation.
An endpoint may be assigned an address on its creation, through the
fi_info structure.
The fi_setname call allows an endpoint to be created without being
associated with a specific service (i.e.
port number) and/or node (i.e.
network) address, with the addressing assigned dynamically.
The format of the specified addressing data must match that specified
through the fi_info structure when the endpoint was created.
.PP
If no service address is specified and a service address has not yet
been assigned to the endpoint, then the provider will allocate a service
address and assign it to the endpoint.
If a node or service address is specified, then, upon successful
completion of fi_setname, the endpoint will be assigned the given
addressing.
If an address cannot be assigned, or the endpoint address cannot be
modified, an appropriate fabric error number is returned.
.SS fi_getname / fi_getpeer
.PP
The fi_getname and fi_getpeer calls may be used to retrieve the local or
peer endpoint address, respectively.
On input, the addrlen parameter should indicate the size of the addr
buffer.
If the actual address is larger than what can fit into the buffer, it
will be truncated and -FI_ETOOSMALL will be returned.
On output, addrlen is set to the size of the buffer needed to store the
address, which may be larger than the input value.
.PP
fi_getname is not guaranteed to return a valid source address until
after the specified endpoint has been enabled or has had an address
assigned.
An endpoint may be enabled explicitly through fi_enable, or implicitly,
such as through fi_connect or fi_listen.
An address may be assigned using fi_setname.
fi_getpeer is not guaranteed to return a valid peer address until an
endpoint has been completely connected -- an FI_CONNECTED event has been
generated.
.SH FLAGS
.PP
Flag values are reserved and must be 0.
.SH RETURN VALUE
.PP
Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH ERRORS
.SH NOTES
.PP
For connection-oriented endpoints, the buffer referenced by param will
be sent as part of the connection request or response, subject to the
constraints of the underlying connection protocol.
Applications may use fi_getopt with the FI_OPT_CM_DATA_SIZE endpoint
option to determine the size of application data that may be exchanged
as part of a connection request or response.
The fi_connect, fi_accept, and fi_reject calls will silently truncate
any application data which cannot fit into underlying protocol messages.
User data exchanged as part of the connection process is available as
part of the fi_eq_cm_entry structure, for FI_CONNREQ and FI_CONNECTED
events, or as additional err_data to fi_eq_err_entry, in the case of a
rejected connection.
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_eq\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1,216 +0,0 @@
.TH fi_cntr 3 "2015\-01\-29" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_cntr - Completion and event counter operations
.PP
fi_cntr_open / fi_close : Allocate/free a counter
.PP
fi_cntr_read : Read the current value of a counter
.PP
fi_cntr_readerr : Reads the number of operations which have completed in
error.
.PP
fi_cntr_add : Increment a counter by a specified value
.PP
fi_cntr_set : Set a counter to a specified value
.PP
fi_cntr_wait : Wait for a counter to be greater or equal to a threshold
value
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_domain.h>
int\ fi_cntr_open(struct\ fid_domain\ *domain,\ struct\ fi_cntr_attr\ *attr,
\ \ \ \ struct\ fid_cntr\ **cntr,\ void\ *context);
int\ fi_close(struct\ fid\ *cntr);
uint64_t\ fi_cntr_read(struct\ fid_cntr\ *cntr);
uint64_t\ fi_cntr_readerr(struct\ fid_cntr\ *cntr);
int\ fi_cntr_add(struct\ fid_cntr\ *cntr,\ uint64_t\ value);
int\ fi_cntr_set(struct\ fid_cntr\ *cntr,\ uint64_t\ value);
int\ fi_cntr_wait(struct\ fid_cntr\ *cntr,\ uint64_t\ threshold,
\ \ \ \ int\ timeout);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]domain\f[] : Fabric domain
.PP
\f[I]cntr\f[] : Fabric counter
.PP
\f[I]attr\f[] : Counter attributes
.PP
\f[I]context\f[] : User specified context associated with the counter
.PP
\f[I]value\f[] : Value to increment or set counter
.PP
\f[I]threshold\f[] : Value to compare counter against
.PP
\f[I]timeout\f[] : Time in milliseconds to wait.
A negative value indicates infinite timeout.
.SH DESCRIPTION
.PP
Counters record the number of requested operations that have completed.
Counters can provide a light-weight completion mechanism by suppressing
the generation of a full completion event.
They are useful for applications that only need to know the number of
requests that have completed, and not details about each request.
For example, counters may be useful for implementing credit based flow
control or tracking the number of remote processes which have responded
to a request.
.PP
Counters typically only count successful completions.
However, if an operation completes in error, it may increment an
associated error value.
.SS fi_cntr_open
.PP
fi_cntr_open allocates a new fabric counter.
The properties and behavior of the counter are defined by
\f[C]struct\ fi_cntr_attr\f[].
.IP
.nf
\f[C]
struct\ fi_cntr_attr\ {
\ \ \ \ enum\ fi_cntr_events\ \ events;\ \ \ \ /*\ type\ of\ events\ to\ count\ */
\ \ \ \ enum\ fi_wait_obj\ \ \ \ \ wait_obj;\ \ /*\ requested\ wait\ object\ */
\ \ \ \ struct\ fid_wait\ \ \ \ \ *wait_set;\ \ /*\ optional\ wait\ set\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ \ \ flags;\ \ \ \ \ /*\ operation\ flags\ */
};
\f[]
.fi
.PP
\f[I]events\f[] : A counter captures different types of events.
The specific type which is to counted are one of the following:
.IP \[bu] 2
\f[I]FI_CNTR_EVENTS_COMP\f[] : The counter increments for every
successful completion that occurs on an associated bound endpoint.
The type of completions -- sends and/or receives -- which are counted
may be restricted using control flags when binding the counter an the
endpoint.
Counters increment on all successful completions, separately from
whether the operation generates an entry in an event queue.
.PP
\f[I]wait_obj\f[] : Counters may be associated with a specific wait
object.
Wait objects allow applications to block until the wait object is
signaled, indicating that a counter has reached a specific threshold.
Users may use fi_control to retrieve the underlying wait object
associated with a counter, in order to use it in other system calls.
The following values may be used to specify the type of wait object
associated with a counter: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET,
FI_WAIT_FD, and FI_WAIT_MUTEX_COND.
.IP \[bu] 2
\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block
(wait) for events on the counter.
.IP \[bu] 2
\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the
counter using fabric interface calls, such as fi_cntr_readcond.
In this case, the underlying provider may select the most appropriate or
highest performing wait object available, including custom wait
mechanisms.
Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve
the underlying wait object.
.IP \[bu] 2
\f[I]FI_WAIT_SET\f[] : Indicates that the event counter should use a
wait set object to wait for events.
If specified, the wait_set field must reference an existing wait set
object.
.IP \[bu] 2
\f[I]FI_WAIT_FD\f[] : Indicates that the counter should use a file
descriptor as its wait mechanism.
A file descriptor wait object must be usable in select, poll, and epoll
routines.
However, a provider may signal an FD wait object by marking it as
readable, writable, or with an error.
.IP \[bu] 2
\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the counter should use a
pthread mutex and cond variable as a wait object.
.PP
\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a
wait object to which the event counter should attach.
When an event is added to the event counter, the corresponding wait set
will be signaled if all necessary conditions are met.
The use of a wait_set enables an optimized method of waiting for events
across multiple event counters.
This field is ignored if wait_obj is not FI_WAIT_SET.
.PP
\f[I]flags\f[] : Flags are reserved for future use, and must be set to
0.
.SS fi_close
.PP
The fi_close call releases all resources associated with a counter.
When closing the counter, there must be no opened endpoints, transmit
contexts, receive contexts or memory regions associated with the
counter.
If resources are still associated with the counter when attempting to
close, the call will return -FI_EBUSY.
.SS fi_cntr_control
.PP
The fi_cntr_control call is used to access provider or implementation
specific details of the counter.
Access to the counter should be serialized across all calls when
fi_cntr_control is invoked, as it may redirect the implementation of
counter operations.
The following control commands are usable with a counter:
.PP
\f[I]FI_GETOPSFLAG (uint64_t *)\f[] : Returns the current default
operational flags associated with the counter.
.PP
\f[I]FI_SETOPSFLAG (uint64_t *)\f[] : Modifies the current default
operational flags associated with the counter.
.PP
\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve
the low-level wait object associated with the counter.
The format of the wait-object is specified during counter creation,
through the counter attributes.
See fi_eq.3 for addition details using control with FI_GETWAIT.
.SS fi_cntr_read
.PP
The fi_cntr_read call returns the current value of the counter.
.SS fi_cntr_readerr
.PP
The read error call returns the number of operations that completed in
error and were unable to update the counter.
.SS fi_cntr_add
.PP
This adds the user-specified value to the counter.
.SS fi_cntr_set
.PP
This sets the counter to the specified value.
.SS fi_cntr_wait
.PP
This call may be used to wait until the counter reaches the specified
threshold, or until an error or timeout occurs.
Upon successful return from this call, the counter will be greater than
or equal to the input threshold value.
.PP
If an operation associated with the counter encounters an error, it will
increment the error value associated with the counter.
Any change in a counter\[aq]s error value will unblock any thread inside
fi_cntr_wait.
.PP
If the call returns due to timeout, -FI_ETIMEDOUT will be returned.
The error value associated with the counter remains unchanged.
.SH RETURN VALUES
.PP
Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
.PP
fi_cntr_read / fi_cntr_readerr : Returns the current value of the
counter.
.PP
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH NOTES
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_eq\f[](3), \f[C]fi_poll\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cntr.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cntr.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cntr.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cntr.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cntr.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cm.3

Просмотреть файл

@ -1,36 +0,0 @@
.TH fi_control 3 "2015\-02\-16" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_control - Perform an operation on a fabric resource.
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fabric.h>
int\ fi_control(struct\ fid\ *fid,\ int\ command,\ void\ *arg);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]fid\f[] : Fabric resource
.PP
\f[I]command\f[] : Operation to perform
.PP
\f[I]arg\f[] : Optional argument to the command
.SH DESCRIPTION
.PP
The fi_control operation is used to perform one or more operations on a
fabric resource.
Conceptually, fi_control is similar to the POSIX fcntl routine.
The exact behavior of using fi_control depends on the fabric resource
being operated on, the specified command, and any provided arguments for
the command.
For specific details, see the fabric resource specific help pages noted
below.
.SH SEE ALSO
.PP
\f[C]fi_endpoint\f[](3), \f[C]fi_cm\f[](3), \f[C]fi_cntr\f[](3),
\f[C]fi_cq\f[](3), \f[C]fi_eq\f[](3),
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1,450 +0,0 @@
.TH fi_cq 3 "2015\-04\-03" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_cq - Completion queue operations
.PP
fi_cq_open / fi_close : Open/close a completion queue
.PP
fi_control : Control CQ operation or attributes.
.PP
fi_cq_read / fi_cq_readfrom / fi_cq_readerr : Read a completion from a
completion queue
.PP
fi_cq_sread / fi_cq_sreadfrom : A synchronous (blocking) read that waits
until a specified condition has been met before reading a completion
from a completion queue.
.PP
fi_cq_strerror : Converts provider specific error information into a
printable string
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_domain.h>
int\ fi_cq_open(struct\ fid_domain\ *domain,\ struct\ fi_cq_attr\ *attr,
\ \ \ \ struct\ fid_cq\ **cq,\ void\ *context);
int\ fi_close(struct\ fid\ *cq);
int\ fi_control(struct\ fid\ *cq,\ int\ command,\ void\ *arg);
ssize_t\ fi_cq_read(struct\ fid_cq\ *cq,\ void\ *buf,\ size_t\ count);
ssize_t\ fi_cq_readfrom(struct\ fid_cq\ *cq,\ void\ *buf,\ size_t\ count,
\ \ \ \ fi_addr_t\ *src_addr);
ssize_t\ fi_cq_readerr(struct\ fid_cq\ *cq,\ struct\ fi_cq_err_entry\ *buf,
\ \ \ \ uint64_t\ flags);
ssize_t\ fi_cq_sread(struct\ fid_cq\ *cq,\ void\ *buf,\ size_t\ count,
\ \ \ \ const\ void\ *cond,\ int\ timeout);
ssize_t\ fi_cq_sreadfrom(struct\ fid_cq\ *cq,\ void\ *buf,\ size_t\ count,
\ \ \ \ fi_addr_t\ *src_addr,\ const\ void\ *cond,\ int\ timeout);
int\ fi_cq_signal(struct\ fid_cq\ *cq);
const\ char\ *\ fi_cq_strerror(struct\ fid_cq\ *cq,\ int\ prov_errno,
\ \ \ \ \ \ const\ void\ *err_data,\ char\ *buf,\ size_t\ len);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]domain\f[] : Open resource domain
.PP
\f[I]cq\f[] : Completion queue
.PP
\f[I]attr\f[] : Completion queue attributes
.PP
\f[I]context\f[] : User specified context associated with the completion
queue.
.PP
\f[I]buf\f[] : For read calls, the data buffer to write completions
into.
For write calls, a completion to insert into the completion queue.
For fi_cq_strerror, an optional buffer that receives printable error
information.
.PP
\f[I]count\f[] : Number of CQ entries.
.PP
\f[I]len\f[] : Length of data buffer
.PP
\f[I]src_addr\f[] : Source address of a completed receive operation
.PP
\f[I]flags\f[] : Additional flags to apply to the operation
.PP
\f[I]command\f[] : Command of control operation to perform on CQ.
.PP
\f[I]arg\f[] : Optional control argument
.PP
\f[I]cond\f[] : Condition that must be met before a completion is
generated
.PP
\f[I]timeout\f[] : Time in milliseconds to wait.
A negative value indicates infinite timeout.
.PP
\f[I]prov_errno\f[] : Provider specific error value
.PP
\f[I]err_data\f[] : Provider specific error data related to a completion
.SH DESCRIPTION
.PP
Completion queues are used to report events associated with data
transfers.
They are associated with message sends and receives, RMA, atomic, tagged
messages, and triggered events.
Reported events are usually associated with a fabric endpoint, but may
also refer to memory regions used as the target of an RMA or atomic
operation.
.SS fi_cq_open
.PP
fi_cq_open allocates a new completion queue.
Unlike event queues, completion queues are associated with a resource
domain and may be offloaded entirely in provider hardware.
.PP
The properties and behavior of a completion queue are defined by
\f[C]struct\ fi_cq_attr\f[].
.IP
.nf
\f[C]
struct\ fi_cq_attr\ {
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ size;\ \ \ \ \ \ /*\ #\ entries\ for\ CQ\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ \ \ flags;\ \ \ \ \ /*\ operation\ flags\ */
\ \ \ \ enum\ fi_cq_format\ \ \ \ format;\ \ \ \ /*\ completion\ format\ */
\ \ \ \ enum\ fi_wait_obj\ \ \ \ \ wait_obj;\ \ /*\ requested\ wait\ object\ */
\ \ \ \ int\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ signaling_vector;\ /*\ interrupt\ affinity\ */
\ \ \ \ enum\ fi_cq_wait_cond\ wait_cond;\ /*\ wait\ condition\ format\ */
\ \ \ \ struct\ fid_wait\ \ \ \ \ *wait_set;\ \ /*\ optional\ wait\ set\ */
};
\f[]
.fi
.PP
\f[I]size\f[] : Specifies the minimum size of an event queue.
A value of 0 indicates that the provider may choose a default value.
.PP
\f[I]flags\f[] : Flags that control the configuration of the CQ.
This field must be 0.
.PP
\f[I]format\f[] : Completion queues allow the application to select the
amount of detail that it must store and report.
The format attribute allows the application to select one of several
completion formats, indicating the structure of the data that the
completion queue should return when read.
Supported formats and the structures that correspond to each are listed
below.
.IP \[bu] 2
\f[I]FI_CQ_FORMAT_UNSPEC\f[] : If an unspecified format is requested,
then the CQ will use a provider selected default format.
.IP \[bu] 2
\f[I]FI_CQ_FORMAT_CONTEXT\f[] : Provides only user specified context
that was associated with the completion.
.IP
.nf
\f[C]
struct\ fi_cq_entry\ {
\ \ \ \ void\ \ \ \ \ *op_context;\ /*\ operation\ context\ */
};
\f[]
.fi
.IP \[bu] 2
\f[I]FI_CQ_FORMAT_MSG\f[] : Provides minimal data for processing
completions, with expanded support for reporting information about
received messages.
.IP
.nf
\f[C]
struct\ fi_cq_msg_entry\ {
\ \ \ \ void\ \ \ \ \ *op_context;\ /*\ operation\ context\ */
\ \ \ \ uint64_t\ flags;\ \ \ \ \ \ \ /*\ completion\ flags\ */
\ \ \ \ size_t\ \ \ len;\ \ \ \ \ \ \ \ \ /*\ size\ of\ received\ data\ */
};
\f[]
.fi
.IP \[bu] 2
\f[I]FI_CQ_FORMAT_DATA\f[] : Provides data associated with a completion.
Includes support for received message length, remote EQ data, and
multi-receive buffers.
.IP
.nf
\f[C]
struct\ fi_cq_data_entry\ {
\ \ \ \ void\ \ \ \ \ *op_context;\ /*\ operation\ context\ */
\ \ \ \ uint64_t\ flags;\ \ \ \ \ \ \ /*\ completion\ flags\ */
\ \ \ \ size_t\ \ \ len;\ \ \ \ \ \ \ \ \ /*\ size\ of\ received\ data\ */
\ \ \ \ void\ \ \ \ \ *buf;\ \ \ \ \ \ \ \ /*\ receive\ data\ buffer\ */
\ \ \ \ uint64_t\ data;\ \ \ \ \ \ \ \ /*\ completion\ data\ */
};
\f[]
.fi
.IP \[bu] 2
\f[I]FI_CQ_FORMAT_TAGGED\f[] : Expands completion data to include
support for the tagged message interfaces.
.IP
.nf
\f[C]
struct\ fi_cq_tagged_entry\ {
\ \ \ \ void\ \ \ \ \ *op_context;\ /*\ operation\ context\ */
\ \ \ \ uint64_t\ flags;\ \ \ \ \ \ \ /*\ completion\ flags\ */
\ \ \ \ size_t\ \ \ len;\ \ \ \ \ \ \ \ \ /*\ size\ of\ received\ data\ */
\ \ \ \ void\ \ \ \ \ *buf;\ \ \ \ \ \ \ \ /*\ receive\ data\ buffer\ */
\ \ \ \ uint64_t\ data;\ \ \ \ \ \ \ \ /*\ completion\ data\ */
\ \ \ \ uint64_t\ tag;\ \ \ \ \ \ \ \ \ /*\ received\ tag\ */
};
\f[]
.fi
.PP
\f[I]wait_obj\f[] : CQ\[aq]s may be associated with a specific wait
object.
Wait objects allow applications to block until the wait object is
signaled, indicating that a completion is available to be read.
Users may use fi_control to retrieve the underlying wait object
associated with an CQ, in order to use it in other system calls.
The following values may be used to specify the type of wait object
associated with an CQ: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET,
FI_WAIT_FD, and FI_WAIT_MUTEX_COND.
.IP \[bu] 2
\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block
(wait) for completions on the CQ.
When FI_WAIT_NONE is specified, the application may not call fi_cq_sread
or fi_cq_sreadfrom.
.IP \[bu] 2
\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the
CQ using fabric interface calls, such as fi_cq_readcond or
fi_cq_sreadfrom.
In this case, the underlying provider may select the most appropriate or
highest performing wait object available, including custom wait
mechanisms.
Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve
the underlying wait object.
.IP \[bu] 2
\f[I]FI_WAIT_SET\f[] : Indicates that the completion queue should use a
wait set object to wait for completions.
If specified, the wait_set field must reference an existing wait set
object.
.IP \[bu] 2
\f[I]FI_WAIT_FD\f[] : Indicates that the CQ should use a file descriptor
as its wait mechanism.
A file descriptor wait object must be usable in select, poll, and epoll
routines.
However, a provider may signal an FD wait object by marking it as
readable, writable, or with an error.
.IP \[bu] 2
\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the CQ should use a pthread
mutex and cond variable as a wait object.
.PP
\f[I]signaling_vector\f[] : Indicates which processor core interrupts
associated with the EQ should target.
.PP
\f[I]wait_cond\f[] : By default, when a completion is inserted into an
CQ that supports blocking reads (fi_cq_sread/fi_cq_sreadfrom), the
corresponding wait object is signaled.
Users may specify a condition that must first be met before the wait is
satisfied.
This field indicates how the provider should interpret the cond field,
which describes the condition needed to signal the wait object.
.PP
A wait condition should be treated as an optimization.
Providers are not required to meet the requirements of the condition
before signaling the wait object.
Applications should not rely on the condition necessarily being true
when a blocking read call returns.
.PP
If wait_cond is set to FI_CQ_COND_NONE, then no additional conditions
are applied to the signaling of the CQ wait object, and the insertion of
any new entry will trigger the wait condition.
If wait_cond is set to FI_CQ_COND_THRESHOLD, then the cond field is
interpreted as a size_t threshold value.
The threshold indicates the number of entries that are to be queued
before at the CQ before the wait is satisfied.
.PP
This field is ignored if wait_obj is set to FI_WAIT_NONE.
.PP
\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a
wait object to which the completion queue should attach.
When an event is inserted into the completion queue, the corresponding
wait set will be signaled if all necessary conditions are met.
The use of a wait_set enables an optimized method of waiting for events
across multiple event and completion queues.
This field is ignored if wait_obj is not FI_WAIT_SET.
.SS fi_close
.PP
The fi_close call releases all resources associated with a completion
queue.
Any completions which remain on the CQ when it is closed are lost.
.PP
When closing the CQ, there must be no opened endpoints, transmit
contexts, or receive contexts associated with the CQ.
If resources are still associated with the CQ when attempting to close,
the call will return -FI_EBUSY.
.SS fi_control
.PP
The fi_control call is used to access provider or implementation
specific details of the completion queue.
Access to the CQ should be serialized across all calls when fi_control
is invoked, as it may redirect the implementation of CQ operations.
The following control commands are usable with an CQ.
.PP
\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve
the low-level wait object associated with the CQ.
The format of the wait-object is specified during CQ creation, through
the CQ attributes.
The fi_control arg parameter should be an address where a pointer to the
returned wait object will be written.
See fi_eq.3 for addition details using fi_control with FI_GETWAIT.
.SS fi_cq_read / fi_cq_readfrom
.PP
The fi_cq_read and fi_cq_readfrom operations perform a non-blocking read
of completion data from the CQ.
The format of the completion event is determined using the fi_cq_format
option that was specified when the CQ was opened.
Multiple completions may be retrieved from a CQ in a single call.
The maximum number of entries to return is limited to the specified
count parameter, with the number of entries successfully read from the
CQ returned by the call.
.PP
The fi_cq_readfrom call allows the CQ to return source address
information to the user for any received data.
Source address data is only available for those endpoints configured
with FI_SOURCE capability.
If fi_cq_readfrom is called on an endpoint for which source addressing
data is not available, the source address will be set to
FI_ADDR_NOTAVAIL.
The number of input src_addr entries must the the same as the count
parameter.
.PP
CQs are optimized to report operations which have completed
successfully.
Operations which fail are reported \[aq]out of band\[aq].
Such operations are retrieved using the fi_cq_readerr function.
When an operation that completes with an unexpected error is inserted
into an CQ, it is placed into a temporary error queue.
Attempting to read from an CQ while an item is in the error queue
results in an FI_EAVAIL failure.
Applications may use this return code to determine when to call
fi_cq_readerr.
.SS fi_cq_sread / fi_cq_sreadfrom
.PP
The fi_cq_sread and fi_cq_sreadfrom calls are the blocking equivalent
operations to fi_cq_read and fi_cq_readfrom.
Their behavior is similar to the non-blocking calls, with the exception
that the calls will not return until either a completion has been read
from the CQ or an error or timeout occurs.
.SS fi_cq_readerr
.PP
The read error function, fi_cq_readerr, retrieves information regarding
any asynchronous operation which has completed with an unexpected error.
fi_cq_readerr is a non-blocking call, returning immediately whether an
error completion was found or not.
.PP
Error information is reported to the user through
\f[C]struct\ fi_cq_err_entry\f[].
The format of this structure is defined below.
.IP
.nf
\f[C]
struct\ fi_cq_err_entry\ {
\ \ \ \ void\ \ \ \ \ *op_context;\ /*\ operation\ context\ */
\ \ \ \ uint64_t\ flags;\ \ \ \ \ \ \ /*\ completion\ flags\ */
\ \ \ \ size_t\ \ \ len;\ \ \ \ \ \ \ \ \ /*\ size\ of\ received\ data\ */
\ \ \ \ void\ \ \ \ \ *buf;\ \ \ \ \ \ \ \ /*\ receive\ data\ buffer\ */
\ \ \ \ uint64_t\ data;\ \ \ \ \ \ \ \ /*\ completion\ data\ */
\ \ \ \ uint64_t\ tag;\ \ \ \ \ \ \ \ \ /*\ message\ tag\ */
\ \ \ \ size_t\ \ \ olen;\ \ \ \ \ \ \ \ /*\ overflow\ length\ */
\ \ \ \ int\ \ \ \ \ \ err;\ \ \ \ \ \ \ \ \ /*\ positive\ error\ code\ */
\ \ \ \ int\ \ \ \ \ \ prov_errno;\ \ /*\ provider\ error\ code\ */
\ \ \ \ void\ \ \ \ *err_data;\ \ \ \ /*\ \ error\ data\ */
};
\f[]
.fi
.PP
The general reason for the error is provided through the err field.
Provider specific error information may also be available through the
prov_errno and err_data fields.
The err_data field, if set, will reference an internal buffer owned by
the provider.
The contents of the buffer will remain valid until a subsequent read
call against the CQ.
Users may call fi_cq_strerror to convert provider specific error
information into a printable string for debugging purposes.
.SS fi_cq_signal
.PP
The fi_cq_signal call will unblock any thread waiting in fi_cq_sread or
fi_cq_sreadfrom.
This may be used to wake-up a thread that is blocked waiting to read a
completion operation.
The fi_cq_signal operation is only available if the CQ was configured
with a wait object.
.SH COMPLETION FLAGS
.PP
Completion flags provide additional details regarding the completed
operation.
The following completion flags are defined.
.PP
\f[I]FI_SEND\f[] : Indicates that the completion was for a send
operation.
This flag may be combined with an FI_MSG or FI_TAGGED flag.
.PP
\f[I]FI_RECV\f[] : Indicates that the completion was for a receive
operation.
This flag may be combined with an FI_MSG or FI_TAGGED flag.
.PP
\f[I]FI_RMA\f[] : Indicates that an RMA operation completed.
This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or
FI_REMOTE_WRITE flag.
.PP
\f[I]FI_ATOMIC\f[] : Indicates that an atomic operation completed.
This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or
FI_REMOTE_WRITE flag.
.PP
\f[I]FI_MSG\f[] : Indicates that a message-based operation completed.
This flag may be combined with an FI_SEND or FI_RECV flag.
.PP
\f[I]FI_TAGGED\f[] : Indicates that a tagged message operation
completed.
This flag may be combined with an FI_SEND or FI_RECV flag.
.PP
\f[I]FI_READ\f[] : Indicates that a locally initiated RMA or atomic read
operation has completed.
This flag may be combined with an FI_RMA or FI_ATOMIC flag.
.PP
\f[I]FI_WRITE\f[] : Indicates that a locally initiated RMA or atomic
write operation has completed.
This flag may be combined with an FI_RMA or FI_ATOMIC flag.
.PP
\f[I]FI_REMOTE_READ\f[] : Indicates that a remotely initiated RMA or
atomic read operation has completed.
This flag may be combined with an FI_RMA or FI_ATOMIC flag.
.PP
\f[I]FI_REMOTE_WRITE\f[] : Indicates that a remotely initiated RMA or
atomic read operation has completed.
This flag may be combined with an FI_RMA or FI_ATOMIC flag.
.PP
\f[I]FI_REMOTE_CQ_DATA\f[] : This indicates that remote CQ data is
available as part of the completion.
.PP
\f[I]FI_MULTI_RECV\f[] : This flag applies to receive buffers that were
posted with the FI_MULTI_RECV flag set.
This completion flag indicates that the receive buffer referenced by the
completion has been consumed and was released by the provider.
.SH RETURN VALUES
.PP
fi_cq_open / fi_cq_signal : Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
.PP
fi_cq_read / fi_cq_readfrom / fi_cq_readerr fi_cq_sread /
fi_cq_sreadfrom : On success, returns the number of completion events
retrieved from the completion queue.
On error, a negative value corresponding to fabric errno is returned.
If no completions are available to return from the CQ, -FI_EAGAIN will
be returned.
.PP
fi_cq_strerror : Returns a character string interpretation of the
provider specific error returned with a completion.
.PP
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_eq\f[](3), \f[C]fi_cntr\f[](3), \f[C]fi_poll\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cq.3

Просмотреть файл

@ -1,511 +0,0 @@
.TH fi_domain 3 "2015\-04\-28" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_domain - Open a fabric access domain
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fabric.h>
#include\ <rdma/fi_domain.h>
int\ fi_domain(struct\ fid_fabric\ *fabric,\ struct\ fi_info\ *info,
\ \ \ \ struct\ fid_domain\ **domain,\ void\ *context);
int\ fi_close(struct\ fid\ *domain);
int\ fi_domain_bind(struct\ fid_domain\ *domain,\ struct\ fid\ *eq,
\ \ \ \ uint64_t\ flags);
int\ fi_open_ops(struct\ fid\ *domain,\ const\ char\ *name,\ uint64_t\ flags,
\ \ \ \ void\ **ops,\ void\ *context);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]fabric\f[] : Fabric domain
.PP
\f[I]info\f[] : Fabric information, including domain capabilities and
attributes.
.PP
\f[I]domain\f[] : An opened access domain.
.PP
\f[I]context\f[] : User specified context associated with the domain.
This context is returned as part of any asynchronous event associated
with the domain.
.PP
\f[I]eq\f[] : Event queue for asynchronous operations initiated on the
domain.
.PP
\f[I]name\f[] : Name associated with an interface.
.PP
\f[I]ops\f[] : Fabric interface operations.
.SH DESCRIPTION
.PP
An access domain typically refers to a physical or virtual NIC or
hardware port; however, a domain may span across multiple hardware
components for fail-over or data striping purposes.
A domain defines the boundary for associating different resources
together.
Fabric resources belonging to the same domain may share resources.
.SS fi_domain
.PP
Opens a fabric access domain, also referred to as a resource domain.
Fabric domains are identified by a name.
The properties of the opened domain are specified using the info
parameter.
.SS fi_open_ops
.PP
fi_open_ops is used to open provider specific interfaces.
Provider interfaces may be used to access low-level resources and
operations that are specific to the opened resource domain.
The details of domain interfaces are outside the scope of this
documentation.
.SS fi_domain_bind
.PP
Associates an event queue with the domain.
An event queue bound to a domain will be the default EQ associated with
asynchronous control events that occur on the domain or active endpoints
allocated on a domain.
This includes CM events.
Endpoints may direct their control events to alternate EQs by binding
directly with the EQ.
.PP
Binding an event queue to a domain with the FI_REG_MR flag indicates
that the provider should perform all memory registration operations
asynchronously, with the completion reported through the event queue.
If an event queue is not bound to the domain with the FI_REG_MR flag,
then memory registration requests complete synchronously.
.PP
See \f[C]fi_av_bind\f[](3), \f[C]fi_ep_bind\f[](3),
\f[C]fi_mr_bind\f[](3), \f[C]fi_pep_bind\f[](3), and
\f[C]fi_scalable_ep_bind\f[](3) for more information.
.SS fi_close
.PP
The fi_close call is used to release all resources associated with a
domain or interface.
All objects associated with the opened domain must be released prior to
calling fi_close, otherwise the call will return -FI_EBUSY.
.SH DOMAIN ATTRIBUTES
.PP
The \f[C]fi_domain_attr\f[] structure defines the set of attributes
associated with a domain.
.IP
.nf
\f[C]
struct\ fi_domain_attr\ {
\ \ \ \ struct\ fid_domain\ \ \ \ \ *domain;
\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *name;
\ \ \ \ enum\ fi_threading\ \ \ \ \ threading;
\ \ \ \ enum\ fi_progress\ \ \ \ \ \ control_progress;
\ \ \ \ enum\ fi_progress\ \ \ \ \ \ data_progress;
\ \ \ \ enum\ fi_resource_mgmt\ resource_mgmt;
\ \ \ \ enum\ fi_av_type\ \ \ \ \ \ \ av_type;
\ \ \ \ enum\ fi_mr_mode\ \ \ \ \ \ \ mr_mode;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mr_key_size;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cq_data_size;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cq_cnt;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ep_cnt;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tx_ctx_cnt;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rx_ctx_cnt;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ max_ep_tx_ctx;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ max_ep_rx_ctx;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ max_ep_stx_ctx;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ max_ep_srx_ctx;
};
\f[]
.fi
.SS domain
.PP
On input to fi_getinfo, a user may set this to an opened domain instance
to restrict output to the given domain.
On output from fi_getinfo, if no domain was specified, but the user has
an opened instance of the named domain, this will reference the first
opened instance.
If no instance has been opened, this field will be NULL.
.SS Name
.PP
The name of the access domain.
.SS Multi-threading Support (threading)
.PP
The threading model specifies the level of serialization required of an
application when using the libfabric data transfer interfaces.
Control interfaces are always considered thread safe, and may be
accessed by multiple threads.
Applications which can guarantee serialization in their access of
provider allocated resources and interfaces enables a provider to
eliminate lower-level locks.
.PP
\f[I]FI_THREAD_UNSPEC\f[] : This value indicates that no threading model
has been defined.
It may be used on input hints to the fi_getinfo call.
When specified, providers will return a threading model that allows for
the greatest level of parallelism.
.PP
\f[I]FI_THREAD_SAFE\f[] : A thread safe serialization model allows a
multi-threaded application to access any allocated resources through any
interface without restriction.
All providers are required to support FI_THREAD_SAFE.
.PP
\f[I]FI_THREAD_FID\f[] : A fabric descriptor (FID) serialization model
requires applications to serialize access to individual fabric resources
associated with data transfer operations and completions.
Multiple threads must be serialized when accessing the same endpoint,
transmit context, receive context, completion queue, counter, wait set,
or poll set.
Serialization is required only by threads accessing the same object.
.PP
For example, one thread may be initiating a data transfer on an
endpoint, while another thread reads from a completion queue associated
with the endpoint.
.PP
Serialization to endpoint access is only required when accessing the
same endpoint data flow.
Multiple threads may initiate transfers on different transmit contexts
of the same endpoint without serializing, and no serialization is
required between the submission of data transmit requests and data
receive operations.
.PP
In general, FI_THREAD_FID allows the provider to be implemented without
needing internal locking when handling data transfers.
Conceptually, FI_THREAD_FID maps well to providers that implement fabric
services in hardware and provide separate command queues to different
data flows.
.PP
\f[I]FI_THREAD_ENDPOINT\f[] : The endpoint threading model is similar to
FI_THREAD_FID, but with the added restriction that serialization is
required when accessing the same endpoint, even if multiple transmit and
receive contexts are used.
Conceptually, FI_THREAD_ENDPOINT maps well to providers that implement
fabric services in hardware but use a single command queue to access
different data flows.
.PP
\f[I]FI_THREAD_COMPLETION\f[] : The completion threading model is
intended for providers that make use of manual progress.
Applications must serialize access to all objects that are associated
through the use of having a shared completion structure.
This includes endpoint, completion queue, counter, wait set, and poll
set objects.
.PP
For example, threads must serialize access to an endpoint and its bound
completion queue(s) and/or counters.
Access to endpoints that share the same completion queue must also be
serialized.
.PP
The use of FI_THREAD_COMPLETION can increase parallelism over
FI_THREAD_SAFE, but requires the use of isolated resources.
.PP
\f[I]FI_THREAD_DOMAIN\f[] : A domain serialization model requires
applications to serialize access to all objects belonging to a domain.
.SS Progress Models (control_progress / data_progress)
.PP
Progress is the ability of the underlying implementation to complete
processing of an asynchronous request.
In many cases, the processing of an asynchronous request requires the
use of the host processor.
For example, a received message may need to be matched with the correct
buffer, or a timed out request may need to be retransmitted.
For performance reasons, it may be undesirable for the provider to
allocate a thread for this purpose, which will compete with the
application threads.
.PP
Control progress indicates the method that the provider uses to make
progress on asynchronous control operations.
Control operations are functions which do not directly involve the
transfer of application data between endpoints.
They include address vector, memory registration, and connection
management routines.
.PP
Data progress indicates the method that the provider uses to make
progress on data transfer operations.
This includes message queue, RMA, tagged messaging, and atomic
operations, along with their completion processing.
.PP
To balance between performance and ease of use, two progress models are
defined.
.PP
\f[I]FI_PROGRESS_UNSPEC\f[] : This value indicates that no progress
model has been defined.
It may be used on input hints to the fi_getinfo call.
.PP
\f[I]FI_PROGRESS_AUTO\f[] : This progress model indicates that the
provider will make forward progress on an asynchronous operation without
further intervention by the application.
When FI_PROGRESS_AUTO is provided as output to fi_getinfo in the absence
of any progress hints, it often indicates that the desired functionality
is implemented by the provider hardware or is a standard service of the
operating system.
.PP
All providers are required to support FI_PROGRESS_AUTO.
However, if a provider does not natively support automatic progress,
forcing the use of FI_PROGRESS_AUTO may result in threads being
allocated below the fabric interfaces.
.PP
\f[I]FI_PROGRESS_MANUAL\f[] : This progress model indicates that the
provider requires the use of an application thread to complete an
asynchronous request.
When manual progress is set, the provider will attempt to advance an
asynchronous operation forward when the application attempts to wait on
or read an event queue, completion queue, or counter where the completed
operation will be reported.
Progress also occurs when the application processes a poll or wait set
that has been associated with the event or completion queue.
.PP
Only wait operations defined by the fabric interface will result in an
operation progressing.
Operating system or external wait functions, such as select, poll, or
pthread routines, cannot.
.SS Resource Management (resource_mgmt)
.PP
Resource management (RM) is provider and protocol support to protect
against overrunning local and remote resources.
This includes local and remote transmit contexts, receive contexts,
completion queues, and source and target data buffers.
.PP
When enabled, applications are given some level of protection against
overrunning provider queues and local and remote data buffers.
Such support may be built directly into the hardware and/or network
protocol, but may also require that checks be enabled in the provider
software.
By disabling resource management, an application assumes all
responsibility for preventing queue and buffer overruns, but doing so
may allow a provider to eliminate internal synchronization calls, such
as atomic variables or locks.
.PP
It should be noted that even if resource management is disabled, the
provider implementation and protocol may still provide some level of
protection against overruns.
However, such protection is not guaranteed.
The following values for resource management are defined.
.PP
\f[I]FI_RM_UNSPEC\f[] : This value indicates that no resource management
model has been defined.
It may be used on input hints to the fi_getinfo call.
.PP
\f[I]FI_RM_DISABLED\f[] : The provider is free to select an
implementation and protocol that does not protect against resource
overruns.
The application is responsible for resource protection.
.PP
\f[I]FI_RM_ENABLED\f[] : Resource management is enabled for this
provider domain.
.PP
The behavior of the various resource management options depends on
whether the endpoint is reliable or unreliable, as well as provider and
protocol specific implementation details, as shown in the following
tables.
.PP
| Resource | Unrel EP-RM Disabled| Unrel EP-RM Enabled | Rel EP-RM
Disabled | Rel EP-RM Enabled |
|:--------:|:-------------------:|:-------------------:|:------------------:|:-----------------:|
| Tx | error | EAGAIN | error | EAGAIN | | Rx | error | EAGAIN | error |
EAGAIN | | Tx CQ | error | EAGAIN | error | EAGAIN | | Rx CQ | error |
EAGAIN or drop | error | EAGAIN or retry | | Unmatched Recv | buffered
or drop | buffered or drop | buffered or error | buffered or retry | |
Recv Overrun | truncate or drop | truncate or drop | truncate or error |
truncate or error | | Unmatched RMA | not applicable | not applicable |
error | error | | RMA Overrun | not applicable | not applicable | error
| error |
.PP
The resource column indicates the resource being accessed by a data
transfer operation.
Tx refers to the transmit context when a data transfer operation posted.
Rx refers to the receive context when receive data buffers are posted.
When RM is enabled, the provider will ensure that space is available to
accept the operation.
If space is not available, the operation will fail with -FI_EAGAIN.
If resource management is disabled, the application is responsible for
ensuring that there is space available before attempting to queue an
operation.
.PP
Tx CQ and Rx CQ refer to the completion queues associated with the
transmit and receive contexts, respectively.
When RM is disabled, applications must take care to ensure that
completion queues do not get overrun.
This can be accomplished by sizing the CQs appropriately or by deferring
the posting of a data transfer operation unless CQ space is available to
store its completion.
When RM is enabled, providers may use different mechanisms to prevent CQ
overruns.
This includes failing (returning -FI_EAGAIN) the posting of operations
that could result in CQ overruns, dropping received messages, or forcing
requests to be retried.
.PP
Unmatched receives and receive overruns deal with the processing of
messages that consume a receive buffers.
Unmatched receives references incoming messages that are received by an
endpoint, but do not have an application data buffer to consume.
No buffers may be available at the receive side, or buffers may
available, but restricted from accepting the received message (such as
being associated with different tags).
Unmatched receives may be handled by protocol flow control, resulting in
the message being retried.
For unreliable endpoints, unmatched messages are usually dropped, unless
the provider can internally buffer the data.
An error will usually occur on a reliable endpoint if received data
cannot be placed if RM is disabled, or the data cannot be received with
RM enabled after retries have been exhausted.
.PP
In some cases, buffering on the receive side may be available, but
insufficient space may have been provided to receive the full message
that was sent.
This is considered an error, however, rather than failing the operation,
a provider may instead truncate the message and report the truncation to
the app.
.PP
Unmatched RMA and RMA overruns deal with the processing of RMA and
atomic operations that access registered memory buffers directly.
RMA operations are not defined for unreliable endpoints.
For reliable endpoints, unmatched RMA and RMA overruns are both treated
as errors.
.PP
When a resource management error occurs on an endpoint, the endpoint is
transitioned into a disabled state.
Any operations which have not already completed will fail and be
discarded.
For unconnected endpoints, the endpoint must be re-enabled before it
will accept new data transfer operations.
For connected endpoints, the connection is torn down and must be
re-established.
.SS AV Type (av_type)
.PP
Specifies the type of address vectors that are usable with this domain.
For additional details on AV type, see \f[C]fi_av\f[](3).
The following values may be specified.
.PP
\f[I]FI_AV_UNSPEC\f[] : Any address vector format is requested and
supported.
.PP
\f[I]FI_AV_MAP\f[] : Only address vectors of type AV map are requested
or supported.
.PP
\f[I]FI_AV_TABLE\f[] : Only address vectors of type AV index are
requested or supported.
.PP
Address vectors are only used by connectionless endpoints.
Applications that require the use of a specific type of address vector
should set the domain attribute av_type to the necessary value when
calling fi_getinfo.
The value FI_AV_UNSPEC may be used to indicate that the provider can
support either address vector format.
In this case, a provider may return FI_AV_UNSPEC to indicate that either
format is supportable, or may return another AV type to indicate the
optimal AV type supported by this domain.
.SS Memory Registration Mode (mr_mode)
.PP
Specifies the method of memory registration that is used with this
domain.
For additional details on MR mode, see \f[C]fi_mr\f[](3).
The following values may be specified.
.PP
\f[I]FI_MR_UNSPEC\f[] : Any memory registration mode is requested and
supported.
.PP
\f[I]FI_MR_BASIC\f[] : Only basic memory registration operations are
requested or supported.
.PP
\f[I]FI_MR_SCALABLE\f[] : Only scalable memory registration operations
are requested or supported.
.PP
Buffers used in data transfer operations may require notifying the
provider of their use before a data transfer can occur.
The mr_mode field indicates the type of memory registration that is
required, and when registration is necessary.
Applications that require the use of a specific registration mode should
set the domain attribute mr_mode to the necessary value when calling
fi_getinfo.
The value FI_MR_UNSPEC may be used to indicate support for any
registration mode.
.SS MR Key Size (mr_key_size)
.PP
Size of the memory region remote access key, in bytes.
Applications that request their own MR key must select a value within
the range specified by this value.
.SS CQ Data Size (cq_data_size)
.PP
Applications may include a small message with a data transfer that is
placed directly into a remote completion queue as part of a completion
event.
This is referred to as remote CQ data (sometimes referred to as
immediate data).
This field indicates the number of bytes that the provider supports for
remote CQ data.
If supported (non-zero value is returned), the minimum size of remote CQ
data must be at least 4-bytes.
.SS Completion Queue Count (cq_cnt)
.PP
The optimal number of completion queues supported by the domain,
relative to any specified or default CQ attributes.
The cq_cnt value may be a fixed value of the maximum number of CQs
supported by the underlying provider, or may be a dynamic value, based
on the default attributes of an allocated CQ, such as the CQ size and
data format.
.SS Endpoint Count (ep_cnt)
.PP
The total number of endpoints supported by the domain, relative to any
specified or default endpoint attributes.
The ep_cnt value may be a fixed value of the maximum number of endpoints
supported by the underlying provider, or may be a dynamic value, based
on the default attributes of an allocated endpoint, such as the endpoint
capabilities and size.
The endpoint count is the number of addressable endpoints supported by
the provider.
.SS Transmit Context Count (tx_ctx_cnt)
.PP
The number of outbound command queues optimally supported by the
provider.
For a low-level provider, this represents the number of command queues
to the hardware and/or the number of parallel transmit engines
effectively supported by the hardware and caches.
Applications which allocate more transmit contexts than this value will
end up sharing underlying resources.
By default, there is a single transmit context associated with each
endpoint, but in an advanced usage model, an endpoint may be configured
with multiple transmit contexts.
.SS Receive Context Count (rx_ctx_cnt)
.PP
The number of inbound processing queues optimally supported by the
provider.
For a low-level provider, this represents the number hardware queues
that can be effectively utilized for processing incoming packets.
Applications which allocate more receive contexts than this value will
end up sharing underlying resources.
By default, a single receive context is associated with each endpoint,
but in an advanced usage model, an endpoint may be configured with
multiple receive contexts.
.SS Maximum Endpoint Transmit Context (max_ep_tx_ctx)
.PP
The maximum number of transmit contexts that may be associated with an
endpoint.
.SS Maximum Endpoint Receive Context (max_ep_rx_ctx)
.PP
The maximum number of receive contexts that may be associated with an
endpoint.
.SS Maximum Sharing of Transmit Context (max_ep_stx_ctx)
.PP
The maximum number of endpoints that may be associated with a shared
transmit context.
.SS Maximum Sharing of Receive Context (max_ep_srx_ctx)
.PP
The maximum number of endpoints that may be associated with a shared
receive context.
.SH RETURN VALUE
.PP
Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH NOTES
.PP
Users should call fi_close to release all resources allocated to the
fabric domain.
.PP
The following fabric resources are associated with access domains:
active endpoints, memory regions, completion event queues, and address
vectors.
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_av\f[](3),
\f[C]fi_ep\f[](3), \f[C]fi_eq\f[](3), \f[C]fi_mr\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_domain.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_domain.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_getinfo.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_endpoint.3

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_endpoint.3

Просмотреть файл

@ -1,420 +0,0 @@
.TH fi_eq 3 "2015\-04\-28" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_eq - Event queue operations
.PP
fi_eq_open / fi_close : Open/close an event queue
.PP
fi_control : Control operation of EQ
.PP
fi_eq_read / fi_eq_readerr : Read an event from an event queue
.PP
fi_eq_write : Writes an event to an event queue
.PP
fi_eq_sread : A synchronous (blocking) read of an event queue
.PP
fi_eq_strerror : Converts provider specific error information into a
printable string
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_domain.h>
int\ fi_eq_open(struct\ fid_fabric\ *fabric,\ struct\ fi_eq_attr\ *attr,
\ \ \ \ struct\ fid_eq\ **eq,\ void\ *context);
int\ fi_close(struct\ fid\ *eq);
int\ fi_control(struct\ fid\ *eq,\ int\ command,\ void\ *arg);
ssize_t\ fi_eq_read(struct\ fid_eq\ *eq,\ uint32_t\ *event,
\ \ \ \ void\ *buf,\ size_t\ len,\ uint64_t\ flags);
ssize_t\ fi_eq_readerr(struct\ fid_eq\ *eq,\ struct\ fi_eq_err_entry\ *buf,
\ \ \ \ uint64_t\ flags);
ssize_t\ fi_eq_write(struct\ fid_eq\ *eq,\ uint32_t\ event,
\ \ \ \ const\ void\ *buf,\ size_t\ len,\ uint64_t\ flags);
ssize_t\ fi_eq_sread(struct\ fid_eq\ *eq,\ uint32_t\ *event,
\ \ \ \ void\ *buf,\ size_t\ len,\ int\ timeout,\ uint64_t\ flags);
const\ char\ *\ fi_eq_strerror(struct\ fid_eq\ *eq,\ int\ prov_errno,
\ \ \ \ \ \ const\ void\ *err_data,\ char\ *buf,\ size_t\ len);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]fabric\f[] : Opened fabric descriptor
.PP
\f[I]eq\f[] : Event queue
.PP
\f[I]attr\f[] : Event queue attributes
.PP
\f[I]context\f[] : User specified context associated with the event
queue.
.PP
\f[I]event\f[] : Reported event
.PP
\f[I]buf\f[] : For read calls, the data buffer to write events into.
For write calls, an event to insert into the event queue.
For fi_eq_strerror, an optional buffer that receives printable error
information.
.PP
\f[I]len\f[] : Length of data buffer
.PP
\f[I]flags\f[] : Additional flags to apply to the operation
.PP
\f[I]command\f[] : Command of control operation to perform on EQ.
.PP
\f[I]arg\f[] : Optional control argument
.PP
\f[I]prov_errno\f[] : Provider specific error value
.PP
\f[I]err_data\f[] : Provider specific error data related to a completion
.PP
\f[I]timeout\f[] : Timeout specified in milliseconds
.SH DESCRIPTION
.PP
Event queues are used to report events associated with control
operations.
They are associated with memory registration, address vectors,
connection management, and fabric and domain level events.
Reported events are either associated with a requested operation or
affiliated with a call that registers for specific types of events, such
as listening for connection requests.
.SS fi_eq_open
.PP
fi_eq_open allocates a new event queue.
.PP
The properties and behavior of an event queue are defined by
\f[C]struct\ fi_eq_attr\f[].
.IP
.nf
\f[C]
struct\ fi_eq_attr\ {
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ size;\ \ \ \ \ \ /*\ #\ entries\ for\ EQ\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ \ \ flags;\ \ \ \ \ /*\ operation\ flags\ */
\ \ \ \ enum\ fi_wait_obj\ \ \ \ \ wait_obj;\ \ /*\ requested\ wait\ object\ */
\ \ \ \ int\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ signaling_vector;\ /*\ interrupt\ affinity\ */
\ \ \ \ struct\ fid_wait\ \ \ \ \ *wait_set;\ \ /*\ optional\ wait\ set\ */
};
\f[]
.fi
.PP
\f[I]size\f[] : Specifies the minimum size of an event queue.
.PP
\f[I]flags\f[] : Flags that control the configuration of the EQ.
.IP \[bu] 2
\f[I]FI_WRITE\f[] : Indicates that the application requires support for
inserting user events into the EQ.
If this flag is set, then the fi_eq_write operation must be supported by
the provider.
If the FI_WRITE flag is not set, then the application may not invoke
fi_eq_write.
.PP
\f[I]wait_obj\f[] : EQ\[aq]s may be associated with a specific wait
object.
Wait objects allow applications to block until the wait object is
signaled, indicating that an event is available to be read.
Users may use fi_control to retrieve the underlying wait object
associated with an EQ, in order to use it in other system calls.
The following values may be used to specify the type of wait object
associated with an EQ:
.IP \[bu] 2
\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block
(wait) for events on the EQ.
When FI_WAIT_NONE is specified, the application may not call
fi_eq_sread.
.IP \[bu] 2
\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the
EQ using fabric interface calls, such as fi_eq_sread.
In this case, the underlying provider may select the most appropriate or
highest performing wait object available, including custom wait
mechanisms.
Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve
the underlying wait object.
.IP \[bu] 2
\f[I]FI_WAIT_SET\f[] : Indicates that the event queue should use a wait
set object to wait for events.
If specified, the wait_set field must reference an existing wait set
object.
.IP \[bu] 2
\f[I]FI_WAIT_FD\f[] : Indicates that the EQ should use a file descriptor
as its wait mechanism.
A file descriptor wait object must be usable in select, poll, and epoll
routines.
However, a provider may signal an FD wait object by marking it as
readable, writable, or with an error.
.IP \[bu] 2
\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the EQ should use a pthread
mutex and cond variable as a wait object.
.PP
\f[I]signaling_vector\f[] : Indicates which processor core interrupts
associated with the EQ should target.
.PP
\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a
wait object to which the event queue should attach.
When an event is inserted into the event queue, the corresponding wait
set will be signaled if all necessary conditions are met.
The use of a wait_set enables an optimized method of waiting for events
across multiple event queues.
This field is ignored if wait_obj is not FI_WAIT_SET.
.SS fi_close
.PP
The fi_close call releases all resources associated with an event queue.
Any events which remain on the EQ when it is closed are lost.
.PP
The EQ must not be bound to any other objects prior to being closed,
otherwise the call will return -FI_EBUSY.
.SS fi_control
.PP
The fi_control call is used to access provider or implementation
specific details of the event queue.
Access to the EQ should be serialized across all calls when fi_control
is invoked, as it may redirect the implementation of EQ operations.
The following control commands are usable with an EQ.
.PP
\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve
the low-level wait object associated with the EQ.
The format of the wait-object is specified during EQ creation, through
the EQ attributes.
The fi_control arg parameter should be an address where a pointer to the
returned wait object will be written.
This should be an \[aq]int *\[aq] for FI_WAIT_FD, or \[aq]struct
fi_mutex_cond\[aq] for FI_WAIT_MUTEX_COND.
.IP
.nf
\f[C]
struct\ fi_mutex_cond\ {
\ \ \ \ pthread_mutex_t\ \ \ \ \ *mutex;
\ \ \ \ pthread_cond_t\ \ \ \ \ \ *cond;
};
\f[]
.fi
.SS fi_eq_read
.PP
The fi_eq_read operations performs a non-blocking read of event data
from the EQ.
The format of the event data is based on the type of event retrieved
from the EQ, with all events starting with a struct fi_eq_entry header.
At most one event will be returned per EQ read operation.
The number of bytes successfully read from the EQ is returned from the
read.
The FI_PEEK flag may be used to indicate that event data should be read
from the EQ without being consumed.
A subsequent read without the FI_PEEK flag would then remove the event
from the EQ.
.PP
The following types of events may be reported to an EQ, along with
information regarding the format associated with each event.
.PP
\f[I]Asynchronous Control Operations\f[] : Asynchronous control
operations are basic requests that simply need to generate an event to
indicate that they have completed.
These include the following types of events: memory registration and
address vector resolution.
.PP
Control requests report their completion by inserting a
\f[C]struct\ \ \ fi_eq_entry\f[] into the EQ.
The format of this structure is:
.IP
.nf
\f[C]
struct\ fi_eq_entry\ {
\ \ \ \ fid_t\ \ \ \ \ \ \ \ \ \ \ \ fid;\ \ \ \ \ \ \ \ /*\ fid\ associated\ with\ request\ */
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ *context;\ \ \ \ /*\ operation\ context\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ data;\ \ \ \ \ \ \ /*\ completion-specific\ data\ */
};
\f[]
.fi
.PP
For the completion of basic asynchronous control operations, the
returned event will indicate the operation that has completed, and the
fid will reference the fabric descriptor associated with the event.
For memory registration, this will be an FI_MR_COMPLETE event and the
fid_mr; address resolution will reference an FI_AV_COMPLETE event and
fid_av.
The context field will be set to the context specified as part of the
operation, if available, otherwise the context will be associated with
the fabric descriptor.
The data field will be set as described in the man page for the
corresponding object type (e.g., see \f[C]fi_av\f[](3) for a description
of how asynchronous address vector insertions are completed).
.PP
\f[I]Connection Notification\f[] : Connection notifications are
connection management notifications used to setup or tear down
connections between endpoints.
There are three connection notification events: FI_CONNREQ,
FI_CONNECTED, and FI_SHUTDOWN.
Connection notifications are reported using
\f[C]struct\ \ \ fi_eq_cm_entry\f[]:
.IP
.nf
\f[C]
struct\ fi_eq_cm_entry\ {
\ \ \ \ fid_t\ \ \ \ \ \ \ \ \ \ \ \ fid;\ \ \ \ \ \ \ \ /*\ fid\ associated\ with\ request\ */
\ \ \ \ struct\ fi_info\ \ *info;\ \ \ \ \ \ \ /*\ endpoint\ information\ */
\ \ \ \ uint8_t\ \ \ \ \ \ \ \ \ data[];\ \ \ \ \ /*\ app\ connection\ data\ */
};
\f[]
.fi
.PP
A connection request (FI_CONNREQ) event indicates that a remote endpoint
wishes to establish a new connection to a listening, or passive,
endpoint.
The fid is the passive endpoint.
Information regarding the requested, active endpoint\[aq]s capabilities
and attributes are available from the info field.
The application is responsible for freeing this structure by calling
fi_freeinfo when it is no longer needed.
The fi_info connreq field will reference the connection request
associated with this event.
To accept a connection, an endpoint must first be created by passing an
fi_info structure referencing this connreq field to fi_endpoint().
This endpoint is then passed to fi_accept() to complete the acceptance
of the connection attempt.
Creating the endpoint is most easily accomplished by passing the fi_info
returned as part of the CM event into fi_endpoint().
If the connection is to be rejected, the connreq is passed to
fi_reject().
.PP
Any application data exchanged as part of the connection request is
placed beyond the fi_eq_cm_entry structure.
The amount of data available is application dependent and limited to the
buffer space provided by the application when fi_eq_read is called.
The amount of returned data may be calculated using the return value to
fi_eq_read.
Note that the amount of returned data is limited by the underlying
connection protocol, and the length of any data returned may include
protocol padding.
As a result, the returned length may be larger than that specified by
the connecting peer.
.PP
If a connection request has been accepted, an FI_CONNECTED event will be
generated on both sides of the connection.
The active side -- one that called fi_connect() -- may receive user data
as part of the FI_CONNECTED event.
The user data is passed to the connection manager on the passive side
through the fi_accept call.
User data is not provided with an FI_CONNECTED event on the listening
side of the connection.
.PP
Notification that a remote peer has disconnected from an active endpoint
is done through the FI_SHUTDOWN event.
Shutdown notification uses struct fi_eq_cm_entry as declared above.
The fid field for a shutdown notification refers to the active
endpoint\[aq]s fid_ep.
.PP
\f[I]Asynchronous Error Notification\f[] : Asynchronous errors are used
to report problems with fabric resources.
Reported errors may be fatal or transient, based on the error, and
result in the resource becoming disabled.
Disabled resources will fail operations submitted against them until
they are explicitly re-enabled by the application.
.PP
Asynchronous errors may be reported for completion queues and endpoints
of all types.
CQ errors can result when resource management has been disabled, and the
provider has detected a queue overrun.
Endpoint errors may be result of numerous actions, but are often
associated with a failed operation.
Operations may fail because of buffer overruns, invalid permissions,
incorrect memory access keys, network routing failures, network
reach-ability issues, etc.
.PP
Asynchronous errors are reported using struct fi_eq_err_entry, as
defined below.
The fabric descriptor (fid) associated with the error is provided as
part of the error data.
An error code is also available to determine the cause of the error.
.SS fi_eq_sread
.PP
The fi_eq_sread call is the blocking (or synchronous) equivalent to
fi_eq_read.
It behaves is similar to the non-blocking call, with the exception that
the calls will not return until either an event has been read from the
EQ or an error or timeout occurs.
Specifying a negative timeout means an infinite timeout.
.SS fi_eq_readerr
.PP
The read error function, fi_eq_readerr, retrieves information regarding
any asynchronous operation which has completed with an unexpected error.
fi_eq_readerr is a non-blocking call, returning immediately whether an
error completion was found or not.
.PP
EQs are optimized to report operations which have completed
successfully.
Operations which fail are reported \[aq]out of band\[aq].
Such operations are retrieved using the fi_eq_readerr function.
When an operation that completes with an unexpected error is inserted
into an EQ, it is placed into a temporary error queue.
Attempting to read from an EQ while an item is in the error queue
results in an FI_EAVAIL failure.
Applications may use this return code to determine when to call
fi_eq_readerr.
.PP
Error information is reported to the user through struct
fi_eq_err_entry.
The format of this structure is defined below.
.IP
.nf
\f[C]
struct\ fi_eq_err_entry\ {
\ \ \ \ fid_t\ \ \ \ \ \ \ \ \ \ \ \ fid;\ \ \ \ \ \ \ \ /*\ fid\ associated\ with\ error\ */
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ *context;\ \ \ \ /*\ operation\ context\ */
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ data;\ \ \ \ \ \ \ /*\ completion-specific\ data\ */
\ \ \ \ int\ \ \ \ \ \ \ \ \ \ \ \ \ \ err;\ \ \ \ \ \ \ \ /*\ positive\ error\ code\ */
\ \ \ \ int\ \ \ \ \ \ \ \ \ \ \ \ \ \ prov_errno;\ /*\ provider\ error\ code\ */
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ *err_data;\ \ \ /*\ additional\ error\ data\ */
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ err_data_size;\ /*\ size\ of\ err_data\ */
};
\f[]
.fi
.PP
The fid will reference the fabric descriptor associated with the event.
For memory registration, this will be the fid_mr, address resolution
will reference a fid_av, and CM events will refer to a fid_ep.
The context field will be set to the context specified as part of the
operation.
.PP
The data field will be set as described in the man page for the
corresponding object type (e.g., see \f[C]fi_av\f[](3) for a description
of how asynchronous address vector insertions are completed).
.PP
The general reason for the error is provided through the err field.
Provider or operational specific error information may also be available
through the prov_errno and err_data fields.
Users may call fi_eq_strerror to convert provider specific error
information into a printable string for debugging purposes.
.PP
If err_data_size is > 0, then the buffer referenced by err_data is
directly user-accessible.
Applications which read the err_data buffer must ensure that they do not
read past the end of the referenced buffer.
.SH RETURN VALUES
.PP
fi_eq_open : Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
.PP
fi_eq_read / fi_eq_readerr / fi_eq_sread : On success, returns the
number of bytes read from the event queue.
On error, a negative value corresponding to fabric errno is returned.
If no data is available to be read from the event queue, -FI_EAGAIN is
returned.
.PP
fi_eq_write : On success, returns the number of bytes written to the
event queue.
On error, a negative value corresponding to fabric errno is returned.
.PP
fi_eq_strerror : Returns a character string interpretation of the
provider specific error returned with a completion.
.PP
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH SEE ALSO
.PP
\f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_cntr\f[](3), \f[C]fi_poll\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_eq.3

Просмотреть файл

@ -1,109 +0,0 @@
.TH fi_errno 3 "2015\-04\-28" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_errno - fabric errors
.PP
fi_strerror - Convert fabric error into a printable string
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fi_errno.h>
const\ char\ *fi_strerror(int\ errno);
\f[]
.fi
.SH ERRORS
.PP
\f[I]FI_ENOENT\f[] : No such file or directory.
.PP
\f[I]FI_EIO\f[] : I/O error
.PP
\f[I]FI_E2BIG\f[] : Argument list too long.
.PP
\f[I]FI_EBADF\f[] : Bad file number.
.PP
\f[I]FI_EAGAIN\f[] : Try again.
.PP
\f[I]FI_ENOMEM\f[] : Out of memory.
.PP
\f[I]FI_EACCES\f[] : Permission denied.
.PP
\f[I]FI_EBUSY\f[] : Device or resource busy
.PP
\f[I]FI_ENODEV\f[] : No such device
.PP
\f[I]FI_EINVAL\f[] : Invalid argument
.PP
\f[I]FI_EMFILE\f[] : Too many open files
.PP
\f[I]FI_ENOSPC\f[] : No space left on device
.PP
\f[I]FI_ENOSYS\f[] : Function not implemented
.PP
\f[I]FI_ENOMSG\f[] : No message of desired type
.PP
\f[I]FI_ENODATA\f[] : No data available
.PP
\f[I]FI_EMSGSIZE\f[] : Message too long
.PP
\f[I]FI_ENOPROTOOPT\f[] : Protocol not available
.PP
\f[I]FI_EOPNOTSUPP\f[] : Operation not supported on transport endpoint
.PP
\f[I]FI_EADDRINUSE\f[] : Address already in use
.PP
\f[I]FI_EADDRNOTAVAIL\f[] : Cannot assign requested address
.PP
\f[I]FI_ENETDOWN\f[] : Network is down
.PP
\f[I]FI_ENETUNREACH\f[] : Network is unreachable
.PP
\f[I]FI_ECONNABORTED\f[] : Software caused connection abort
.PP
\f[I]FI_ECONNRESET\f[] : Connection reset by peer
.PP
\f[I]FI_EISCONN\f[] : Transport endpoint is already connected
.PP
\f[I]FI_ENOTCONN\f[] : Transport endpoint is not connected
.PP
\f[I]FI_ESHUTDOWN\f[] : Cannot send after transport endpoint shutdown
.PP
\f[I]FI_ETIMEDOUT\f[] : Operation timed out
.PP
\f[I]FI_ECONNREFUSED\f[] : Connection refused
.PP
\f[I]FI_EHOSTUNREACH\f[] : No route to host
.PP
\f[I]FI_EALREADY\f[] : Operation already in progress
.PP
\f[I]FI_EINPROGRESS\f[] : Operation now in progress
.PP
\f[I]FI_EREMOTEIO\f[] : Remote I/O error
.PP
\f[I]FI_ECANCELED\f[] : Operation Canceled
.PP
\f[I]FI_ENOKEY\f[] : Required key not available
.PP
\f[I]FI_EKEYREJECTED\f[] : Key was rejected by service
.PP
\f[I]FI_EOTHER\f[] : Unspecified error
.PP
\f[I]FI_ETOOSMALL\f[] : Provided buffer is too small
.PP
\f[I]FI_EOPBADSTATE\f[] : Operation not permitted in current state
.PP
\f[I]FI_EAVAIL\f[] : Error available
.PP
\f[I]FI_EBADFLAGS\f[] : Flags not supported
.PP
\f[I]FI_ENOEQ\f[] : Missing or unavailable event queue
.PP
\f[I]FI_EDOMAIN\f[] : Invalid resource domain
.PP
\f[I]FI_ENOCQ\f[] : Missing or unavailable completion queue
.SH SEE ALSO
.PP
\f[C]fabric\f[](7)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1,161 +0,0 @@
.TH fi_fabric 3 "2015\-03\-16" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_fabric - Fabric domain operations
.PP
fi_fabric / fi_close : Open / close a fabric domain
.PP
fi_tostr : Convert fabric attributes, flags, and capabilities to
printable string
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fabric.h>
int\ fi_fabric(struct\ fi_fabric_attr\ *attr,
\ \ \ \ struct\ fid_fabric\ **fabric,\ void\ *context);
int\ fi_close(struct\ fid\ *fabric);
char\ *\ fi_tostr(const\ void\ *data,\ enum\ fi_type\ datatype);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]attr\f[] : Attributes of fabric to open.
.PP
\f[I]fabric\f[] : Fabric domain
.PP
\f[I]context\f[] : User specified context associated with the opened
object.
This context is returned as part of any associated asynchronous event.
.SH DESCRIPTION
.PP
A fabric domain represents a collection of hardware and software
resources that access a single physical or virtual network.
All network ports on a system that can communicate with each other
through their attached networks belong to the same fabric domain.
A fabric domain shares network addresses and can span multiple
providers.
.SS fi_fabric
.PP
Opens a fabric provider.
The attributes of the fabric provider are specified through the open
call, and may be obtained by calling fi_getinfo.
.SS fi_close
.PP
The fi_close call is used to release all resources associated with a
fabric domain or interface.
All items associated with the opened fabric must be released prior to
calling fi_close.
.SS fi_tostr
.PP
Converts fabric interface attributes, capabilities, flags, and enum
values into a printable string.
The data parameter accepts a pointer to the attribute or value(s) to
display, with the datatype parameter indicating the type of data
referenced by the data parameter.
Valid values for the datatype are listed below, along with the
corresponding datatype or field value.
.PP
\f[I]FI_TYPE_INFO\f[] : struct fi_info
.PP
\f[I]FI_TYPE_EP_TYPE\f[] : struct fi_info::type field
.PP
\f[I]FI_TYPE_EP_CAP\f[] : struct fi_info::ep_cap field
.PP
\f[I]FI_TYPE_OP_FLAGS\f[] : struct fi_info::op_flags field, or general
uint64_t flags
.PP
\f[I]FI_TYPE_ADDR_FORMAT\f[] : struct fi_info::addr_format field
.PP
\f[I]FI_TYPE_TX_ATTR\f[] : struct fi_tx_attr
.PP
\f[I]FI_TYPE_RX_ATTR\f[] : struct fi_rx_attr
.PP
\f[I]FI_TYPE_EP_ATTR\f[] : struct fi_ep_attr
.PP
\f[I]FI_TYPE_DOMAIN_ATTR\f[] : struct fi_domain_attr
.PP
\f[I]FI_TYPE_FABRIC_ATTR\f[] : struct fi_fabric_attr
.PP
\f[I]FI_TYPE_DOMAIN_CAP\f[] : struct fi_info::domain_cap field
.PP
\f[I]FI_TYPE_THREADING\f[] : enum fi_threading
.PP
\f[I]FI_TYPE_PROGRESS\f[] : enum fi_progress
.PP
\f[I]FI_TYPE_PROTO\f[] : struct fi_ep_attr::protocol field
.PP
\f[I]FI_TYPE_MSG_ORDER\f[] : struct fi_ep_attr::msg_order field
.PP
\f[I]FI_TYPE_VERSION\f[] : Returns the library version of libfabric in
string form.
The data parameter is ignored.
.PP
fi_tostr() will return a pointer to an internal libfabric buffer that
should not be modified, and will be overwritten the next time fi_tostr()
is invoked.
fi_tostr() is not thread safe.
.SH NOTES
.PP
The following resources are associated with fabric domains: access
domains, passive endpoints, and CM event queues.
.SH FABRIC ATTRIBUTES
.PP
The fi_fabric_attr structure defines the set of attributes associated
with a fabric and a fabric provider.
.IP
.nf
\f[C]
struct\ fi_fabric_attr\ {
\ \ \ \ struct\ fid_fabric\ *fabric;
\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ *name;
\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ *prov_name;
\ \ \ \ uint32_t\ \ \ \ \ \ \ \ \ \ prov_version;
};
\f[]
.fi
.SS fabric
.PP
On input to fi_getinfo, a user may set this to an opened fabric instance
to restrict output to the given fabric.
On output from fi_getinfo, if no fabric was specified, but the user has
an opened instance of the named fabric, this will reference the first
opened instance.
If no instance has been opened, this field will be NULL.
.SS name
.PP
A fabric identifier.
.SS prov_name
.PP
The name of the underlying fabric provider.
.PP
For debugging and administrative purposes, environment variables can be
used to control which fabric providers will be registered with
libfabric.
Specifying "FI_PROVIDER=foo,bar" will allow any providers with the names
"foo" or "bar" to be registered.
Similarly, specifying "FI_PROVIDER=^foo,bar" will prevent any providers
with the names "foo" or "bar" from being registered.
Providers which are not registered will not appear in fi_getinfo
results.
Applications which need a specific set of providers should implement
their own filtering of fi_getinfo\[aq]s results rather than relying on
these environment variables in a production setting.
.SS prov_version
.PP
Version information for the fabric provider.
.SH RETURN VALUE
.PP
Returns 0 on success.
On error, a negative value corresponding to fabric errno is returned.
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.SH ERRORS
.SH SEE ALSO
.PP
\f[C]fabric\f[](7), \f[C]fi_getinfo\f[](3), \f[C]fi_domain\f[](3),
\f[C]fi_eq\f[](3), \f[C]fi_endpoint\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_getinfo.3

Просмотреть файл

@ -1,572 +0,0 @@
.TH fi_getinfo 3 "2015\-04\-23" "Libfabric Programmer\[aq]s Manual" "Libfabric v1.0.0"
.SH NAME
.PP
fi_getinfo / fi_freeinfo - Obtain / free fabric interface information
.PP
fi_allocinfo / fi_dupinfo - Allocate / duplicate an fi_info structure
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <rdma/fabric.h>
int\ fi_getinfo(int\ version,\ const\ char\ *node,\ const\ char\ *service,
\ \ \ \ \ \ \ \ uint64_t\ flags,\ struct\ fi_info\ *hints,\ struct\ fi_info\ **info);
void\ fi_freeinfo(struct\ fi_info\ *info);
struct\ fi_info\ *fi_allocinfo(void);
struct\ fi_info\ *fi_dupinfo(const\ struct\ fi_info\ *info);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]version\f[] : Interface version requested by application.
.PP
\f[I]node\f[] : Optional, name or fabric address to resolve.
.PP
\f[I]service\f[] : Optional, service name or port number of address.
.PP
\f[I]flags\f[] : Operation flags for the fi_getinfo call.
.PP
\f[I]hints\f[] : Reference to an fi_info structure that specifies
criteria for selecting the returned fabric information.
.PP
\f[I]info\f[] : A pointer to a linked list of fi_info structures
containing response information.
.SH DESCRIPTION
.PP
fi_getinfo returns information about available fabric services for
reaching specified node or service, subject to any provided hints.
Callers may specify NULL for node, service, and hints in order to
retrieve information about what providers are available and their
optimal usage models.
If no matching fabric information is available, info will be set to NULL
and the call will return -FI_ENODATA.
.PP
Based on the input hints, node, and service parameters, a list of fabric
domains and endpoints will be returned.
Each fi_info structure will describe an endpoint that meets the
application\[aq]s specified communication criteria.
Each endpoint will be associated with a domain.
Applications can restrict the number of returned endpoints by including
additional criteria in their search hints.
Relaxing or eliminating input hints will increase the number and type of
endpoints that are available.
Providers that return multiple endpoints to a single fi_getinfo call
should return the endpoints that are highest performing first.
Providers may indicate that an endpoint and domain can support
additional capabilities than those requested by the user only if such
support will not adversely affect application performance or security.
.PP
The version parameter is used by the application to request the desired
version of the interfaces.
The version determines the format of all data structures used by any of
the fabric interfaces.
Applications should use the FI_VERSION(major, minor) macro to indicate
the version, with hard-coded integer values for the major and minor
values.
The FI_MAJOR_VERSION and FI_MINOR_VERSION enum values defined in
fabric.h specify the latest version of the installed library.
However, it is recommended that the integer values for FI_MAJOR_VERSION
and FI_MINOR_VERSION be used, rather than referencing the enum types in
order to ensure compatibility with future versions of the library.
This protects against the application being built from source against a
newer version of the library that introduces new fields to data
structures, which would not be initialized by the application.
.PP
Node, service, or hints may be provided, with any combination being
supported.
If node is provided, fi_getinfo will attempt to resolve the fabric
address to the given node.
If node is not given, fi_getinfo will attempt to resolve the fabric
addressing information based on the provided hints.
.PP
The hints parameter, if provided, may be used to limit the resulting
output as indicated below.
As a general rule, specifying a non-zero value for input hints indicates
that a provider must support the requested value or fail the operation
with -FI_ENODATA.
With the exception of mode bits, hints that are set to zero are treated
as a wildcard.
A zeroed hint value results in providers either returning a default
value or a value that works best for their implementation.
.PP
The caller must call fi_freeinfo to release fi_info structures returned
by this call.
.PP
The fi_allocinfo call will allocate and zero an fi_info structure and
all related substructures.
The fi_dupinfo will duplicate a single fi_info structure and all the
substructures within it.
.SH FI_INFO
.IP
.nf
\f[C]
struct\ fi_info\ {
\ \ \ \ struct\ fi_info\ \ \ \ \ \ \ \ *next;
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ caps;
\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ mode;
\ \ \ \ uint32_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ addr_format;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src_addrlen;
\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dest_addrlen;
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *src_addr;
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *dest_addr;
\ \ \ \ fid_t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ handle;
\ \ \ \ struct\ fi_tx_attr\ \ \ \ \ *tx_attr;
\ \ \ \ struct\ fi_rx_attr\ \ \ \ \ *rx_attr;
\ \ \ \ struct\ fi_ep_attr\ \ \ \ \ *ep_attr;
\ \ \ \ struct\ fi_domain_attr\ *domain_attr;
\ \ \ \ struct\ fi_fabric_attr\ *fabric_attr;
};
\f[]
.fi
.PP
\f[I]next\f[] : Pointer to the next fi_info structure in the list.
Will be NULL if no more structures exist.
.PP
\f[I]caps - fabric interface capabilities\f[] : If specified, indicates
the desired capabilities of the fabric interfaces.
Supported capabilities are listed in the \f[I]Capabilities\f[] section
below.
.PP
\f[I]mode\f[] : Operational modes supported by the application.
See the \f[I]Mode\f[] section below.
.PP
\f[I]addr_format - address format\f[] : If specified, indicates the
format of addresses referenced by the fabric interfaces and data
structures.
Supported formats are listed in the \f[I]Addressing formats\f[] section
below.
.PP
\f[I]src_addrlen - source address length\f[] : Indicates the length of
the source address.
This value must be > 0 if \f[I]src_addr\f[] is non-NULL.
This field will be ignored in hints if FI_SOURCE is specified, or
\f[I]src_addr\f[] is NULL.
.PP
\f[I]dest_addrlen - destination address length\f[] : Indicates the
length of the destination address.
This value must be > 0 if \f[I]dest_addr\f[] is non-NULL.
This field will be ignored in hints unless the node and service
parameters are NULL or FI_SOURCE is specified, or if \f[I]dst_addr\f[]
is NULL.
.PP
\f[I]src_addr - source address\f[] : If specified, indicates the source
address.
This field will be ignored in hints if FI_SOURCE is specified.
On output a provider shall return an address that corresponds to the
indicated fabric or domain, with the format indicated by the returned
\f[I]addr_format\f[] field.
.PP
\f[I]dest_addr - destination address\f[] : If specified, indicates the
destination address.
This field will be ignored in hints unless the node and service
parameters are NULL or FI_SOURCE is specified.
.PP
\f[I]handle - provider context handle\f[] : References a provider
specific handle.
The use of this field is operation specific.
Unless its use is described for a given operation, the handle field must
be NULL.
It is commonly used by applications that make use of connection-oriented
endpoints.
For other applications, the field should usually be NULL.
.PP
This field is used when processing connection requests and responses.
It is also used to inherit endpoint\[aq]s attributes.
See fi_eq(3), fi_reject(3), and fi_endpoint(3) .
.PP
\f[I]tx_attr - transmit context attributes\f[] : Optionally supplied
transmit context attributes.
Transmit context attributes may be specified and returned as part of
fi_getinfo.
When provided as hints, requested values of struct fi_tx_ctx_attr should
be set.
On output, the actual transmit context attributes that can be provided
will be returned.
Output values will be greater than or equal to the requested input
values.
.PP
\f[I]rx_attr - receive context attributes\f[] : Optionally supplied
receive context attributes.
Receive context attributes may be specified and returned as part of
fi_getinfo.
When provided as hints, requested values of struct fi_rx_ctx_attr should
be set.
On output, the actual receive context attributes that can be provided
will be returned.
Output values will be greater than or or equal to the requested input
values.
.PP
\f[I]ep_attr - endpoint attributes\f[] : Optionally supplied endpoint
attributes.
Endpoint attributes may be specified and returned as part of fi_getinfo.
When provided as hints, requested values of struct fi_ep_attr should be
set.
On output, the actual endpoint attributes that can be provided will be
returned.
Output values will be greater than or equal to requested input values.
See fi_endpoint(3) for details.
.PP
\f[I]domain_attr - domain attributes\f[] : Optionally supplied domain
attributes.
Domain attributes may be specified and returned as part of fi_getinfo.
When provided as hints, requested values of struct fi_domain_attr should
be set.
On output, the actual domain attributes that can be provided will be
returned.
Output values will be greater than or equal to requested input values.
See fi_domain(3) for details.
.PP
\f[I]fabric_attr - fabric attributes\f[] : Optionally supplied fabric
attributes.
Fabric attributes may be specified and returned as part of fi_getinfo.
When provided as hints, requested values of struct fi_fabric_attr should
be set.
On output, the actual fabric attributes that can be provided will be
returned.
See fi_fabric(3) for details.
.SH CAPABILITIES
.PP
Interface capabilities are obtained by OR-ing the following flags
together.
If capabilities in the hint parameter are set to 0, the underlying
provider will return the set of capabilities which are supported.
Otherwise, providers will return data matching the specified set of
capabilities.
Providers may indicate support for additional capabilities beyond those
requested when the use of expanded capabilities will not adversely
affect performance or expose the application to communication beyond
that which was requested.
Applications may use this feature to request a minimal set of
requirements, then check the returned capabilities to enable additional
optimizations.
.PP
\f[I]FI_MSG\f[] : Specifies that an endpoint should support sending and
receiving messages or datagrams.
Message capabilities imply support for send and/or receive queues.
Endpoints supporting this capability support operations defined by
struct fi_ops_msg.
.PP
The caps may be used to specify or restrict the type of messaging
operations that are supported.
In the absence of any relevant flags, FI_MSG implies the ability to send
and receive messages.
Applications can use the FI_SEND and FI_RECV flags to optimize an
endpoint as send-only or receive-only.
.PP
\f[I]FI_RMA\f[] : Specifies that the endpoint should support RMA read
and write operations.
Endpoints supporting this capability support operations defined by
struct fi_ops_rma.
In the absence of any relevant flags, FI_RMA implies the ability to
initiate and be the target of remote memory reads and writes.
Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and
FI_REMOTE_WRITE flags to restrict the types of RMA operations supported
by an endpoint.
.PP
\f[I]FI_TAGGED\f[] : Specifies that the endpoint should handle tagged
message transfers.
Tagged message transfers associate a user-specified key or tag with each
message that is used for matching purposes at the remote side.
Endpoints supporting this capability support operations defined by
struct fi_ops_tagged.
In the absence of any relevant flags, FI_TAGGED implies the ability to
send and receive tagged messages.
Applications can use the FI_SEND and FI_RECV flags to optimize an
endpoint as send-only or receive-only.
.PP
\f[I]FI_ATOMIC\f[] : Specifies that the endpoint supports some set of
atomic operations.
Endpoints supporting this capability support operations defined by
struct fi_ops_atomic.
In the absence of any relevant flags, FI_ATOMIC implies the ability to
initiate and be the target of remote atomic reads and writes.
Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and
FI_REMOTE_WRITE flags to restrict the types of atomic operations
supported by an endpoint.
.PP
\f[I]FI_NAMED_RX_CTX\f[] : Requests that endpoints which support
multiple receive contexts allow an initiator to target (or name) a
specific receive context as part of a data transfer operation.
.PP
\f[I]FI_DIRECTED_RECV\f[] : Requests that the communication endpoint use
the source address of an incoming message when matching it with a
receive buffer.
If this capability is not set, then the src_addr parameter for msg and
tagged receive operations is ignored.
.PP
\f[I]FI_MULTI_RECV\f[] : Specifies that the endpoint must support the
FI_MULTI_RECV flag when posting receive buffers.
.PP
\f[I]FI_SOURCE\f[] : Requests that the endpoint return source addressing
data as part of its completion data.
This capability only applies to connectionless endpoints.
Note that returning source address information may require that the
provider perform address translation and/or look-up based on data
available in the underlying protocol in order to provide the requested
data, which may adversely affect performance.
.PP
\f[I]FI_READ\f[] : Indicates that the user requires an endpoint capable
of initiating reads against remote memory regions.
This flag requires that FI_RMA and/or FI_ATOMIC be set.
.PP
\f[I]FI_WRITE\f[] : Indicates that the user requires an endpoint capable
of initiating writes against remote memory regions.
This flag requires that FI_RMA and/or FI_ATOMIC be set.
.PP
\f[I]FI_SEND\f[] : Indicates that the user requires an endpoint capable
of sending message data transfers.
Message transfers include base message operations as well as tagged
message functionality.
.PP
\f[I]FI_RECV\f[] : Indicates that the user requires an endpoint capable
of receiving message data transfers.
Message transfers include base message operations as well as tagged
message functionality.
.PP
\f[I]FI_REMOTE_READ\f[] : Indicates that the user requires an endpoint
capable of receiving read memory operations from remote endpoints.
This flag requires that FI_RMA and/or FI_ATOMIC be set.
.PP
\f[I]FI_REMOTE_WRITE\f[] : Indicates that the user requires an endpoint
capable of receiving write memory operations from remote endpoints.
This flag requires that FI_RMA and/or FI_ATOMIC be set.
.PP
\f[I]FI_RMA_EVENT\f[] : Requests that an endpoint support the generation
of completion events when it is the target of an RMA and/or atomic
operation.
If set, the provider will support both completion queue and counter
events.
This flag requires that FI_REMOTE_READ and/or FI_REMOTE_WRITE be enabled
on the endpoint.
.PP
\f[I]FI_TRIGGER\f[] : Indicates that the endpoint should support
triggered operations.
Endpoints support this capability must meet the usage model as described
by fi_trigger.3.
.PP
\f[I]FI_FENCE\f[] : Indicates that the endpoint support the FI_FENCE
flag on data transfer operations.
Support requires tracking that all previous transmit requests to a
specified remote endpoint complete prior to initiating the fenced
operation.
Fenced operations are often used to enforce ordering between operations
that are not otherwise guaranteed by the underlying provider or
protocol.
.PP
Capabilities may be grouped into two general categories: primary and
secondary.
Primary capabilities must explicitly be requested by an application, and
a provider must enable support for only those primary capabilities which
were selected.
Secondary capabilities may optionally be requested by an application.
If requested, a provider must support the capability or fail the
fi_getinfo request (FI_ENODATA).
A provider may optionally report non-selected secondary capabilities if
doing so would not compromise performance or security.
.PP
Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC,
FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_READ, FI_WRITE, FI_RECV, FI_SEND,
FI_REMOTE_READ, and FI_REMOTE_WRITE.
.PP
Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_FENCE
.SH MODE
.PP
The operational mode bits are used to convey requirements that an
application must adhere to when using the fabric interfaces.
Modes specify optimal ways of accessing the reported endpoint or domain.
Applications that are designed to support a specific mode of operation
may see improved performance when that mode is desired by the provider.
It is recommended that providers support applications that disable any
provider preferred modes.
.PP
On input to fi_getinfo, applications set the mode bits that they
support.
On output, providers will clear mode bits that are not necessary to
achieve high-performance.
Mode bits that remain set indicate application requirements for using
the fabric interfaces created using the returned fi_info.
The set of modes are listed below.
.PP
\f[I]FI_CONTEXT\f[] : Specifies that the provider requires that
applications use struct fi_context as their per operation context
parameter.
This structure should be treated as opaque to the application.
For performance reasons, this structure must be allocated by the user,
but may be used by the fabric provider to track the operation.
Typically, users embed struct fi_context within their own context
structure.
The struct fi_context must remain valid until the corresponding
operation completes or is successfully canceled.
As such, fi_context should NOT be allocated on the stack.
Doing so is likely to result in stack corruption that will be difficult
to debug.
Users should not update or interpret the fields in this structure, or
reuse it until the original operation has completed.
The structure is specified in rdma/fabric.h.
.PP
\f[I]FI_LOCAL_MR\f[] : The provider is optimized around having
applications register memory for locally accessed data buffers.
Data buffers used in send and receive operations and as the source
buffer for RMA and atomic operations must be registered by the
application for access domains opened with this capability.
.PP
\f[I]FI_MSG_PREFIX\f[] : Message prefix mode indicates that an
application will provide buffer space in front of all message send and
receive buffers for use by the provider.
Typically, the provider uses this space to implement a protocol, with
the protocol headers being written into the prefix area.
The contents of the prefix space should be treated as opaque.
The use of FI_MSG_PREFIX may improve application performance over
certain providers by reducing the number of IO vectors referenced by
underlying hardware and eliminating provider buffer allocation.
.PP
FI_MSG_PREFIX only applies to send and receive operations, including
tagged sends and receives.
RMA and atomics do not require the application to provide prefix
buffers.
Prefix buffer space must be provided with all sends and receives,
regardless of the size of the transfer or other transfer options.
The ownership of prefix buffers is treated the same as the corresponding
message buffers, but the size of the prefix buffer is not counted toward
any message limits, including inject.
.PP
Applications that support prefix mode must supply buffer space before
their own message data.
The size of space that must be provided is specified by the
msg_prefix_size endpoint attribute.
Providers are required to define a msg_prefix_size that is a multiple of
8 bytes.
Additionally, applications may receive provider generated packets that
do not contain application data.
Such received messages will indicate a transfer size of 0 bytes.
.PP
\f[I]FI_ASYNC_IOV\f[] : Applications can reference multiple data buffers
as part of a single transmit operation through the use of IO vectors
(SGEs).
Typically, the contents of an IO vector are copied by the provider into
an internal buffer area, or directly to the underlying hardware.
However, when a large number of IOV entries are supported, IOV buffering
may have a negative impact on performance and memory consumption.
The FI_ASYNC_IOV mode indicates that the application must provide the
buffering needed for the IO vectors.
When set, an application must not modify an IO vector until the
associated operation has completed.
.PP
\f[I]FI_RX_CQ_DATA\f[] : This mode bit only applies to data transfers
that set FI_REMOTE_CQ_DATA.
When set, a data transfer that carries remote CQ data will consume a
receive buffer at the target.
This is true even for operations that would normally not consume posted
receive buffers, such as RMA write operations.
.SH ADDRESSING FORMATS
.PP
Multiple fabric interfaces take as input either a source or destination
address parameter.
This includes struct fi_info (src_addr and dest_addr), CM calls
(getname, getpeer, connect, join, and leave), and AV calls (insert,
lookup, and straddr).
The fi_info addr_format field indicates the expected address format for
these operations.
.PP
A provider may support one or more of the following addressing formats.
In some cases, a selected addressing format may need to be translated or
mapped into an address which is native to the fabric.
See \f[C]fi_av\f[](3).
.PP
\f[I]FI_FORMAT_UNSPEC\f[] : FI_FORMAT_UNSPEC indicates that a provider
specific address format should be selected.
Provider specific addresses may be protocol specific or a vendor
proprietary format.
Applications that select FI_FORMAT_UNSPEC should be prepared to treat
returned addressing data as opaque.
FI_FORMAT_UNSPEC targets apps which make use of an out of band address
exchange.
Applications which use FI_FORMAT_UNSPEC may use fi_getname() to obtain a
provider specific address assigned to an allocated endpoint.
.PP
\f[I]FI_SOCKADDR\f[] : Address is of type sockaddr.
The specific socket address format will be determined at run time by
interfaces examining the sa_family field.
.PP
\f[I]FI_SOCKADDR_IN\f[] : Address is of type sockaddr_in (IPv4).
.PP
\f[I]FI_SOCKADDR_IN6\f[] : Address is of type sockaddr_in6 (IPv6).
.PP
\f[I]FI_SOCKADDR_IB\f[] : Address is of type sockaddr_ib (defined in
Linux kernel source)
.PP
\f[I]FI_ADDR_PSMX\f[] : Address is an Intel proprietary format that is
used with their PSMX (extended performance scaled messaging) protocol.
.SH FLAGS
.PP
The operation of the fi_getinfo call may be controlled through the use
of input flags.
Valid flags include the following.
.PP
\f[I]FI_NUMERICHOST\f[] : Indicates that the node parameter is a numeric
string representation of a fabric address, such as a dotted decimal IP
address.
Use of this flag will suppress any lengthy name resolution protocol.
.PP
\f[I]FI_SOURCE\f[] : Indicates that the node and service parameters
specify the local source address to associate with an endpoint.
If specified, either the node and/or service parameter must be non-NULL.
This flag is often used with passive endpoints.
.SH RETURN VALUE
.PP
fi_getinfo() returns 0 on success.
On error, fi_getinfo() returns a negative value corresponding to fabric
errno.
Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[].
.PP
fi_allocinfo() returns a pointer to a new fi_info structure on success,
or NULL on error.
fi_dupinfo() duplicates a single fi_info structure and all the
substructures within it, returning a pointer to the new fi_info
structure on success, or NULL on error.
Both calls require that the returned fi_info structure be freed via
fi_freeinfo().
.SH ERRORS
.PP
\f[I]FI_EBADFLAGS\f[] : The specified endpoint or domain capability or
operation flags are invalid.
.PP
\f[I]FI_ENOMEM\f[] : Indicates that there was insufficient memory to
complete the operation.
.PP
\f[I]FI_ENODATA\f[] : Indicates that no providers could be found which
support the requested fabric information.
.SH NOTES
.PP
If hints are provided, the operation will be controlled by the values
that are supplied in the various fields (see section on
\f[I]fi_info\f[]).
Applications that require specific communication interfaces, domains,
capabilities or other requirements, can specify them using fields in
\f[I]hints\f[].
Libfabric returns a linked list in \f[I]info\f[] that points to a list
of matching interfaces.
\f[I]info\f[] is set to NULL if there are no communication interfaces or
none match the input hints.
.PP
If node is provided, fi_getinfo will attempt to resolve the fabric
address to the given node.
If node is not provided, fi_getinfo will attempt to resolve the fabric
addressing information based on the provided hints.
The caller must call fi_freeinfo to release fi_info structures returned
by fi_getinfo.
.PP
If neither node, service or hints are provided, then fi_getinfo simply
returns the list all available communication interfaces.
.PP
Multiple threads may call \f[C]fi_getinfo\f[] "simultaneously, without
any requirement for serialization."
.SH SEE ALSO
.PP
\f[C]fi_open\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3)
.SH AUTHORS
OpenFabrics.

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cm.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_endpoint.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_cm.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_msg.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_atomic.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_rma.3

Просмотреть файл

@ -1 +0,0 @@
.so man3/fi_rma.3

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше