Main Page | Modules | Data Structures | File List | Data Fields | Globals

BMI network interface

The BMI interface provides functionality used for communication between clients and servers. More...

Files

file  bmi-types.h
file  bmi.c
file  bmi.h

Data Structures

struct  bmi_optimistic_buffer_info
 used to describe a memory region in passing down a registration hint from IO routines. More...

struct  BMI_unexpected_info
 used to describe unexpected message arrivals. More...


Typedefs

typedef int64_t bmi_size_t
typedef int32_t bmi_msg_tag_t
typedef int64_t bmi_context_id
typedef int64_t bmi_op_id_t
typedef int32_t bmi_error_code_t

Enumerations

enum  { BMI_INIT_SERVER = 1, BMI_TCP_BIND_SPECIFIC = 2, BMI_AUTO_REF_COUNT = 4 }
enum  bmi_buffer_type
enum  {
  BMI_DROP_ADDR = 1, BMI_CHECK_INIT = 2, BMI_CHECK_MAXSIZE = 3, BMI_GET_METH_ADDR = 4,
  BMI_INC_ADDR_REF = 5, BMI_DEC_ADDR_REF = 6, BMI_DROP_ADDR_QUERY = 7, BMI_FORCEFUL_CANCEL_MODE = 8,
  BMI_GET_UNEXP_SIZE = 10
}

Functions

int bmi_errno_to_pvfs (int error)
int BMI_initialize (const char *method_list, const char *listen_addr, int flags)
int BMI_finalize (void)
int BMI_open_context (bmi_context_id *context_id)
void BMI_close_context (bmi_context_id context_id)
int BMI_post_send (bmi_op_id_t *id, BMI_addr_t dest, const void *buffer, bmi_size_t size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_post_sendunexpected (bmi_op_id_t *id, BMI_addr_t dest, const void *buffer, bmi_size_t size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_post_recv (bmi_op_id_t *id, BMI_addr_t src, void *buffer, bmi_size_t expected_size, bmi_size_t *actual_size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_test (bmi_op_id_t id, int *outcount, bmi_error_code_t *error_code, bmi_size_t *actual_size, void **user_ptr, int max_idle_time_ms, bmi_context_id context_id)
int BMI_testsome (int incount, bmi_op_id_t *id_array, int *outcount, int *index_array, bmi_error_code_t *error_code_array, bmi_size_t *actual_size_array, void **user_ptr_array, int max_idle_time_ms, bmi_context_id context_id)
int BMI_testunexpected (int incount, int *outcount, struct BMI_unexpected_info *info_array, int max_idle_time_ms)
int BMI_testcontext (int incount, bmi_op_id_t *out_id_array, int *outcount, bmi_error_code_t *error_code_array, bmi_size_t *actual_size_array, void **user_ptr_array, int max_idle_time_ms, bmi_context_id context_id)
void * BMI_memalloc (BMI_addr_t addr, bmi_size_t size, enum bmi_op_type send_recv)
int BMI_memfree (BMI_addr_t addr, void *buffer, bmi_size_t size, enum bmi_op_type send_recv)
int BMI_unexpected_free (BMI_addr_t addr, void *buffer)
int BMI_set_info (BMI_addr_t addr, int option, void *inout_parameter)
int BMI_get_info (BMI_addr_t addr, int option, void *inout_parameter)
int BMI_addr_lookup (BMI_addr_t *new_addr, const char *id_string)
const char * BMI_addr_rev_lookup (BMI_addr_t addr)
const char * BMI_addr_rev_lookup_unexpected (BMI_addr_t addr)
int BMI_query_addr_range (BMI_addr_t addr, const char *id_string, int netmask)
int BMI_post_send_list (bmi_op_id_t *id, BMI_addr_t dest, const void *const *buffer_list, const bmi_size_t *size_list, int list_count, bmi_size_t total_size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_post_recv_list (bmi_op_id_t *id, BMI_addr_t src, void *const *buffer_list, const bmi_size_t *size_list, int list_count, bmi_size_t total_expected_size, bmi_size_t *total_actual_size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_post_sendunexpected_list (bmi_op_id_t *id, BMI_addr_t dest, const void *const *buffer_list, const bmi_size_t *size_list, int list_count, bmi_size_t total_size, enum bmi_buffer_type buffer_type, bmi_msg_tag_t tag, void *user_ptr, bmi_context_id context_id, bmi_hint hints)
int BMI_cancel (bmi_op_id_t id, bmi_context_id context_id)

Detailed Description

The BMI interface provides functionality used for communication between clients and servers.

Both clients and servers use this interface, and the default flow protocol also builds on BMI.


Typedef Documentation

typedef int64_t bmi_context_id
 

Context identifier.

typedef int32_t bmi_error_code_t
 

error code information

typedef int32_t bmi_msg_tag_t
 

User-specified message tag.

typedef int64_t bmi_op_id_t
 

Reference to ongoing network op.

typedef int64_t bmi_size_t
 

Data region size.


Enumeration Type Documentation

anonymous enum
 

BMI method initialization flags.

Enumeration values:
BMI_INIT_SERVER  set up to listen for unexpected messages
BMI_TCP_BIND_SPECIFIC  bind to a specific IP address if INIT_SERVER
BMI_AUTO_REF_COUNT  automatically increment ref count on unexpected messages

anonymous enum
 

BMI get_info and set_info options.

Enumeration values:
BMI_DROP_ADDR  ask a module to discard an address
BMI_CHECK_INIT  see if a module is initialized
BMI_CHECK_MAXSIZE  check the max msg size a module allows
BMI_GET_METH_ADDR  kludge to return void* pointer to underlying module address
BMI_INC_ADDR_REF  increment address reference count
BMI_DEC_ADDR_REF  decrement address reference count
BMI_DROP_ADDR_QUERY  ask a module if it thinks an address should be discarded
BMI_FORCEFUL_CANCEL_MODE  enables a more forceful cancel mode
BMI_GET_UNEXP_SIZE  get the maximum unexpected payload

enum bmi_buffer_type
 

BMI memory buffer flags.


Function Documentation

int BMI_addr_lookup BMI_addr_t *  new_addr,
const char *  id_string
 

Resolves the string representation of a host address into a BMI address handle.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

const char* BMI_addr_rev_lookup BMI_addr_t  addr  ) 
 

Performs a reverse lookup, returning the string (URL style) address for a given opaque address.

NOTE: caller must not free or modify returned string

Returns:
Pointer to string on success, NULL on failure.

const char* BMI_addr_rev_lookup_unexpected BMI_addr_t  addr  ) 
 

Performs a reverse lookup, returning a string address for a given opaque address.

Works on any address, even those generated unexpectedly, but only gives hostname instead of full BMI URL style address

NOTE: caller must not free or modify returned string

Returns:
Pointer to string on success, NULL on failure.

int BMI_cancel bmi_op_id_t  id,
bmi_context_id  context_id
 

Attempts to cancel a pending operation that has not yet completed.

Caller must still test to gather error code after calling this function even if it returns 0.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

void BMI_close_context bmi_context_id  context_id  ) 
 

Destroys a context previous generated with BMI_open_context().

int bmi_errno_to_pvfs int  error  ) 
 

default bmi error translation function

int BMI_finalize void   ) 
 

Shuts down the BMI layer.

Returns:
0.

int BMI_get_info BMI_addr_t  addr,
int  option,
void *  inout_parameter
 

Query for optional parameters.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_initialize const char *  method_list,
const char *  listen_addr,
int  flags
 

Initializes the BMI layer.

Must be called before any other BMI functions.

Parameters:
method_list a comma separated list of BMI methods to use
listen_addr a comma separated list of addresses to listen on for each method (if needed)
flags initialization flags
Returns:
0 on success, -errno on failure

Here is the call graph for this function:

void* BMI_memalloc BMI_addr_t  addr,
bmi_size_t  size,
enum bmi_op_type  send_recv
 

Allocates memory that can be used in native mode by the BMI layer.

Returns:
Pointer to buffer on success, NULL on failure.

int BMI_memfree BMI_addr_t  addr,
void *  buffer,
bmi_size_t  size,
enum bmi_op_type  send_recv
 

Frees memory that was allocated with BMI_memalloc().

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_open_context bmi_context_id context_id  ) 
 

Creates a new context to be used for communication.

This can be used, for example, to distinguish between operations posted by different threads.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_post_recv bmi_op_id_t id,
BMI_addr_t  src,
void *  buffer,
bmi_size_t  expected_size,
bmi_size_t actual_size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Submits receive operations for subsequent service.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_post_recv_list bmi_op_id_t id,
BMI_addr_t  src,
void *const *  buffer_list,
const bmi_size_t size_list,
int  list_count,
bmi_size_t  total_expected_size,
bmi_size_t total_actual_size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Similar to BMI_post_recv(), except that the dest buffer is replaced by a list of (possibly non contiguous) buffers.

Parameters:
total_expected_size the sum of the size list.
total_actual_size the aggregate amt that was received.
Returns:
0 on success, 1 on immediate successful completion, -errno on failure.

Here is the call graph for this function:

int BMI_post_send bmi_op_id_t id,
BMI_addr_t  dest,
const void *  buffer,
bmi_size_t  size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Submits send operations for subsequent service.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_post_send_list bmi_op_id_t id,
BMI_addr_t  dest,
const void *const *  buffer_list,
const bmi_size_t size_list,
int  list_count,
bmi_size_t  total_size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Similar to BMI_post_send(), except that the source buffer is replaced by a list of (possibly non contiguous) buffers.

Returns:
0 on success, 1 on immediate successful completion, -errno on failure.

Here is the call graph for this function:

int BMI_post_sendunexpected bmi_op_id_t id,
BMI_addr_t  dest,
const void *  buffer,
bmi_size_t  size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Submits unexpected send operations for subsequent service.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_post_sendunexpected_list bmi_op_id_t id,
BMI_addr_t  dest,
const void *const *  buffer_list,
const bmi_size_t size_list,
int  list_count,
bmi_size_t  total_size,
enum bmi_buffer_type  buffer_type,
bmi_msg_tag_t  tag,
void *  user_ptr,
bmi_context_id  context_id,
bmi_hint  hints
 

Similar to BMI_post_sendunexpected(), except that the source buffer is replaced by a list of (possibly non contiguous) buffers.

Parameters:
total_size the sum of the size list.
Returns:
0 on success, 1 on immediate successful completion, -errno on failure.

Here is the call graph for this function:

int BMI_query_addr_range BMI_addr_t  addr,
const char *  id_string,
int  netmask
 

Given a string representation of a host/network address and a BMI address handle, return whether the BMI address handle is part of the wildcard address range specified by the string.

Returns:
1 on success, -errno on failure and 0 if it is not part of the specified range

Here is the call graph for this function:

int BMI_set_info BMI_addr_t  addr,
int  option,
void *  inout_parameter
 

Pass in optional parameters.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_test bmi_op_id_t  id,
int *  outcount,
bmi_error_code_t error_code,
bmi_size_t actual_size,
void **  user_ptr,
int  max_idle_time_ms,
bmi_context_id  context_id
 

Checks to see if a particular message has completed.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_testcontext int  incount,
bmi_op_id_t out_id_array,
int *  outcount,
bmi_error_code_t error_code_array,
bmi_size_t actual_size_array,
void **  user_ptr_array,
int  max_idle_time_ms,
bmi_context_id  context_id
 

Checks to see if any messages from the specified context have completed.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_testsome int  incount,
bmi_op_id_t id_array,
int *  outcount,
int *  index_array,
bmi_error_code_t error_code_array,
bmi_size_t actual_size_array,
void **  user_ptr_array,
int  max_idle_time_ms,
bmi_context_id  context_id
 

Checks to see if any messages from the specified list have completed.

Returns:
0 on success, -errno on failure.
XXX: never used. May want to add adaptive polling strategy of testcontext if it becomes used again.

Here is the call graph for this function:

int BMI_testunexpected int  incount,
int *  outcount,
struct BMI_unexpected_info info_array,
int  max_idle_time_ms
 

Checks to see if any unexpected messages have completed.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int BMI_unexpected_free BMI_addr_t  addr,
void *  buffer
 

Acknowledge that an unexpected message has been serviced that was returned from BMI_test_unexpected().

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:


Generated on Mon Sep 6 02:47:35 2010 for PVFS by doxygen 1.3.5