75 lines
8.5 KiB
Python
Executable File
75 lines
8.5 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
import dict_to_table as dtt
|
|
from sys import argv
|
|
|
|
caption = "RDMA CM verbs"
|
|
|
|
rdmacmverbs = {'rdma_create_event_channel':['struct rdma_event_channel * rdma_create_event_channel(void)','Creates a new, unbound communication event channel.'],
|
|
|
|
'rdma_destroy_event_channel':['void rdma_destroy_event_channel(struct rdma_event channel *channel)','Destroys a communication event channel. Prior to destroying the channel, all associated communication identifiers must have been destroyed and all events must have been acknowledged.'],
|
|
|
|
'rdma_create_id':['int rdma_create_id(struct rdma_event_channel *channel, struct rdma_cm_id **id, void *context, enum rdma_port_space ps)','Creates an \\gls{rdma} \\gls{cm} communication identifier. Although similar to sockets, the \\texttt{rdma\_cm\_id} must be bound to a device before communication can occur.'],
|
|
|
|
'rdma_destroy_id':['int rdma_destroy_id(struct rdma_cm_id *id)','Destroys an \\gls{rdma} \\gls{cm} communication identifier. Prior to destroying the identifier, all associated \\glspl{qp} must have been destroyed and all events must have been acknowledged.'],
|
|
|
|
'rdma_migrade_id':['int rdma_migrate_id(struct rdma_cm_id *id, struct rdma_event_channel *channel)','Migrates a communication identifier and all its pending events to a new communication event channel.'],
|
|
|
|
'rdma_set_option':['int rdma_set_option(struct rdma_cm_id *id, int level, int optname, void *optval, size_t optlen)','Sets options for a communication identifier. The options can be found in the \\texttt{rdma\_cma.h} header file.\\footnote{\\url{https://github.com/linux-rdma/rdma-core/blob/master/librdmacm/rdma_cma.h}}'],
|
|
|
|
'rdma_create_ep':['int rdma_create_ep(struct rdma_cm_id **id, struct rdma_addrinfo *res, struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)','Creates a communication endpoint. If \\texttt{*qp\_init\_attr} is provided, a \\gls{qp} to track communication information will be created. If no \\gls{pd} is defined, it will be associated with the default \\gls{pd}. Furthermore, it creates an communication identifier that operates synchronously. To let it operate asynchronously, it must be bound to a \\acrfull{cc} using \\texttt{rdma\_migrate\_id()}.'],
|
|
|
|
'rdma_destroy_ep':['int rdma_destroy_ep(struct rdma_cm_id *id)','Destroys the communication endpoint and all associated resources.'],
|
|
|
|
'rdma_resolve_addr':['int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, struct sockaddr *dst_addr, int timeout_ms)','Resolves a destination IP address to a valid \\gls{rdma} address. If, additionally, a source IP address is provided, the \\gls{rdma} \\gls{cm} communication identifier will be bound to that device. The latter is only necessary if \\texttt{rdma\_bind\_addr()} has not been called yet.'],
|
|
|
|
'rdma_bind_addr':['int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr)','Binds the communication identifier to a local \\gls{rdma} device that is associated with the source IP address.'],
|
|
|
|
'rdma_resolve_route':['int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms)','Resolves the route to a given destination address. Prior to calling this function, \\texttt{rdma\_resolve\_addr()} must have been called on a destination address.'],
|
|
|
|
'rdma_listen':['int rdma_listen(struct rdma_cm_id *id, int backlog)','Sets the communication identifier to listening mode for incoming connection requests. Prior to calling this function, the device must have been bound to a local device with \\texttt{rdma\_bind\_addr()}.'],
|
|
|
|
'rdma_connect':['int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)','Initiates a connection request. When relying on a connected service type, this requests a connection to a remote location. In case of an unconnected service type, this requests all information from the remote \\gls{qp} to send datagrams. Before calling \\texttt{rdma\_connect()}, \\texttt{rdma\_resolve\_route()} must have been called.'],
|
|
|
|
'rdma_get_request':['int rdma_get_request(struct rdma_cm_id *listen, struct rdma_cm_id **id)','Retrieves the next pending connection request event from a synchronously operating communication identifier. If the function returns successfully, it will create a new communication identifier that represents the connection.'],
|
|
|
|
'rdma_accept':['int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)','Accepts a connection request or datagram service lookup. This function is called on the passive, listening side.'],
|
|
|
|
'rdma_reject':['int rdma_reject(struct rdma_cm_id *id, const void *private_data, uint8_t private_data_len)','Rejects a connection request or datagram service lookup. This function is called on the passive, listening side.'],
|
|
|
|
'rdma_notify':['int rdma_notify(struct rdma_cm_id *id, enum ibv_event_type event)','Notifies the communication identifier about events that have occured on a \\gls{qp} that is associated to it. Usually, this is not necessary. However, it can be necessary if the \\gls{qp} was created out of band and the communication identifier does not know its status yet.'],
|
|
|
|
'rdma_disconnect':['int rdma_disconnect(struct rdma_cm_id *id)','Disconnects any \\gls{qp} and transitions them tot the \\textit{error} state.'],
|
|
|
|
'rdma_get_src_port':['uint16_t rdma_get_src_port(struct rdma_cm_id *id)','Returns the local port number of a communication identifier.'],
|
|
|
|
'rdma_get_dst_port':['uint16_t rdma_get_dst_port(struct rdma_cm_id *id)','Returns the port number of a communication identifier\'s peer endpoint. If the identifier is unconnected, the function shall return \\zero.'],
|
|
|
|
'rdma_get_local_addr':['struct sockaddr * rdma_get_local_addr(struct rdma_cm_id *id)','Retrieves the local \\texttt{sockaddr} address of a communication identifier.'],
|
|
|
|
'rdma_get_peer_addr':['struct sockaddr * rdma_get_peer_addr(struct rdma_cm_id *id)','Retrieves the remote \\texttt{sockaddr} address of a communication identifier. If the identifier is unconnected, the function shall fill the complete \\texttt{sockaddr} C structure with zeros.'],
|
|
|
|
'rdma_get_devices':['struct ibv_context ** rdma_get_devices(int *num_devices)','Retrieves an array of available \\gls{rdma} devices in the system.'],
|
|
|
|
'rdma_free_devices':['void rdma_free_devices(struct ibv_context **list)','Destroys the array that was retrieved by \\texttt{rdma\_get\_devices()}.'],
|
|
|
|
'rdma_getaddrinfo':['int rdma_getaddrinfo(char *node, char *service, struct rdma_addrinfo *hints, struct rdma_addrinfo **res)','Resolves the destination node and service address and returns all information to communicate with a remote node in \\texttt{**res}. This function is very similar to \\texttt{getaddrinfo()}~\\cite{kerrisk2010linux}.'],
|
|
|
|
'rdma_freeaddrinfo':['void rdma_freeaddrinfo(struct rdma_addrinfo *res)','Frees the address that was retrieved with \\texttt{rdma\_getaddrinfo()}. This function is very similar to \\texttt{freeaddrinfo()}~\\cite{kerrisk2010linux}.'],
|
|
|
|
'rdma_create_qp':['int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)','Creates a \\acrfull{qp} that is associated to an communication identifier. The \\gls{qp}\'s state transitions are managed by the identifier.'],
|
|
|
|
'rdma_destroy_qp':['void rdma_destroy_qp(struct rdma_cm_id *id)','Destroys a \\acrfull{qp} associated with the communication identifier.'],
|
|
|
|
'rdma_join_multicast':['int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr, void *context)','Joins a multicast group and attaches a \\acrfull{qp} that is associated to the communication identifier.'],
|
|
|
|
'rdma_leave_multicast':['int rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr)','Leaves a multicast group and detaches a \\acrfull{qp} that is associated to the communication identifier.'],
|
|
|
|
'rdma_get_cm_event':['int rdma_get_cm_event(struct rdma_event_channel *channel, struct rdma_cm_event **event)','Retrieves asynchronous events from the communication event channel. This function is a blocking function.'],
|
|
|
|
'rdma_ack_cm_event':['int rdma_ack_cm_event(struct rdma_cm_event *event)','Acknowledges events from \\texttt{ibv\_get\_cm\_event()}. Events must be acknowledged before associated objects can be destroyed. This is done in order to avoid races.'],
|
|
|
|
'rdma_event_str':['char * rdma_event_str(enum rdma_cm_event_type event)','Translates an enumeration that is included in an event returned by \\texttt{ibv\_get\_cm\_event()} into a string.'],
|
|
}
|
|
|
|
dtt.print_file(rdmacmverbs, argv[0], caption, 2000)
|