25 #include "ompi_config.h"
26 #ifdef HAVE_SYS_TYPES_H
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_SOCKET_H
30 #include <sys/socket.h>
32 #ifdef HAVE_NETINET_IN_H
33 #include <netinet/in.h>
37 #include "opal/mca/event/event.h"
38 #include "ompi/class/ompi_free_list.h"
45 #define MCA_BTL_TCP_STATISTICS 0
76 unsigned short tcp6_listen_port;
77 int32_t tcp6_port_min;
78 int32_t tcp6_port_range;
110 uint16_t tcp_ifkindex;
117 #if MCA_BTL_TCP_STATISTICS
118 size_t tcp_bytes_sent;
119 size_t tcp_bytes_recv;
120 size_t tcp_send_handler;
126 #if defined(__WINDOWS__)
127 #define CLOSE_THE_SOCKET(socket) closesocket(socket)
129 #define CLOSE_THE_SOCKET(socket) close(socket)
140 int *num_btl_modules,
141 bool allow_multi_user_threads,
142 bool have_hidden_threads
217 mca_btl_base_tag_t tag
struct mca_btl_tcp_module_t ** tcp_btls
array of available BTL modules
Definition: btl_tcp.h:58
Definition: opal_hash_table.h:42
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
int mca_btl_tcp_component_progress(void)
TCP component progress.
mca_btl_base_component_2_0_0_t super
base BTL component
Definition: btl_tcp.h:54
Definition: opal_bitmap.h:53
mca_btl_base_module_t super
base BTL interface
Definition: btl_tcp.h:108
int32_t tcp_port_range
IPv4 port range.
Definition: btl_tcp.h:72
opal_event_t tcp_recv_event
recv event for IPv4 listen socket
Definition: btl_tcp.h:68
int mca_btl_tcp_add_procs(struct mca_btl_base_module_t *btl, size_t nprocs, struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers, opal_bitmap_t *reachable)
PML->BTL notification of change in the process list.
Definition: btl_tcp.c:82
int tcp_free_list_num
initial size of free lists
Definition: btl_tcp.h:60
int mca_btl_tcp_get(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *btl_peer, struct mca_btl_base_descriptor_t *decriptor)
Initiate an asynchronous get.
Definition: btl_tcp.c:452
int tcp_free_list_inc
number of elements to alloc when growing free lists
Definition: btl_tcp.h:62
Structure to represent a single event.
Definition: event_struct.h:87
int mca_btl_tcp_put(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *btl_peer, struct mca_btl_base_descriptor_t *decriptor)
Initiate an asynchronous put.
Definition: btl_tcp.c:410
void(* mca_btl_base_module_error_cb_fn_t)(struct mca_btl_base_module_t *btl, int32_t flags, struct ompi_proc_t *errproc, char *btlinfo)
Callback function that is called asynchronously on receipt of an error from the transport layer...
Definition: btl.h:538
BTL Module Interface.
Definition: btl_tcp.h:107
Definition: mutex_unix.h:53
int mca_btl_tcp_ft_event(int state)
Fault Tolerance Event Notification Function.
Definition: btl_tcp_ft.c:33
Represents the state of a remote process and the set of addresses that it exports.
Definition: btl_tcp_proc.h:38
int tcp_disable_family
disabled AF_family
Definition: btl_tcp.h:86
Remote Open MPI process structure.
Definition: proc.h:56
int mca_btl_tcp_finalize(struct mca_btl_base_module_t *btl)
Cleanup any resources held by the BTL.
Definition: btl_tcp.c:484
int tcp_sndbuf
socket sndbuf size
Definition: btl_tcp.h:84
int tcp_endpoint_cache
amount of cache on each endpoint
Definition: btl_tcp.h:63
int mca_btl_tcp_send(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *btl_peer, struct mca_btl_base_descriptor_t *descriptor, mca_btl_base_tag_t tag)
Initiate an asynchronous send.
Definition: btl_tcp.c:370
int32_t tcp_port_min
IPv4 minimum port.
Definition: btl_tcp.h:71
char * tcp_if_exclude
comma seperated list of interface to exclude
Definition: btl_tcp.h:83
int tcp_free_list_max
maximum size of free lists
Definition: btl_tcp.h:61
uint32_t tcp_addr_count
total number of addresses
Definition: btl_tcp.h:55
Byte Transfer Layer (BTL)
uint32_t tcp_num_links
number of logical links per physical device
Definition: btl_tcp.h:57
mca_btl_base_descriptor_t * mca_btl_tcp_alloc(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, uint8_t order, size_t size, uint32_t flags)
Allocate a descriptor with a segment of the requested size.
Definition: btl_tcp.c:178
opal_list_t tcp_events
list of pending tcp events
Definition: btl_tcp.h:65
Definition: util-internal.h:214
Definition: ompi_free_list.h:39
mca_btl_base_descriptor_t * mca_btl_tcp_prepare_dst(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *peer, struct mca_mpool_base_registration_t *, struct opal_convertor_t *convertor, uint8_t order, size_t reserve, size_t *size, uint32_t flags)
Prepare a descriptor for send/rdma using the supplied convertor.
Definition: btl_tcp.c:327
mca_btl_base_descriptor_t * mca_btl_tcp_prepare_src(struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *peer, struct mca_mpool_base_registration_t *, struct opal_convertor_t *convertor, uint8_t order, size_t reserve, size_t *size, uint32_t flags)
Prepare a descriptor for send/rdma using the supplied convertor.
Definition: btl_tcp.c:231
A hash table that may be indexed with either fixed length (e.g.
uint32_t tcp_ifmask
BTL interface netmask.
Definition: btl_tcp.h:115
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
BTL component descriptor.
Definition: btl.h:411
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
Definition: opal_convertor.h:90
mca_btl_base_module_t ** mca_btl_tcp_component_init(int *num_btl_modules, bool allow_multi_user_threads, bool have_hidden_threads)
TCP component initialization.
Definition: btl_tcp_component.c:1006
Definition: opal_list.h:147
opal_mutex_t tcp_lock
lock for accessing module state
Definition: btl_tcp.h:66
uint32_t tcp_num_btls
number of hcas available to the TCP component
Definition: btl_tcp.h:56
char * tcp_if_include
comma seperated list of interface to include
Definition: btl_tcp.h:82
int mca_btl_tcp_free(struct mca_btl_base_module_t *btl, mca_btl_base_descriptor_t *des)
Return a segment allocated by this BTL.
Definition: btl_tcp.c:215
BTL module interface functions and attributes.
Definition: btl.h:786
unsigned short tcp_listen_port
IPv4 listen port.
Definition: btl_tcp.h:70
opal_hash_table_t tcp_procs
hash table of tcp proc structures
Definition: btl_tcp.h:64
int mca_btl_tcp_del_procs(struct mca_btl_base_module_t *btl, size_t nprocs, struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers)
PML->BTL notification of change in the process list.
Definition: btl_tcp.c:152
int tcp_rcvbuf
socket rcvbuf size
Definition: btl_tcp.h:85
struct sockaddr_storage tcp_ifaddr
Definition: btl_tcp.h:114
int tcp_listen_sd
IPv4 listen socket for incoming connection requests.
Definition: btl_tcp.h:69
struct mca_btl_tcp_proc_t * tcp_local
local proc struct
Definition: btl_tcp.h:59
TCP BTL component.
Definition: btl_tcp.h:53