libfabric: update embedded libfabric to 934a714
Update the embedded copy of libfabric to the github ofiwg/libfabric repo hash 934a714ca85f1a30a1e384a7d5f714ee962dc253.
Этот коммит содержится в:
родитель
09d03a154b
Коммит
f331f48796
@ -186,6 +186,7 @@ endif HAVE_USNIC
|
||||
|
||||
if HAVE_PSM
|
||||
_psm_files = \
|
||||
prov/psm/src/psm_am.h \
|
||||
prov/psm/src/psmx.h \
|
||||
prov/psm/src/psmx_init.c \
|
||||
prov/psm/src/psmx_domain.c \
|
||||
@ -321,7 +322,10 @@ dummy_man_pages = \
|
||||
man/fi_getopt.3 \
|
||||
man/fi_getpeer.3 \
|
||||
man/fi_inject.3 \
|
||||
man/fi_injectdata.3 \
|
||||
man/fi_inject_atomic.3 \
|
||||
man/fi_inject_write.3 \
|
||||
man/fi_inject_writedata.3 \
|
||||
man/fi_join.3 \
|
||||
man/fi_leave.3 \
|
||||
man/fi_listen.3 \
|
||||
@ -332,10 +336,13 @@ dummy_man_pages = \
|
||||
man/fi_mr_regattr.3 \
|
||||
man/fi_mr_regv.3 \
|
||||
man/fi_open.3 \
|
||||
man/fi_pendpoint.3 \
|
||||
man/fi_passive_ep.3 \
|
||||
man/fi_poll_add.3 \
|
||||
man/fi_poll_del.3 \
|
||||
man/fi_poll_open.3 \
|
||||
man/fi_read.3 \
|
||||
man/fi_readmsg.3 \
|
||||
man/fi_readv.3 \
|
||||
man/fi_recv.3 \
|
||||
man/fi_recvmsg.3 \
|
||||
man/fi_recvv.3 \
|
||||
@ -349,6 +356,7 @@ dummy_man_pages = \
|
||||
man/fi_shutdown.3 \
|
||||
man/fi_strerror.3 \
|
||||
man/fi_tinject.3 \
|
||||
man/fi_tinjectdata.3 \
|
||||
man/fi_tostr.3 \
|
||||
man/fi_trecv.3 \
|
||||
man/fi_trecvmsg.3 \
|
||||
@ -359,7 +367,11 @@ dummy_man_pages = \
|
||||
man/fi_tsendmsg.3 \
|
||||
man/fi_tsendv.3 \
|
||||
man/fi_wait.3 \
|
||||
man/fi_wait_open.3
|
||||
man/fi_wait_open.3 \
|
||||
man/fi_write.3 \
|
||||
man/fi_writedata.3 \
|
||||
man/fi_writemsg.3 \
|
||||
man/fi_writev.3
|
||||
|
||||
man_MANS = $(real_man_pages) $(dummy_man_pages)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
This README is for userspace RDMA fabric library.
|
||||
|
||||
Version Libfabric v0.0.2
|
||||
Released on 2014-12-03
|
||||
Released on 2014-12-09
|
||||
|
||||
Building
|
||||
========
|
||||
|
@ -3,20 +3,9 @@
|
||||
/* Set to 1 to use c11 atomic functions */
|
||||
#undef HAVE_ATOMICS
|
||||
|
||||
/* Define to 1 if you have the declaration of `O_CLOEXEC', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_O_CLOEXEC
|
||||
|
||||
/* Define to 1 if you have the declaration of `SOCK_CLOEXEC', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_SOCK_CLOEXEC
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -59,9 +48,6 @@
|
||||
/* assembler has .symver support */
|
||||
#undef HAVE_SYMVER_SUPPORT
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
@ -78,9 +64,6 @@
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Defined to 0 if not provided */
|
||||
#undef O_CLOEXEC
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -102,20 +85,8 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* Defined to 0 if not provided */
|
||||
#undef SOCK_CLOEXEC
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* fopen() modifier for setting close on exec flag */
|
||||
#undef STREAM_CLOEXEC
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
@ -77,16 +77,14 @@ AC_DEFUN([FI_PROVIDER_SETUP],[
|
||||
[PROVIDERS_TO_BUILD="$PROVIDERS_TO_BUILD $1"
|
||||
PROVIDERS_COUNT=$((PROVIDERS_COUNT+1))
|
||||
AS_IF([test $$1_dl -eq 1],
|
||||
[AC_MSG_NOTICE([$1 provider to be built as a DSO])
|
||||
PROVIDERS_DL="prov/$1/lib$1.la $PROVIDERS_DL"
|
||||
[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 to be built statically])
|
||||
PROVIDERS_STATIC="prov/$1/lib$1.la $PROVIDERS_STATIC"])
|
||||
[PROVIDERS_STATIC="prov/$1/lib$1.la $PROVIDERS_STATIC"])
|
||||
],
|
||||
[AC_MSG_NOTICE([$1 provider disabled])])
|
||||
|
||||
|
@ -44,48 +44,17 @@ AC_ARG_ENABLE([direct],
|
||||
[enable_direct=no])
|
||||
|
||||
dnl Checks for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
||||
dnl Only build on Linux
|
||||
AC_CHECK_HEADER([linux/types.h], [],
|
||||
[AC_MSG_ERROR([libfabric only builds on Linux])])
|
||||
|
||||
LT_INIT
|
||||
|
||||
AC_CHECK_HEADERS([fcntl.h sys/socket.h])
|
||||
AC_CHECK_DECLS([O_CLOEXEC],,[AC_DEFINE([O_CLOEXEC],[0],
|
||||
[Defined to 0 if not provided])],
|
||||
[[
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CHECK_DECLS([SOCK_CLOEXEC],,[AC_DEFINE([SOCK_CLOEXEC],[0],
|
||||
[Defined to 0 if not provided])],
|
||||
[[
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CACHE_CHECK(for close on exec modifier for fopen(),
|
||||
ac_cv_feature_stream_cloexec_flag,
|
||||
[if test $ac_cv_have_decl_O_CLOEXEC = yes ; then
|
||||
if test $ac_cv_have_decl_SOCK_CLOEXEC = yes ; then
|
||||
ac_cv_feature_stream_cloexec_flag="e"
|
||||
fi
|
||||
fi])
|
||||
AC_DEFINE_UNQUOTED([STREAM_CLOEXEC], "$ac_cv_feature_stream_cloexec_flag",
|
||||
[fopen() modifier for setting close on exec flag])
|
||||
|
||||
dnl dlopen support is optional
|
||||
AC_ARG_WITH([dlopen],
|
||||
AC_HELP_STRING([--with-dlopen],
|
||||
@ -161,11 +130,6 @@ FI_PROVIDER_SETUP([verbs])
|
||||
FI_PROVIDER_SETUP([usnic])
|
||||
FI_PROVIDER_FINI
|
||||
|
||||
# Make sure at least one provider was setup
|
||||
AS_IF([test x"$PROVIDERS_TO_BUILD" = "x"],
|
||||
[AC_MSG_NOTICE([No providers were configured])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
# 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"],
|
||||
@ -178,3 +142,30 @@ 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
|
||||
|
||||
echo "***"
|
||||
for i in $PROVIDERS_TO_BUILD; do
|
||||
v=${i}_dl
|
||||
if test `eval echo \\$${v}` != "1"; then
|
||||
builtin="$i ${builtin}"
|
||||
fi
|
||||
done
|
||||
echo -e "*** Built-in providers:\t${builtin}"
|
||||
echo "***"
|
||||
|
||||
for i in $PROVIDERS_TO_BUILD; do
|
||||
v=${i}_dl
|
||||
if test `eval echo \\$${v}` == "1"; then
|
||||
dso="$i ${dso}"
|
||||
fi
|
||||
done
|
||||
echo -e "*** DSO providers:\t${dso}"
|
||||
echo "***"
|
||||
|
@ -64,13 +64,13 @@ int fi_no_ops_open(struct fid *fid, const char *name,
|
||||
static struct fi_ops_fabric X = {
|
||||
.size = sizeof(struct fi_ops_fabric),
|
||||
.domain = fi_no_domain,
|
||||
.endpoint = fi_no_pendpoint,
|
||||
.endpoint = fi_no_passive_ep,
|
||||
.eq_open = fi_no_eq_open,
|
||||
};
|
||||
*/
|
||||
int fi_no_domain(struct fid_fabric *fabric, struct fi_domain_attr *attr,
|
||||
struct fid_domain **dom, void *context);
|
||||
int fi_no_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
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);
|
||||
@ -209,9 +209,9 @@ int fi_no_wait_open(struct fid_domain *domain, struct fi_wait_attr *attr,
|
||||
struct fid_wait **waitset);
|
||||
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_ctx_attr *attr,
|
||||
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_ctx_attr *attr,
|
||||
int fi_no_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr,
|
||||
struct fid_ep **rx_ep, void *context);
|
||||
|
||||
/*
|
||||
@ -250,10 +250,10 @@ int fi_no_getopt(fid_t fid, int level, int optname,
|
||||
int fi_no_setopt(fid_t fid, int level, int optname,
|
||||
const void *optval, size_t optlen);
|
||||
int fi_no_tx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_tx_ctx_attr *attr, struct fid_ep **tx_ep,
|
||||
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
|
||||
void *context);
|
||||
int fi_no_rx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_rx_ctx_attr *attr, struct fid_ep **rx_ep,
|
||||
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
|
||||
void *context);
|
||||
|
||||
/*
|
||||
@ -267,6 +267,7 @@ static struct fi_ops_msg X = {
|
||||
.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,
|
||||
@ -285,6 +286,8 @@ 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 = {
|
||||
@ -362,6 +365,7 @@ static struct fi_ops_rma X = {
|
||||
.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,
|
||||
@ -383,6 +387,8 @@ ssize_t fi_no_rma_inject(struct fid_ep *ep, const void *buf, size_t len,
|
||||
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 = {
|
||||
@ -395,6 +401,7 @@ static struct fi_ops_tagged X = {
|
||||
.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,
|
||||
};
|
||||
*/
|
||||
@ -415,6 +422,8 @@ 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);
|
||||
|
||||
|
@ -101,9 +101,9 @@ static inline void rbwrite(struct ringbuf *rb, const void *buf, size_t len)
|
||||
|
||||
endlen = rb->size - (rb->wpos & rb->size_mask);
|
||||
if (len <= endlen) {
|
||||
memcpy(rb->buf + (rb->wpos & rb->size_mask), buf, len);
|
||||
memcpy((char*)rb->buf + (rb->wpos & rb->size_mask), buf, len);
|
||||
} else {
|
||||
memcpy(rb->buf + (rb->wpos & rb->size_mask), buf, endlen);
|
||||
memcpy((char*)rb->buf + (rb->wpos & rb->size_mask), buf, endlen);
|
||||
memcpy(rb->buf, buf, len - endlen);
|
||||
}
|
||||
rb->wpos += len;
|
||||
@ -125,9 +125,9 @@ static inline void rbpeek(struct ringbuf *rb, void *buf, size_t len)
|
||||
|
||||
endlen = rb->size - (rb->rcnt & rb->size_mask);
|
||||
if (len <= endlen) {
|
||||
memcpy(buf, rb->buf + (rb->rcnt & rb->size_mask), len);
|
||||
memcpy(buf, (char*)rb->buf + (rb->rcnt & rb->size_mask), len);
|
||||
} else {
|
||||
memcpy(buf, rb->buf + (rb->rcnt & rb->size_mask), endlen);
|
||||
memcpy(buf, (char*)rb->buf + (rb->rcnt & rb->size_mask), endlen);
|
||||
memcpy(buf, rb->buf, len - endlen);
|
||||
}
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ typedef struct fid *fid_t;
|
||||
#define FI_DYNAMIC_MR (1ULL << 7)
|
||||
#define FI_NAMED_RX_CTX (1ULL << 8)
|
||||
#define FI_BUFFERED_RECV (1ULL << 9)
|
||||
#define FI_DIRECTED_RECV (1ULL << 10)
|
||||
|
||||
/*
|
||||
* Flags
|
||||
@ -144,7 +145,7 @@ struct fi_ioc {
|
||||
* Format for transport addresses: sendto, writeto, etc.
|
||||
*/
|
||||
enum {
|
||||
FI_ADDR_UNSPEC, /* void * */
|
||||
FI_FORMAT_UNSPEC, /* void * */
|
||||
FI_SOCKADDR, /* struct sockaddr */
|
||||
FI_SOCKADDR_IN, /* struct sockaddr_in */
|
||||
FI_SOCKADDR_IN6, /* struct sockaddr_in6 */
|
||||
@ -152,6 +153,7 @@ enum {
|
||||
FI_ADDR_PSMX, /* uint64_t */
|
||||
};
|
||||
|
||||
#define FI_ADDR_UNSPEC UINT64_MAX
|
||||
#define FI_ADDR_NOTAVAIL UINT64_MAX
|
||||
#define FI_SHARED_CONTEXT UINT64_MAX
|
||||
typedef uint64_t fi_addr_t;
|
||||
@ -208,7 +210,7 @@ enum {
|
||||
#define FI_PROV_MR_ATTR (1ULL << 2)
|
||||
#define FI_MSG_PREFIX (1ULL << 3)
|
||||
|
||||
struct fi_tx_ctx_attr {
|
||||
struct fi_tx_attr {
|
||||
uint64_t caps;
|
||||
uint64_t mode;
|
||||
uint64_t op_flags;
|
||||
@ -218,7 +220,7 @@ struct fi_tx_ctx_attr {
|
||||
size_t iov_limit;
|
||||
};
|
||||
|
||||
struct fi_rx_ctx_attr {
|
||||
struct fi_rx_attr {
|
||||
uint64_t caps;
|
||||
uint64_t mode;
|
||||
uint64_t op_flags;
|
||||
@ -277,8 +279,8 @@ struct fi_info {
|
||||
void *src_addr;
|
||||
void *dest_addr;
|
||||
fi_connreq_t connreq;
|
||||
struct fi_tx_ctx_attr *tx_attr;
|
||||
struct fi_rx_ctx_attr *rx_attr;
|
||||
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;
|
||||
@ -334,7 +336,7 @@ struct fi_ops_fabric {
|
||||
size_t size;
|
||||
int (*domain)(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_domain **dom, void *context);
|
||||
int (*endpoint)(struct fid_fabric *fabric, struct fi_info *info,
|
||||
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);
|
||||
|
@ -128,10 +128,10 @@ struct fi_ops_domain {
|
||||
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_ctx_attr *attr, struct fid_stx **stx,
|
||||
struct fi_tx_attr *attr, struct fid_stx **stx,
|
||||
void *context);
|
||||
int (*srx_ctx)(struct fid_domain *domain,
|
||||
struct fi_rx_ctx_attr *attr, struct fid_ep **rx_ep,
|
||||
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
|
||||
void *context);
|
||||
};
|
||||
|
||||
|
@ -72,10 +72,10 @@ struct fi_ops_ep {
|
||||
int (*setopt)(fid_t fid, int level, int optname,
|
||||
const void *optval, size_t optlen);
|
||||
int (*tx_ctx)(struct fid_sep *sep, int index,
|
||||
struct fi_tx_ctx_attr *attr, struct fid_ep **tx_ep,
|
||||
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
|
||||
void *context);
|
||||
int (*rx_ctx)(struct fid_sep *sep, int index,
|
||||
struct fi_rx_ctx_attr *attr, struct fid_ep **rx_ep,
|
||||
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
|
||||
void *context);
|
||||
};
|
||||
|
||||
@ -97,6 +97,8 @@ struct fi_ops_msg {
|
||||
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;
|
||||
@ -144,10 +146,10 @@ struct fid_sep {
|
||||
#ifndef FABRIC_DIRECT
|
||||
|
||||
static inline int
|
||||
fi_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
fi_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context)
|
||||
{
|
||||
return fabric->ops->endpoint(fabric, info, pep, context);
|
||||
return fabric->ops->passive_ep(fabric, info, pep, context);
|
||||
}
|
||||
|
||||
static inline int
|
||||
@ -202,28 +204,28 @@ fi_getopt(fid_t fid, int level, int optname,
|
||||
}
|
||||
|
||||
static inline int
|
||||
fi_tx_context(struct fid_sep *sep, int index, struct fi_tx_ctx_attr *attr,
|
||||
fi_tx_context(struct fid_sep *sep, int index, struct fi_tx_attr *attr,
|
||||
struct fid_ep **tx_ep, void *context)
|
||||
{
|
||||
return sep->ops->tx_ctx(sep, index, attr, tx_ep, context);
|
||||
}
|
||||
|
||||
static inline int
|
||||
fi_rx_context(struct fid_sep *sep, int index, struct fi_rx_ctx_attr *attr,
|
||||
fi_rx_context(struct fid_sep *sep, int index, struct fi_rx_attr *attr,
|
||||
struct fid_ep **rx_ep, void *context)
|
||||
{
|
||||
return sep->ops->rx_ctx(sep, index, attr, rx_ep, context);
|
||||
}
|
||||
|
||||
static inline int
|
||||
fi_stx_context(struct fid_domain *domain, struct fi_tx_ctx_attr *attr,
|
||||
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_ctx_attr *attr,
|
||||
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);
|
||||
@ -282,6 +284,13 @@ fi_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
|
||||
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
|
||||
|
@ -87,6 +87,8 @@ struct fi_ops_rma {
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
@ -150,6 +152,13 @@ fi_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
|
||||
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
|
||||
|
@ -75,6 +75,8 @@ struct fi_ops_tagged {
|
||||
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);
|
||||
ssize_t (*search)(struct fid_ep *ep, uint64_t *tag, uint64_t ignore,
|
||||
uint64_t flags, fi_addr_t *src_addr, size_t *len, void *context);
|
||||
};
|
||||
@ -140,6 +142,13 @@ fi_tsenddata(struct fid_ep *ep, const void *buf, size_t len, void *desc,
|
||||
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);
|
||||
}
|
||||
|
||||
static inline ssize_t
|
||||
fi_tsearch(struct fid_ep *ep, uint64_t *tag, uint64_t ignore, uint64_t flags,
|
||||
fi_addr_t *src_addr, size_t *len, void *context)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH fabric 7 "2014\-12\-02" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fabric 7 "2014\-12\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
Fabric Interface Library
|
||||
@ -194,8 +194,7 @@ Connectionless endpoints must support all relevant data transfer
|
||||
routines.
|
||||
(send / recv / write / read / etc.)
|
||||
.IP \[bu] 2
|
||||
Connectionless endpoints must support the CM interfaces for getname,
|
||||
getpeer, and connect.
|
||||
Connectionless endpoints must support the CM interface getname.
|
||||
.IP \[bu] 2
|
||||
Connectionless endpoints that support multicast operations must support
|
||||
the CM interfaces join and leave.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH fi_cm 3 "2014\-12\-03" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_cm 3 "2014\-12\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_cm - Connection management operations
|
||||
@ -64,9 +64,8 @@ exchange.
|
||||
\f[I]context\f[] : User context associated with the request.
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Connection management functions are used to connect an endpoint to a
|
||||
remote address (in the case of a connectionless endpoint) or a peer
|
||||
endpoint (for connection-oriented endpoints).
|
||||
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
|
||||
@ -81,12 +80,8 @@ The backlog is initialized based on administrative configuration values,
|
||||
but may be adjusted through the fi_control call.
|
||||
.SS fi_connect
|
||||
.PP
|
||||
For a connection-oriented endpoint, fi_connect initiates a connection
|
||||
request to the destination address.
|
||||
For a connectionless endpoint, fi_connect specifies the destination
|
||||
address that future data transfer operations will target.
|
||||
This avoids the need for the user to specify the address as part of the
|
||||
data transfer.
|
||||
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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH fi_cq 3 "2014\-11\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_cq 3 "2014\-12\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_cq - Completion queue operations
|
||||
@ -36,7 +36,7 @@ int\ fi_cq_readfrom(struct\ fid_cq\ *cq,\ void\ *buf,\ size_t\ count,
|
||||
\ \ \ \ fi_addr_t\ *src_addr);
|
||||
|
||||
int\ fi_cq_readerr(struct\ fid_cq\ *cq,\ struct\ fi_cq_err_entry\ *buf,
|
||||
\ \ \ \ size_t\ len,\ uint64_t\ flags);
|
||||
\ \ \ \ uint64_t\ flags);
|
||||
|
||||
int\ fi_cq_write(struct\ fid_cq\ *cq,\ const\ void\ *buf,\ size_t\ len);
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
.TH fi_endpoint 3 "2014\-11\-24" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_endpoint 3 "2014\-12\-04" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_endpoint - Fabric endpoint operations
|
||||
.TP
|
||||
.B fi_endpoint / fi_pendpoint / fi_close
|
||||
.B fi_endpoint / fi_scalable_ep / fi_passive_ep / fi_close
|
||||
Allocate or close an endpoint.
|
||||
.RS
|
||||
.RE
|
||||
@ -62,23 +62,23 @@ int\ fi_endpoint(struct\ fid_domain\ *domain,\ struct\ fi_info\ *info,
|
||||
int\ fi_scalable_ep(struct\ fid_domain\ *domain,\ struct\ fi_info\ *info,
|
||||
\ \ \ \ struct\ fid_sep\ **ep,\ void\ *context);
|
||||
|
||||
int\ fi_pendpoint(struct\ fi_fabric\ *fabric,\ struct\ fi_info\ *info,
|
||||
int\ fi_passive_ep(struct\ fi_fabric\ *fabric,\ struct\ fi_info\ *info,
|
||||
\ \ \ \ struct\ fid_pep\ **pep,\ void\ *context);
|
||||
|
||||
int\ fi_tx_context(struct\ fid_ep\ *ep,\ int\ index,
|
||||
\ \ \ \ struct\ fi_tx_ctx_attr\ *attr,\ struct\ fid_ep\ **tx_ep,
|
||||
\ \ \ \ struct\ fi_tx_attr\ *attr,\ struct\ fid_ep\ **tx_ep,
|
||||
\ \ \ \ void\ *context);
|
||||
|
||||
int\ fi_rx_context(struct\ fid_ep\ *ep,\ int\ index,
|
||||
\ \ \ \ struct\ fi_rx_ctx_attr\ *attr,\ struct\ fid_ep\ **rx_ep,
|
||||
\ \ \ \ struct\ fi_rx_attr\ *attr,\ struct\ fid_ep\ **rx_ep,
|
||||
\ \ \ \ void\ *context);
|
||||
|
||||
int\ fi_stx_context(struct\ fid_domain\ *domain,
|
||||
\ \ \ \ struct\ fi_tx_ctx_attr\ *attr,\ struct\ fid_stx\ **stx,
|
||||
\ \ \ \ struct\ fi_tx_attr\ *attr,\ struct\ fid_stx\ **stx,
|
||||
\ \ \ \ void\ *context);
|
||||
|
||||
int\ fi_srx_context(struct\ fid_domain\ *domain,
|
||||
\ \ \ \ struct\ fi_rx_ctx_attr\ *attr,\ struct\ fid_ep\ **rx_ep,
|
||||
\ \ \ \ struct\ fi_rx_attr\ *attr,\ struct\ fid_ep\ **rx_ep,
|
||||
\ \ \ \ void\ *context);
|
||||
|
||||
int\ fi_close(struct\ fid\ *ep);
|
||||
@ -171,10 +171,10 @@ The behavior of an endpoint may be adjusted by setting its control data
|
||||
and protocol options.
|
||||
This allows the underlying provider to redirect function calls to
|
||||
implementations optimized to meet the desired application behavior.
|
||||
.SS fi_endpoint / fi_pendpoint / fi_scalable_ep
|
||||
.SS fi_endpoint / fi_passive_ep / fi_scalable_ep
|
||||
.PP
|
||||
fi_endpoint allocates a new active endpoint.
|
||||
fi_pendpoint allocates a new passive endpoint.
|
||||
fi_passive_ep allocates a new passive endpoint.
|
||||
fi_scalable_ep allocates a scalable endpoint.
|
||||
The properties and behavior of the endpoint are defined based on the
|
||||
provided struct fi_info.
|
||||
@ -661,7 +661,7 @@ through the attr parameter, if provided.
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
struct\ fi_tx_ctx_attr\ {
|
||||
struct\ fi_tx_attr\ {
|
||||
\ \ \ \ uint64_t\ \ caps;
|
||||
\ \ \ \ uint64_t\ \ mode;
|
||||
\ \ \ \ uint64_t\ \ op_flags;
|
||||
@ -742,7 +742,7 @@ through the attr parameter, if provided.
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
struct\ fi_rx_ctx_attr\ {
|
||||
struct\ fi_rx_attr\ {
|
||||
\ \ \ \ uint64_t\ \ caps;
|
||||
\ \ \ \ uint64_t\ \ mode;
|
||||
\ \ \ \ uint64_t\ \ op_flags;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH fi_fabric 3 "2014-11-14" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_fabric 3 "2014\-12\-04" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_fabric - Fabric domain operations
|
||||
@ -70,9 +70,9 @@ 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_ctx_attr
|
||||
\f[I]FI_TYPE_TX_ATTR\f[] : struct fi_tx_attr
|
||||
.PP
|
||||
\f[I]FI_TYPE_RX_ATTR\f[] : struct fi_rx_ctx_attr
|
||||
\f[I]FI_TYPE_RX_ATTR\f[] : struct fi_rx_attr
|
||||
.PP
|
||||
\f[I]FI_TYPE_EP_ATTR\f[] : struct fi_ep_attr
|
||||
.PP
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH fi_getinfo 3 "2014\-11\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_getinfo 3 "2014\-12\-08" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_getinfo / fi_freeinfo - Obtain / free fabric interface information
|
||||
@ -97,8 +97,8 @@ struct\ fi_info\ {
|
||||
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *src_addr;
|
||||
\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *dest_addr;
|
||||
\ \ \ \ fi_connreq_t\ \ \ \ \ \ \ \ \ \ connreq;
|
||||
\ \ \ \ struct\ fi_tx_ctx_attr\ *tx_attr;
|
||||
\ \ \ \ struct\ fi_rx_ctx_attr\ *rx_attr;
|
||||
\ \ \ \ 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;
|
||||
@ -289,6 +289,12 @@ is posted are lost.
|
||||
Applications may access endpoint options (getopt/setopt) to determine
|
||||
the size of available buffered receive space.
|
||||
.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_INJECT\f[] : Indicates that the endpoint be able to support the
|
||||
FI_INJECT flag on data transfer operations and the \[aq]inject\[aq] data
|
||||
transfer calls.
|
||||
@ -344,8 +350,8 @@ The FI_REMOTE_CQ_DATA indicates that an endpoint must support the
|
||||
FI_REMOTE_CQ_DATA flag on data transfer operations.
|
||||
The minimum supported size of remote CQ data that an endpoint with this
|
||||
capability must support is 4-bytes.
|
||||
Applications may access endpoint options (getopt/setopt) to determine
|
||||
remote CQ data limits.
|
||||
Applications may check the domain attributes to determine remote CQ data
|
||||
limits.
|
||||
.PP
|
||||
\f[I]FI_REMOTE_SIGNAL\f[] : Indicates that the endpoint support the
|
||||
FI_REMOTE_SIGNAL flag on data transfer operations.
|
||||
@ -486,15 +492,15 @@ In some cases, a selected addressing format may need to be translated or
|
||||
mapped into into an address which is native to the fabric.
|
||||
See \f[C]fi_av\f[](3).
|
||||
.PP
|
||||
\f[I]FI_ADDR_UNSPEC\f[] : FI_ADDR_UNSPEC indicates that a provider
|
||||
\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_ADDR_UNSPEC should be prepared to be treat
|
||||
Applications that select FI_FORMAT_UNSPEC should be prepared to be treat
|
||||
returned addressing data as opaque.
|
||||
FI_ADDR_UNSPEC targets apps which make use of an out of band address
|
||||
FI_FORMAT_UNSPEC targets apps which make use of an out of band address
|
||||
exchange.
|
||||
Applications which use FI_ADDR_UNSPEC may use fi_getname() to obtain a
|
||||
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.
|
||||
|
1
opal/mca/common/libfabric/libfabric/man/fi_inject_write.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_inject_write.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_injectdata.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_injectdata.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_msg.3
|
@ -1,4 +1,4 @@
|
||||
.TH fi_msg 3 "2014\-12\-02" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_msg 3 "2014\-12\-08" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_msg - Message data transfer operations
|
||||
@ -68,7 +68,9 @@ Ignored for connected endpoints.
|
||||
.PP
|
||||
\f[I]src_addr\f[] : Source address to receive from for connectionless
|
||||
transfers.
|
||||
Ignored for connected endpoints.
|
||||
Applies only to connectionless endpoints with the FI_DIRECTED_RECV
|
||||
capability enabled, otherwise this field is ignored.
|
||||
If set to FI_ADDR_UNSPEC, any source address may match.
|
||||
.PP
|
||||
\f[I]msg\f[] : Message descriptor for send and receive operations.
|
||||
.PP
|
||||
|
1
opal/mca/common/libfabric/libfabric/man/fi_read.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_read.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_readmsg.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_readmsg.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_readv.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_readv.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
@ -1,4 +1,4 @@
|
||||
.TH fi_tagged 3 "2014\-12\-02" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.TH fi_tagged 3 "2014\-12\-08" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@"
|
||||
.SH NAME
|
||||
.PP
|
||||
fi_tagged - Tagged data transfer operations
|
||||
@ -83,7 +83,9 @@ Ignored for connected endpoints.
|
||||
.PP
|
||||
\f[I]src_addr\f[] : Source address to receive from for connectionless
|
||||
transfers.
|
||||
Ignored for connected endpoints.
|
||||
Applies only to connectionless endpoints with the FI_DIRECTED_RECV
|
||||
capability enabled, otherwise this field is ignored.
|
||||
If set to FI_ADDR_UNSPEC, any source address may match.
|
||||
.PP
|
||||
\f[I]msg\f[] : Message descriptor for send and receive operations.
|
||||
.PP
|
||||
|
1
opal/mca/common/libfabric/libfabric/man/fi_tinjectdata.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_tinjectdata.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_tagged.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_write.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_write.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_writedata.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_writedata.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_writemsg.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_writemsg.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
1
opal/mca/common/libfabric/libfabric/man/fi_writev.3
Обычный файл
1
opal/mca/common/libfabric/libfabric/man/fi_writev.3
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/fi_rma.3
|
@ -519,9 +519,6 @@ struct psmx_fid_ep {
|
||||
int recv_cq_event_flag:1;
|
||||
uint64_t flags;
|
||||
uint64_t caps;
|
||||
int connected;
|
||||
psm_epid_t peer_psm_epid;
|
||||
psm_epaddr_t peer_psm_epaddr;
|
||||
struct fi_context nocomp_send_context;
|
||||
struct fi_context nocomp_recv_context;
|
||||
struct fi_context sendimm_context;
|
||||
|
@ -796,8 +796,6 @@ ssize_t _psmx_atomic_write(struct fid_ep *ep,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -984,8 +982,6 @@ ssize_t _psmx_atomic_readwrite(struct fid_ep *ep,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -1172,8 +1168,6 @@ ssize_t _psmx_atomic_compwrite(struct fid_ep *ep,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
|
@ -51,77 +51,15 @@ static int psmx_cm_getname(fid_t fid, void *addr, size_t *addrlen)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int psmx_cm_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen)
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (!ep_priv->domain)
|
||||
return -EBADF;
|
||||
|
||||
if (!ep_priv->connected)
|
||||
return -ENOTCONN;
|
||||
|
||||
if (*addrlen < sizeof(psm_epid_t))
|
||||
return -FI_ETOOSMALL;
|
||||
|
||||
*(psm_epid_t *)addr = ep_priv->peer_psm_epid;
|
||||
*addrlen = sizeof(psm_epid_t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int psmx_cm_connect(struct fid_ep *ep, const void *addr,
|
||||
const void *param, size_t paramlen)
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
psm_epid_t epid;
|
||||
psm_epaddr_t epaddr;
|
||||
int err;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (!ep_priv->domain)
|
||||
return -EBADF;
|
||||
|
||||
epid = (psm_epid_t)addr;
|
||||
err = psmx_epid_to_epaddr(ep_priv->domain, epid, &epaddr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
ep_priv->connected = 1;
|
||||
ep_priv->peer_psm_epid = epid;
|
||||
ep_priv->peer_psm_epaddr = epaddr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int psmx_cm_shutdown(struct fid_ep *ep, uint64_t flags)
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (!ep_priv->domain)
|
||||
return -EBADF;
|
||||
|
||||
if (!ep_priv->connected)
|
||||
return -ENOTCONN;
|
||||
|
||||
ep_priv->connected = 0;
|
||||
ep_priv->peer_psm_epid = 0;
|
||||
ep_priv->peer_psm_epaddr = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct fi_ops_cm psmx_cm_ops = {
|
||||
.size = sizeof(struct fi_ops_cm),
|
||||
.getname = psmx_cm_getname,
|
||||
.getpeer = psmx_cm_getpeer,
|
||||
.connect = psmx_cm_connect,
|
||||
.getpeer = fi_no_getpeer,
|
||||
.connect = fi_no_connect,
|
||||
.listen = fi_no_listen,
|
||||
.accept = fi_no_accept,
|
||||
.reject = fi_no_reject,
|
||||
.shutdown = psmx_cm_shutdown,
|
||||
.shutdown = fi_no_shutdown,
|
||||
.join = fi_no_join,
|
||||
.leave = fi_no_leave,
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ static int psmx_getinfo(uint32_t version, const char *node, const char *service,
|
||||
return -FI_ENODATA;
|
||||
}
|
||||
|
||||
if (node) {
|
||||
if (node && !(flags & FI_SOURCE)) {
|
||||
if (service)
|
||||
dest_addr = psmx_resolve_name(node, atoi(service));
|
||||
else
|
||||
|
@ -48,8 +48,6 @@ ssize_t _psmx_recv(struct fid_ep *ep, void *buf, size_t len,
|
||||
size_t idx;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (ep_priv->connected)
|
||||
src_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -209,8 +207,6 @@ ssize_t _psmx_send(struct fid_ep *ep, const void *buf, size_t len,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -363,5 +359,6 @@ struct fi_ops_msg psmx_msg_ops = {
|
||||
.sendmsg = psmx_sendmsg,
|
||||
.inject = psmx_inject,
|
||||
.senddata = fi_no_msg_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
|
@ -344,8 +344,6 @@ static ssize_t _psmx_recv2(struct fid_ep *ep, void *buf, size_t len,
|
||||
size_t idx;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (ep_priv->connected)
|
||||
src_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (src_addr) {
|
||||
av = ep_priv->av;
|
||||
@ -494,8 +492,6 @@ static ssize_t _psmx_send2(struct fid_ep *ep, const void *buf, size_t len,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (!buf)
|
||||
return -EINVAL;
|
||||
@ -630,5 +626,6 @@ struct fi_ops_msg psmx_msg2_ops = {
|
||||
.sendmsg = psmx_sendmsg2,
|
||||
.inject = psmx_inject2,
|
||||
.senddata = fi_no_msg_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
|
@ -451,8 +451,6 @@ ssize_t _psmx_read(struct fid_ep *ep, void *buf, size_t len,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
src_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -622,8 +620,6 @@ ssize_t _psmx_write(struct fid_ep *ep, const void *buf, size_t len,
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
assert(ep_priv->domain);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -836,5 +832,6 @@ struct fi_ops_rma psmx_rma_ops = {
|
||||
.writemsg = psmx_writemsg,
|
||||
.inject = psmx_inject,
|
||||
.writedata = psmx_writedata,
|
||||
.injectdata = fi_no_rma_injectdata,
|
||||
};
|
||||
|
||||
|
@ -45,8 +45,6 @@ ssize_t _psmx_tagged_recv(struct fid_ep *ep, void *buf, size_t len,
|
||||
int err;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (ep_priv->connected)
|
||||
src_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (src_addr)
|
||||
psmx_debug("%s: warning: src_addr is currently ignored.", __func__);
|
||||
@ -397,7 +395,6 @@ ssize_t _psmx_tagged_send(struct fid_ep *ep, const void *buf, size_t len,
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
struct psmx_fid_av *av;
|
||||
int send_flag = 0;
|
||||
psm_epaddr_t psm_epaddr;
|
||||
psm_mq_req_t psm_req;
|
||||
uint64_t psm_tag;
|
||||
@ -407,8 +404,6 @@ ssize_t _psmx_tagged_send(struct fid_ep *ep, const void *buf, size_t len,
|
||||
size_t idx;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
if (ep_priv->connected)
|
||||
dest_addr = (fi_addr_t) ep_priv->peer_psm_epaddr;
|
||||
|
||||
if (flags & FI_TRIGGER) {
|
||||
struct psmx_trigger *trigger;
|
||||
@ -482,7 +477,7 @@ ssize_t _psmx_tagged_send(struct fid_ep *ep, const void *buf, size_t len,
|
||||
}
|
||||
}
|
||||
|
||||
err = psm_mq_isend(ep_priv->domain->psm_mq, psm_epaddr, send_flag,
|
||||
err = psm_mq_isend(ep_priv->domain->psm_mq, psm_epaddr, 0,
|
||||
psm_tag, buf, len, (void*)fi_context, &psm_req);
|
||||
|
||||
if (err != PSM_OK)
|
||||
@ -628,6 +623,75 @@ ssize_t psmx_tagged_send_no_event_av_table(struct fid_ep *ep, const void *buf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t psmx_tagged_inject_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len,
|
||||
fi_addr_t dest_addr, uint64_t tag)
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
psm_epaddr_t psm_epaddr;
|
||||
psm_mq_req_t psm_req;
|
||||
uint64_t psm_tag;
|
||||
struct fi_context *fi_context;
|
||||
int err;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
|
||||
psm_epaddr = (psm_epaddr_t) dest_addr;
|
||||
psm_tag = tag & (~ep_priv->domain->reserved_tag_bits);
|
||||
|
||||
fi_context = malloc(sizeof(*fi_context) + len);
|
||||
if (!fi_context)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy((void *)fi_context + sizeof(*fi_context), buf, len);
|
||||
buf = (void *)fi_context + sizeof(*fi_context);
|
||||
|
||||
PSMX_CTXT_TYPE(fi_context) = PSMX_INJECT_CONTEXT;
|
||||
PSMX_CTXT_EP(fi_context) = ep_priv;
|
||||
|
||||
err = psm_mq_isend(ep_priv->domain->psm_mq, psm_epaddr, 0,
|
||||
psm_tag, buf, len, (void*)fi_context, &psm_req);
|
||||
|
||||
return psmx_errno(err);
|
||||
}
|
||||
|
||||
ssize_t psmx_tagged_inject_no_flag_av_table(struct fid_ep *ep, const void *buf, size_t len,
|
||||
fi_addr_t dest_addr, uint64_t tag)
|
||||
{
|
||||
struct psmx_fid_ep *ep_priv;
|
||||
struct psmx_fid_av *av;
|
||||
psm_epaddr_t psm_epaddr;
|
||||
psm_mq_req_t psm_req;
|
||||
uint64_t psm_tag;
|
||||
struct fi_context *fi_context;
|
||||
int err;
|
||||
size_t idx;
|
||||
|
||||
ep_priv = container_of(ep, struct psmx_fid_ep, ep);
|
||||
|
||||
av = ep_priv->av;
|
||||
idx = (size_t)dest_addr;
|
||||
if (idx >= av->last)
|
||||
return -EINVAL;
|
||||
|
||||
psm_epaddr = av->psm_epaddrs[idx];
|
||||
psm_tag = tag & (~ep_priv->domain->reserved_tag_bits);
|
||||
|
||||
fi_context = malloc(sizeof(*fi_context) + len);
|
||||
if (!fi_context)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy((void *)fi_context + sizeof(*fi_context), buf, len);
|
||||
buf = (void *)fi_context + sizeof(*fi_context);
|
||||
|
||||
PSMX_CTXT_TYPE(fi_context) = PSMX_INJECT_CONTEXT;
|
||||
PSMX_CTXT_EP(fi_context) = ep_priv;
|
||||
|
||||
err = psm_mq_isend(ep_priv->domain->psm_mq, psm_epaddr, 0,
|
||||
psm_tag, buf, len, (void*)fi_context, &psm_req);
|
||||
|
||||
return psmx_errno(err);
|
||||
}
|
||||
|
||||
static ssize_t psmx_tagged_send(struct fid_ep *ep, const void *buf, size_t len,
|
||||
void *desc, fi_addr_t dest_addr,
|
||||
uint64_t tag, void *context)
|
||||
@ -847,6 +911,7 @@ struct fi_ops_tagged psmx_tagged_ops = {
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -859,8 +924,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_flag_av_map = {
|
||||
.send = psmx_tagged_send_no_flag_av_map,
|
||||
.sendv = psmx_tagged_sendv_no_flag_av_map,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_map,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -873,8 +939,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_flag_av_table = {
|
||||
.send = psmx_tagged_send_no_flag_av_table,
|
||||
.sendv = psmx_tagged_sendv_no_flag_av_table,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_table,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -887,8 +954,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_event_av_map = {
|
||||
.send = psmx_tagged_send_no_event_av_map,
|
||||
.sendv = psmx_tagged_sendv_no_event_av_map,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_map,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -901,8 +969,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_event_av_table = {
|
||||
.send = psmx_tagged_send_no_event_av_table,
|
||||
.sendv = psmx_tagged_sendv_no_event_av_table,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_table,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -915,8 +984,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_send_event_av_map = {
|
||||
.send = psmx_tagged_send_no_event_av_map,
|
||||
.sendv = psmx_tagged_sendv_no_event_av_map,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_map,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -929,8 +999,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_send_event_av_table = {
|
||||
.send = psmx_tagged_send_no_event_av_table,
|
||||
.sendv = psmx_tagged_sendv_no_event_av_table,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_table,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -943,8 +1014,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_recv_event_av_map = {
|
||||
.send = psmx_tagged_send_no_flag_av_map,
|
||||
.sendv = psmx_tagged_sendv_no_flag_av_map,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_map,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
@ -957,8 +1029,9 @@ struct fi_ops_tagged psmx_tagged_ops_no_recv_event_av_table = {
|
||||
.send = psmx_tagged_send_no_flag_av_table,
|
||||
.sendv = psmx_tagged_sendv_no_flag_av_table,
|
||||
.sendmsg = psmx_tagged_sendmsg,
|
||||
.inject = psmx_tagged_inject,
|
||||
.inject = psmx_tagged_inject_no_flag_av_table,
|
||||
.senddata = fi_no_tagged_senddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = psmx_tagged_search,
|
||||
};
|
||||
|
||||
|
@ -327,8 +327,8 @@ struct sock_ep {
|
||||
|
||||
struct fi_info info;
|
||||
struct fi_ep_attr ep_attr;
|
||||
struct fi_tx_ctx_attr tx_attr;
|
||||
struct fi_rx_ctx_attr rx_attr;
|
||||
struct fi_tx_attr tx_attr;
|
||||
struct fi_rx_attr rx_attr;
|
||||
|
||||
enum fi_ep_type ep_type;
|
||||
struct sockaddr_in *src_addr;
|
||||
@ -407,7 +407,7 @@ struct sock_rx_ctx {
|
||||
struct dlist_entry ep_list;
|
||||
fastlock_t lock;
|
||||
|
||||
struct fi_rx_ctx_attr attr;
|
||||
struct fi_rx_attr attr;
|
||||
};
|
||||
|
||||
struct sock_tx_ctx {
|
||||
@ -446,7 +446,7 @@ struct sock_tx_ctx {
|
||||
struct dlist_entry ep_list;
|
||||
fastlock_t lock;
|
||||
|
||||
struct fi_tx_ctx_attr attr;
|
||||
struct fi_tx_attr attr;
|
||||
};
|
||||
|
||||
#define SOCK_WIRE_PROTO_VERSION (0)
|
||||
@ -544,8 +544,8 @@ int sock_verify_info(struct fi_info *hints);
|
||||
int sock_verify_fabric_attr(struct fi_fabric_attr *attr);
|
||||
int sock_verify_domain_attr(struct fi_domain_attr *attr);
|
||||
int sock_rdm_verify_ep_attr(struct fi_ep_attr *ep_attr,
|
||||
struct fi_tx_ctx_attr *tx_attr,
|
||||
struct fi_rx_ctx_attr *rx_attr);
|
||||
struct fi_tx_attr *tx_attr,
|
||||
struct fi_rx_attr *rx_attr);
|
||||
|
||||
|
||||
int sock_rdm_getinfo(uint32_t version, const char *node, const char *service,
|
||||
@ -588,7 +588,7 @@ int sock_rdm_ep(struct fid_domain *domain, struct fi_info *info,
|
||||
struct fid_ep **ep, void *context);
|
||||
int sock_dgram_ep(struct fid_domain *domain, struct fi_info *info,
|
||||
struct fid_ep **ep, void *context);
|
||||
int sock_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
int sock_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context);
|
||||
|
||||
|
||||
@ -596,13 +596,13 @@ int sock_ep_connect(struct fid_ep *ep, const void *addr,
|
||||
const void *param, size_t paramlen);
|
||||
|
||||
|
||||
struct sock_rx_ctx *sock_rx_ctx_alloc(struct fi_rx_ctx_attr *attr,
|
||||
struct sock_rx_ctx *sock_rx_ctx_alloc(struct fi_rx_attr *attr,
|
||||
void *context);
|
||||
void sock_rx_ctx_add_ep(struct sock_rx_ctx *rx_ctx, struct sock_ep *ep);
|
||||
void sock_rx_ctx_free(struct sock_rx_ctx *rx_ctx);
|
||||
|
||||
|
||||
struct sock_tx_ctx *sock_tx_ctx_alloc(struct fi_tx_ctx_attr *attr,
|
||||
struct sock_tx_ctx *sock_tx_ctx_alloc(struct fi_tx_attr *attr,
|
||||
void *context);
|
||||
void sock_tx_ctx_add_ep(struct sock_tx_ctx *tx_ctx, struct sock_ep *ep);
|
||||
void sock_tx_ctx_free(struct sock_tx_ctx *tx_ctx);
|
||||
|
@ -269,7 +269,7 @@ fi_addr_t _sock_av_lookup(struct sock_av *av, struct sockaddr *addr)
|
||||
}
|
||||
fprintf(stderr, "[sock] failed to lookup src_addr in av table\n");
|
||||
}
|
||||
return FI_ADDR_UNSPEC;
|
||||
return FI_ADDR_NOTAVAIL;
|
||||
}
|
||||
|
||||
/* place holder */
|
||||
|
@ -282,7 +282,7 @@ ssize_t sock_cq_write(struct fid_cq *cq, const void *buf, size_t len)
|
||||
if(!(sock_cq->attr.flags & FI_WRITE))
|
||||
return -FI_EINVAL;
|
||||
|
||||
return _sock_cq_write(sock_cq, FI_ADDR_UNSPEC, buf, len);
|
||||
return _sock_cq_write(sock_cq, FI_ADDR_NOTAVAIL, buf, len);
|
||||
}
|
||||
|
||||
ssize_t sock_cq_writeerr(struct fid_cq *cq, struct fi_cq_err_entry *buf,
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "sock_util.h"
|
||||
|
||||
|
||||
struct sock_rx_ctx *sock_rx_ctx_alloc(struct fi_rx_ctx_attr *attr, void *context)
|
||||
struct sock_rx_ctx *sock_rx_ctx_alloc(struct fi_rx_attr *attr, void *context)
|
||||
{
|
||||
struct sock_rx_ctx *rx_ctx;
|
||||
rx_ctx = calloc(1, sizeof(*rx_ctx));
|
||||
@ -77,7 +77,7 @@ void sock_rx_ctx_free(struct sock_rx_ctx *rx_ctx)
|
||||
free(rx_ctx);
|
||||
}
|
||||
|
||||
struct sock_tx_ctx *sock_tx_ctx_alloc(struct fi_tx_ctx_attr *attr, void *context)
|
||||
struct sock_tx_ctx *sock_tx_ctx_alloc(struct fi_tx_attr *attr, void *context)
|
||||
{
|
||||
struct sock_tx_ctx *tx_ctx;
|
||||
|
||||
|
@ -271,7 +271,7 @@ static struct fi_info* sockd_dupinfo(struct fi_info *hints)
|
||||
fi->dest_addrlen = 0;
|
||||
}
|
||||
|
||||
fi->tx_attr = calloc(1, sizeof (struct fi_tx_ctx_attr));
|
||||
fi->tx_attr = calloc(1, sizeof (struct fi_tx_attr));
|
||||
if (!fi->tx_attr) {
|
||||
goto err7;
|
||||
}
|
||||
@ -515,7 +515,7 @@ static int sockd_ep_setopt(fid_t fid, int level, int optname,
|
||||
}
|
||||
|
||||
static int sockd_ep_tx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_tx_ctx_attr *attr, struct fid_ep **tx_ep,
|
||||
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
|
||||
void *context)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
@ -524,7 +524,7 @@ static int sockd_ep_tx_ctx(struct fid_sep *sep, int index,
|
||||
|
||||
|
||||
static int sockd_ep_rx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_rx_ctx_attr *attr, struct fid_ep **rx_ep,
|
||||
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
|
||||
void *context)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
@ -539,44 +539,6 @@ static int sockd_cm_getname(fid_t fid, void *addr, size_t *addrlen)
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_connect(struct fid_ep *ep, const void *addr,
|
||||
const void *param, size_t paramlen)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_listen(struct fid_pep *pep)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_accept(struct fid_ep *ep, const void *param, size_t paramlen)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_reject(struct fid_pep *pep, fi_connreq_t connreq,
|
||||
const void *param, size_t paramlen)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_shutdown(struct fid_ep *ep, uint64_t flags)
|
||||
{
|
||||
errno = FI_ENOSYS;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int sockd_cm_join(struct fid_ep *ep, void *addr, fi_addr_t *fi_addr,
|
||||
uint64_t flags, void *context)
|
||||
{
|
||||
@ -734,12 +696,12 @@ static struct fi_ops_ep sockd_ops_ep = {
|
||||
static struct fi_ops_cm sockd_ops_cm = {
|
||||
.size = sizeof(struct fi_ops_cm),
|
||||
.getname = sockd_cm_getname,
|
||||
.getpeer = sockd_cm_getpeer,
|
||||
.connect = sockd_cm_connect,
|
||||
.listen = sockd_cm_listen,
|
||||
.accept = sockd_cm_accept,
|
||||
.reject = sockd_cm_reject,
|
||||
.shutdown = sockd_cm_shutdown,
|
||||
.getpeer = fi_no_getpeer,
|
||||
.connect = fi_no_connect,
|
||||
.listen = fi_no_listen,
|
||||
.accept = fi_no_accept,
|
||||
.reject = fi_no_reject,
|
||||
.shutdown = fi_no_shutdown,
|
||||
.join = sockd_cm_join,
|
||||
.leave = sockd_cm_leave
|
||||
};
|
||||
@ -754,6 +716,7 @@ static struct fi_ops_msg sockd_ops_msg = {
|
||||
.sendmsg = sockd_msg_sendmsg,
|
||||
.inject = sockd_msg_inject,
|
||||
.senddata = sockd_msg_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
static inline int _sock_ep_dgram_progress(struct sock_ep *ep, struct sock_cq *cq)
|
||||
|
@ -229,8 +229,8 @@ ssize_t sock_ep_senddata(struct fid_ep *ep, const void *buf, size_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sock_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context)
|
||||
int sock_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ int sock_verify_info(struct fi_info *hints)
|
||||
}
|
||||
|
||||
switch (hints->addr_format) {
|
||||
case FI_ADDR_UNSPEC:
|
||||
case FI_FORMAT_UNSPEC:
|
||||
case FI_SOCKADDR:
|
||||
case FI_SOCKADDR_IN:
|
||||
break;
|
||||
@ -111,7 +111,7 @@ int sock_verify_info(struct fi_info *hints)
|
||||
static struct fi_ops_fabric sock_fab_ops = {
|
||||
.size = sizeof(struct fi_ops_fabric),
|
||||
.domain = sock_domain,
|
||||
.endpoint = sock_pendpoint,
|
||||
.passive_ep = sock_passive_ep,
|
||||
.eq_open = sock_eq_open,
|
||||
};
|
||||
|
||||
|
@ -72,7 +72,7 @@ const struct fi_ep_attr sock_rdm_ep_attr = {
|
||||
.rx_ctx_cnt = SOCK_EP_MAX_RX_CNT,
|
||||
};
|
||||
|
||||
const struct fi_tx_ctx_attr sock_rdm_tx_attr = {
|
||||
const struct fi_tx_attr sock_rdm_tx_attr = {
|
||||
.caps = SOCK_EP_RDM_CAP,
|
||||
.op_flags = SOCK_OPS_CAP,
|
||||
.msg_order = 0,
|
||||
@ -81,7 +81,7 @@ const struct fi_tx_ctx_attr sock_rdm_tx_attr = {
|
||||
.iov_limit = SOCK_EP_MAX_IOV_LIMIT,
|
||||
};
|
||||
|
||||
const struct fi_rx_ctx_attr sock_rdm_rx_attr = {
|
||||
const struct fi_rx_attr sock_rdm_rx_attr = {
|
||||
.caps = SOCK_EP_RDM_CAP,
|
||||
.op_flags = SOCK_OPS_CAP,
|
||||
.msg_order = 0,
|
||||
@ -90,7 +90,7 @@ const struct fi_rx_ctx_attr sock_rdm_rx_attr = {
|
||||
.iov_limit = SOCK_EP_MAX_IOV_LIMIT,
|
||||
};
|
||||
|
||||
static int sock_rdm_verify_rx_attr(const struct fi_rx_ctx_attr *attr)
|
||||
static int sock_rdm_verify_rx_attr(const struct fi_rx_attr *attr)
|
||||
{
|
||||
if (!attr)
|
||||
return 0;
|
||||
@ -117,7 +117,7 @@ static int sock_rdm_verify_rx_attr(const struct fi_rx_ctx_attr *attr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sock_rdm_verify_tx_attr(const struct fi_tx_ctx_attr *attr)
|
||||
static int sock_rdm_verify_tx_attr(const struct fi_tx_attr *attr)
|
||||
{
|
||||
if (!attr)
|
||||
return 0;
|
||||
@ -145,8 +145,8 @@ static int sock_rdm_verify_tx_attr(const struct fi_tx_ctx_attr *attr)
|
||||
}
|
||||
|
||||
int sock_rdm_verify_ep_attr(struct fi_ep_attr *ep_attr,
|
||||
struct fi_tx_ctx_attr *tx_attr,
|
||||
struct fi_rx_ctx_attr *rx_attr)
|
||||
struct fi_tx_attr *tx_attr,
|
||||
struct fi_rx_attr *rx_attr)
|
||||
{
|
||||
if (ep_attr) {
|
||||
switch (ep_attr->protocol) {
|
||||
@ -575,6 +575,7 @@ struct fi_ops_msg sock_rdm_ctx_msg_ops = {
|
||||
.sendmsg = sock_rdm_ctx_sendmsg,
|
||||
.inject = sock_rdm_ctx_inject,
|
||||
.senddata = sock_rdm_ctx_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
ssize_t sock_rdm_ctx_trecvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg,
|
||||
@ -823,6 +824,7 @@ struct fi_ops_tagged sock_rdm_ctx_tagged = {
|
||||
.sendmsg = sock_rdm_ctx_tsendmsg,
|
||||
.inject = sock_rdm_ctx_tinject,
|
||||
.senddata = sock_rdm_ctx_tsenddata,
|
||||
.injectdata = fi_no_tagged_injectdata,
|
||||
.search = sock_rdm_ctx_tsearch,
|
||||
};
|
||||
|
||||
@ -1280,7 +1282,7 @@ int sock_rdm_ep_setopt(fid_t fid, int level, int optname,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sock_rdm_ep_tx_ctx(struct fid_sep *sep, int index, struct fi_tx_ctx_attr *attr,
|
||||
int sock_rdm_ep_tx_ctx(struct fid_sep *sep, int index, struct fi_tx_attr *attr,
|
||||
struct fid_ep **tx_ep, void *context)
|
||||
{
|
||||
struct sock_ep *sock_ep;
|
||||
@ -1313,7 +1315,7 @@ int sock_rdm_ep_tx_ctx(struct fid_sep *sep, int index, struct fi_tx_ctx_attr *at
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sock_rdm_ep_rx_ctx(struct fid_sep *sep, int index, struct fi_rx_ctx_attr *attr,
|
||||
int sock_rdm_ep_rx_ctx(struct fid_sep *sep, int index, struct fi_rx_attr *attr,
|
||||
struct fid_ep **rx_ep, void *context)
|
||||
{
|
||||
struct sock_ep *sock_ep;
|
||||
@ -1370,65 +1372,11 @@ int sock_rdm_ep_cm_getname(fid_t fid, void *addr, size_t *addrlen)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sock_rdm_ep_cm_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen)
|
||||
{
|
||||
struct sock_ep *sock_ep;
|
||||
|
||||
if (*addrlen == 0) {
|
||||
*addrlen = sizeof(struct sockaddr_in);
|
||||
return -FI_ETOOSMALL;
|
||||
}
|
||||
|
||||
sock_ep = container_of(ep, struct sock_ep, ep);
|
||||
*addrlen = MIN(*addrlen, sizeof(struct sockaddr));
|
||||
memcpy(addr, sock_ep->dest_addr, *addrlen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sock_rdm_ep_cm_connect(struct fid_ep *ep, const void *addr,
|
||||
const void *param, size_t paramlen)
|
||||
{
|
||||
struct sock_ep *sock_ep;
|
||||
|
||||
sock_ep = container_of(ep, struct sock_ep, ep);
|
||||
if (sock_ep->info.addr_format == FI_SOCKADDR) {
|
||||
if (memcmp((void*)sock_ep->dest_addr,
|
||||
addr, sizeof(struct sockaddr_in)) != 0) {
|
||||
memcpy(sock_ep->dest_addr, addr, sizeof(struct sockaddr));
|
||||
}
|
||||
} else {
|
||||
return -FI_EINVAL;
|
||||
}
|
||||
|
||||
if (paramlen > 0) {
|
||||
int ret;
|
||||
struct iovec msg_iov ={
|
||||
.iov_base = (void*) param,
|
||||
.iov_len = paramlen,
|
||||
};
|
||||
|
||||
struct msghdr msg = {
|
||||
.msg_name = NULL,
|
||||
.msg_namelen = 0,
|
||||
.msg_iov = &msg_iov,
|
||||
.msg_iovlen = 1,
|
||||
.msg_control = NULL,
|
||||
.msg_controllen = 0,
|
||||
.msg_flags = 0,
|
||||
};
|
||||
ret = sendmsg(sock_ep->sock_fd, &msg, 0);
|
||||
if (ret)
|
||||
return -FI_EINVAL;
|
||||
}
|
||||
sock_ep->enabled = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct fi_ops_cm sock_rdm_ep_cm_ops = {
|
||||
.size = sizeof(struct fi_ops_cm),
|
||||
.getname = sock_rdm_ep_cm_getname,
|
||||
.getpeer = sock_rdm_ep_cm_getpeer,
|
||||
.connect = sock_rdm_ep_cm_connect,
|
||||
.getpeer = fi_no_getpeer,
|
||||
.connect = fi_no_connect,
|
||||
.listen = fi_no_listen,
|
||||
.accept = fi_no_accept,
|
||||
.reject = fi_no_reject,
|
||||
@ -1518,6 +1466,7 @@ struct fi_ops_msg sock_rdm_ep_msg_ops = {
|
||||
.sendv = sock_rdm_ep_msg_sendv,
|
||||
.sendmsg = sock_rdm_ep_msg_sendmsg,
|
||||
.inject = sock_rdm_ep_msg_inject,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
.senddata = sock_rdm_ep_msg_senddata,
|
||||
};
|
||||
|
||||
|
@ -158,6 +158,7 @@ static struct fi_ops_msg usdf_dgram_ops = {
|
||||
.sendmsg = usdf_dgram_sendmsg,
|
||||
.inject = usdf_dgram_inject,
|
||||
.senddata = usdf_dgram_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
static struct fi_ops_msg usdf_dgram_prefix_ops = {
|
||||
@ -170,6 +171,7 @@ static struct fi_ops_msg usdf_dgram_prefix_ops = {
|
||||
.sendmsg = usdf_dgram_sendmsg,
|
||||
.inject = usdf_dgram_inject,
|
||||
.senddata = usdf_dgram_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
static struct fi_ops_cm usdf_cm_dgram_ops = {
|
||||
|
@ -188,6 +188,7 @@ static struct fi_ops_msg usdf_msg_ops = {
|
||||
.sendmsg = usdf_msg_sendmsg,
|
||||
.inject = usdf_msg_inject,
|
||||
.senddata = usdf_msg_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -78,7 +78,7 @@ usdf_validate_hints(struct fi_info *hints, struct usd_device_attrs *dap)
|
||||
size_t size;
|
||||
|
||||
switch (hints->addr_format) {
|
||||
case FI_ADDR_UNSPEC:
|
||||
case FI_FORMAT_UNSPEC:
|
||||
case FI_SOCKADDR_IN:
|
||||
size = sizeof(struct sockaddr_in);
|
||||
break;
|
||||
@ -130,7 +130,7 @@ usdf_fill_addr_info(struct fi_info *fi, struct fi_info *hints,
|
||||
int ret;
|
||||
|
||||
/* If hints speficied, we already validated requested addr_format */
|
||||
if (hints != NULL && hints->addr_format != FI_ADDR_UNSPEC) {
|
||||
if (hints != NULL && hints->addr_format != FI_FORMAT_UNSPEC) {
|
||||
fi->addr_format = hints->addr_format;
|
||||
} else {
|
||||
fi->addr_format = FI_SOCKADDR_IN;
|
||||
@ -189,8 +189,8 @@ usdf_fill_info_dgram(
|
||||
struct fi_info *fi;
|
||||
struct fi_fabric_attr *fattrp;
|
||||
struct fi_domain_attr *dattrp;
|
||||
struct fi_tx_ctx_attr *txattr;
|
||||
struct fi_rx_ctx_attr *rxattr;
|
||||
struct fi_tx_attr *txattr;
|
||||
struct fi_rx_attr *rxattr;
|
||||
struct fi_ep_attr *eattrp;
|
||||
int ret;
|
||||
|
||||
@ -298,8 +298,8 @@ usdf_fill_info_msg(
|
||||
struct fi_info *fi;
|
||||
struct fi_fabric_attr *fattrp;
|
||||
struct fi_domain_attr *dattrp;
|
||||
struct fi_tx_ctx_attr *txattr;
|
||||
struct fi_rx_ctx_attr *rxattr;
|
||||
struct fi_tx_attr *txattr;
|
||||
struct fi_rx_attr *rxattr;
|
||||
struct fi_ep_attr *eattrp;
|
||||
int ret;
|
||||
|
||||
@ -655,7 +655,7 @@ static struct fi_ops usdf_fi_ops = {
|
||||
static struct fi_ops_fabric usdf_ops_fabric = {
|
||||
.size = sizeof(struct fi_ops_fabric),
|
||||
.domain = usdf_domain_open,
|
||||
.endpoint = usdf_pep_open,
|
||||
.passive_ep = usdf_pep_open,
|
||||
.eq_open = usdf_eq_open,
|
||||
};
|
||||
|
||||
|
@ -94,6 +94,7 @@ struct fi_ibv_cq {
|
||||
struct ibv_cq *cq;
|
||||
size_t entry_size;
|
||||
uint64_t flags;
|
||||
enum fi_cq_wait_cond wait_cond;
|
||||
struct ibv_wc wc;
|
||||
};
|
||||
|
||||
@ -140,7 +141,6 @@ static int fi_ibv_check_hints(struct fi_info *hints)
|
||||
switch (hints->ep_type) {
|
||||
case FI_EP_UNSPEC:
|
||||
case FI_EP_MSG:
|
||||
case FI_EP_DGRAM:
|
||||
break;
|
||||
default:
|
||||
return -FI_ENODATA;
|
||||
@ -582,6 +582,7 @@ static struct fi_ops_msg fi_ibv_msg_ep_msg_ops = {
|
||||
.sendmsg = fi_ibv_msg_ep_sendmsg,
|
||||
.inject = fi_no_msg_inject,
|
||||
.senddata = fi_ibv_msg_ep_senddata,
|
||||
.injectdata = fi_no_msg_injectdata,
|
||||
};
|
||||
|
||||
static ssize_t
|
||||
@ -807,6 +808,7 @@ static struct fi_ops_rma fi_ibv_msg_ep_rma_ops = {
|
||||
.writemsg = fi_ibv_msg_ep_rma_writemsg,
|
||||
.inject = fi_no_rma_inject,
|
||||
.writedata = fi_ibv_msg_ep_rma_writedata,
|
||||
.injectdata = fi_no_rma_injectdata,
|
||||
};
|
||||
|
||||
static ssize_t
|
||||
@ -1790,7 +1792,8 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond,
|
||||
struct fi_ibv_cq *_cq;
|
||||
|
||||
_cq = container_of(cq, struct fi_ibv_cq, cq_fid);
|
||||
threshold = MIN((ssize_t) cond, count);
|
||||
threshold = (_cq->wait_cond == FI_CQ_COND_THRESHOLD) ?
|
||||
MIN((ssize_t) cond, count) : 1;
|
||||
|
||||
for (cur = 0; cur < threshold; ) {
|
||||
ret = _cq->cq_fid.ops->read(cq, buf, count - cur);
|
||||
@ -1832,9 +1835,14 @@ static ssize_t fi_ibv_cq_read_context(struct fid_cq *cq, void *buf, size_t count
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
ret = ibv_poll_cq(_cq->cq, 1, &_cq->wc);
|
||||
if (ret <= 0 || _cq->wc.status)
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
if (_cq->wc.status) {
|
||||
ret = -FI_EAVAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
entry->op_context = (void *) (uintptr_t) _cq->wc.wr_id;
|
||||
entry += 1;
|
||||
}
|
||||
@ -1854,9 +1862,14 @@ static ssize_t fi_ibv_cq_read_msg(struct fid_cq *cq, void *buf, size_t count)
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
ret = ibv_poll_cq(_cq->cq, 1, &_cq->wc);
|
||||
if (ret <= 0 || _cq->wc.status)
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
if (_cq->wc.status) {
|
||||
ret = -FI_EAVAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
entry->op_context = (void *) (uintptr_t) _cq->wc.wr_id;
|
||||
entry->flags = (uint64_t) _cq->wc.wc_flags;
|
||||
entry->len = (uint64_t) _cq->wc.byte_len;
|
||||
@ -1878,9 +1891,14 @@ static ssize_t fi_ibv_cq_read_data(struct fid_cq *cq, void *buf, size_t count)
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
ret = ibv_poll_cq(_cq->cq, 1, &_cq->wc);
|
||||
if (ret <= 0 || _cq->wc.status)
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
if (_cq->wc.status) {
|
||||
ret = -FI_EAVAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
entry->op_context = (void *) (uintptr_t) _cq->wc.wr_id;
|
||||
if (_cq->wc.wc_flags & IBV_WC_WITH_IMM) {
|
||||
entry->flags = FI_REMOTE_CQ_DATA;
|
||||
@ -2034,6 +2052,7 @@ fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr,
|
||||
}
|
||||
|
||||
_cq->flags |= attr->flags;
|
||||
_cq->wait_cond = attr->wait_cond;
|
||||
_cq->cq_fid.fid.fclass = FI_CLASS_CQ;
|
||||
_cq->cq_fid.fid.context = context;
|
||||
_cq->cq_fid.fid.ops = &fi_ibv_cq_fi_ops;
|
||||
@ -2286,7 +2305,7 @@ static struct fi_ops fi_ibv_pep_ops = {
|
||||
};
|
||||
|
||||
static int
|
||||
fi_ibv_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context)
|
||||
{
|
||||
struct fi_ibv_pep *_pep;
|
||||
@ -2334,7 +2353,7 @@ static struct fi_ops fi_ibv_fi_ops = {
|
||||
static struct fi_ops_fabric fi_ibv_ops_fabric = {
|
||||
.size = sizeof(struct fi_ops_fabric),
|
||||
.domain = fi_ibv_domain,
|
||||
.endpoint = fi_ibv_pendpoint,
|
||||
.passive_ep = fi_ibv_passive_ep,
|
||||
.eq_open = fi_ibv_eq_open,
|
||||
};
|
||||
|
||||
|
@ -59,7 +59,7 @@ int fi_no_domain(struct fid_fabric *fabric, struct fi_domain_attr *attr,
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
int fi_no_pendpoint(struct fid_fabric *fabric, struct fi_info *info,
|
||||
int fi_no_passive_ep(struct fid_fabric *fabric, struct fi_info *info,
|
||||
struct fid_pep **pep, void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
@ -244,12 +244,12 @@ int fi_no_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr,
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
int fi_no_stx_context(struct fid_domain *domain, struct fi_tx_ctx_attr *attr,
|
||||
int fi_no_stx_context(struct fid_domain *domain, struct fi_tx_attr *attr,
|
||||
struct fid_stx **stx, void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
int fi_no_srx_context(struct fid_domain *domain, struct fi_rx_ctx_attr *attr,
|
||||
int fi_no_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr,
|
||||
struct fid_ep **rx_ep, void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
@ -299,13 +299,13 @@ int fi_no_setopt(fid_t fid, int level, int optname,
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
int fi_no_tx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_tx_ctx_attr *attr, struct fid_ep **tx_ep,
|
||||
struct fi_tx_attr *attr, struct fid_ep **tx_ep,
|
||||
void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
int fi_no_rx_ctx(struct fid_sep *sep, int index,
|
||||
struct fi_rx_ctx_attr *attr, struct fid_ep **rx_ep,
|
||||
struct fi_rx_attr *attr, struct fid_ep **rx_ep,
|
||||
void *context)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
@ -354,6 +354,11 @@ ssize_t fi_no_msg_senddata(struct fid_ep *ep, const void *buf, size_t len, void
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
ssize_t fi_no_msg_injectdata(struct fid_ep *ep, const void *buf, size_t len,
|
||||
uint64_t data, fi_addr_t dest_addr)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
|
||||
/*
|
||||
* struct fi_ops_wait
|
||||
@ -467,6 +472,11 @@ ssize_t fi_no_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
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)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
|
||||
/*
|
||||
* struct fi_ops_tagged
|
||||
@ -512,6 +522,11 @@ ssize_t fi_no_tagged_senddata(struct fid_ep *ep, const void *buf, size_t len, vo
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
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)
|
||||
{
|
||||
return -FI_ENOSYS;
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ static void fi_tostr_flags(char *buf, uint64_t flags)
|
||||
static void fi_tostr_addr_format(char *buf, uint32_t addr_format)
|
||||
{
|
||||
switch (addr_format) {
|
||||
CASEENUMSTR(FI_ADDR_UNSPEC);
|
||||
CASEENUMSTR(FI_FORMAT_UNSPEC);
|
||||
CASEENUMSTR(FI_SOCKADDR);
|
||||
CASEENUMSTR(FI_SOCKADDR_IN);
|
||||
CASEENUMSTR(FI_SOCKADDR_IN6);
|
||||
@ -246,7 +246,7 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format,
|
||||
fi_tostr_addr(p, FI_SOCKADDR_IN6, addr);
|
||||
break;
|
||||
default:
|
||||
fi_tostr_addr(p, FI_ADDR_UNSPEC, addr);
|
||||
fi_tostr_addr(p, FI_FORMAT_UNSPEC, addr);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -264,15 +264,15 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format,
|
||||
}
|
||||
}
|
||||
|
||||
static void fi_tostr_tx_attr(char *buf, const struct fi_tx_ctx_attr *attr,
|
||||
static void fi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr,
|
||||
const char *prefix)
|
||||
{
|
||||
if (!attr) {
|
||||
strcatf(buf, "%sfi_tx_ctx_attr: (null)\n", prefix);
|
||||
strcatf(buf, "%sfi_tx_attr: (null)\n", prefix);
|
||||
return;
|
||||
}
|
||||
|
||||
strcatf(buf, "%sfi_tx_ctx_attr:\n", prefix);
|
||||
strcatf(buf, "%sfi_tx_attr:\n", prefix);
|
||||
strcatf(buf, "%s%scaps: [ ", prefix, TAB);
|
||||
fi_tostr_caps(buf, attr->caps);
|
||||
strcat(buf, " ]\n");
|
||||
@ -290,15 +290,15 @@ static void fi_tostr_tx_attr(char *buf, const struct fi_tx_ctx_attr *attr,
|
||||
strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit);
|
||||
}
|
||||
|
||||
static void fi_tostr_rx_attr(char *buf, const struct fi_rx_ctx_attr *attr,
|
||||
static void fi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr,
|
||||
const char *prefix)
|
||||
{
|
||||
if (!attr) {
|
||||
strcatf(buf, "%sfi_rx_ctx_attr: (null)\n", prefix);
|
||||
strcatf(buf, "%sfi_rx_attr: (null)\n", prefix);
|
||||
return;
|
||||
}
|
||||
|
||||
strcatf(buf, "%sfi_rx_ctx_attr:\n", prefix);
|
||||
strcatf(buf, "%sfi_rx_attr:\n", prefix);
|
||||
strcatf(buf, "%s%scaps: [ ", prefix, TAB);
|
||||
fi_tostr_caps(buf, attr->caps);
|
||||
strcat(buf, " ]\n");
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user