for SCTP BTL, added Mac OS X support for systems using SCTP NKE (Network Kernel Extension)
This commit was SVN r16729.
Этот коммит содержится в:
родитель
15ffe6c89c
Коммит
f34ddfef80
@ -101,6 +101,11 @@ mca_btl_sctp_component_t mca_btl_sctp_component = {
|
||||
}
|
||||
};
|
||||
|
||||
#if MCA_BTL_SCTP_DONT_USE_HASH
|
||||
struct mca_btl_sctp_proc_table_node *recvr_proc_table;
|
||||
struct mca_btl_sctp_proc_table_node *sender_proc_table;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* utility routines for parameter registration
|
||||
*/
|
||||
|
@ -935,9 +935,13 @@ static int mca_btl_sctp_endpoint_start_connect(mca_btl_base_endpoint_t* btl_endp
|
||||
mca_btl_sctp_endpoint_event_init(btl_endpoint, btl_endpoint->endpoint_sd);
|
||||
|
||||
/* start the connect - will likely fail with EINPROGRESS */
|
||||
memset(&endpoint_addr, 0, sizeof(endpoint_addr));
|
||||
endpoint_addr.sin_family = AF_INET;
|
||||
endpoint_addr.sin_addr = btl_endpoint->endpoint_addr->addr_inet;
|
||||
endpoint_addr.sin_port = btl_endpoint->endpoint_addr->addr_port;
|
||||
#ifdef FREEBSD
|
||||
endpoint_addr.sin_len = sizeof(struct sockaddr);
|
||||
#endif
|
||||
if(connect(btl_endpoint->endpoint_sd, (struct sockaddr*)&endpoint_addr,
|
||||
sizeof(endpoint_addr)) < 0)
|
||||
{
|
||||
|
@ -408,8 +408,8 @@ repeat11:
|
||||
return false;
|
||||
case EFAULT:
|
||||
opal_output( 0, "mca_btl_sctp_frag_send: writev error (%p, %d)\n\t%s(%d)\n",
|
||||
frag->iov_ptr[0].iov_base, frag->iov_ptr[0].iov_len,
|
||||
strerror(opal_socket_errno), frag->iov_cnt );
|
||||
frag->iov_ptr[0].iov_base, (int) frag->iov_ptr[0].iov_len,
|
||||
strerror(opal_socket_errno), (int) frag->iov_cnt );
|
||||
default:
|
||||
opal_output(0, "mca_btl_sctp_frag_send: writev failed with errno=%d",
|
||||
opal_socket_errno);
|
||||
@ -552,8 +552,8 @@ repeat:
|
||||
return false;
|
||||
case EFAULT:
|
||||
opal_output( 0, "mca_btl_sctp_frag_send: writev error (%p, %d)\n\t%s(%d)\n",
|
||||
frag->iov_ptr[0].iov_base, frag->iov_ptr[0].iov_len,
|
||||
strerror(opal_socket_errno), frag->iov_cnt );
|
||||
frag->iov_ptr[0].iov_base, (int) frag->iov_ptr[0].iov_len,
|
||||
strerror(opal_socket_errno), (int) frag->iov_cnt );
|
||||
default:
|
||||
opal_output(0, "mca_btl_sctp_frag_send: writev failed with errno=%d",
|
||||
opal_socket_errno);
|
||||
|
@ -99,8 +99,8 @@ struct mca_btl_sctp_proc_table_node {
|
||||
};
|
||||
typedef struct mca_btl_sctp_proc_table_node mca_btl_sctp_proc_table_node;
|
||||
|
||||
struct mca_btl_sctp_proc_table_node *recvr_proc_table;
|
||||
struct mca_btl_sctp_proc_table_node *sender_proc_table;
|
||||
extern struct mca_btl_sctp_proc_table_node *recvr_proc_table;
|
||||
extern struct mca_btl_sctp_proc_table_node *sender_proc_table;
|
||||
|
||||
int mca_btl_sctp_proc_check(uint32_t id, struct mca_btl_sctp_proc_table_node *table);
|
||||
void mca_btl_sctp_proc_add(uint32_t id, struct mca_btl_sctp_proc_t *proc, struct mca_btl_sctp_proc_table_node *table);
|
||||
|
@ -32,7 +32,7 @@ AC_DEFUN([OMPI_CHECK_SCTP],[
|
||||
[Search for SCTP libraries in DIR])])
|
||||
|
||||
btl_sctp_CFLAGS="`echo $CFLAGS`"
|
||||
#only try to build this on Linux or some BSD variant
|
||||
#only try to build this on Linux, Mac OS X, or some BSD variant
|
||||
ompi_sctp_try_to_build="no"
|
||||
case "$host" in
|
||||
*linux*)
|
||||
@ -45,9 +45,16 @@ AC_DEFUN([OMPI_CHECK_SCTP],[
|
||||
ompi_sctp_try_to_build="yes"
|
||||
AC_MSG_WARN([Adding -DFREEBSD to set extra sin_len field in sockaddr.])
|
||||
;;
|
||||
#TODO add Mac OS X support for SCTP NKE. Adjustments should look like *bsd*...
|
||||
# Mac OS X support for SCTP NKE. Adjustments should look like *bsd*...
|
||||
*darwin*)
|
||||
# only add -DFREEBSD once to get extra sin_len field
|
||||
btl_sctp_CFLAGS="`echo $btl_sctp_CFLAGS | sed 's/-DFREEBSD//g'`"
|
||||
btl_sctp_CFLAGS="$btl_sctp_CFLAGS -DFREEBSD"
|
||||
ompi_sctp_try_to_build="yes"
|
||||
AC_MSG_WARN([Adding -DFREEBSD to set extra sin_len field in sockaddr.])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Only build sctp BTL on Linux and BSD variants])
|
||||
AC_MSG_WARN([Only build sctp BTL on Linux, Mac OS X, and BSD variants])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user