Motr  M0
link.c File Reference
#include "lib/trace.h"
#include "ha/link.h"
#include "ut/ut.h"
#include "lib/time.h"
#include "lib/arith.h"
#include "lib/memory.h"
#include "lib/string.h"
#include "fid/fid.h"
#include "reqh/reqh_service.h"
#include "ut/threads.h"
#include "ha/ut/helper.h"
#include "ha/link_service.h"
Include dependency graph for link.c:

Go to the source code of this file.

Data Structures

struct  ha_ut_link_ctx
 
struct  ha_ut_link_mt_test
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 

Enumerations

enum  { HA_UT_THREAD_PAIR_NR = 0x10, HA_UT_MSG_PER_THREAD = 0x20 }
 
enum  { HA_UT_LINK_RECONNECT_MULTIPLE_NR_LINKS = 0x2 }
 

Functions

static void ha_ut_link_conn_cfg_create (struct m0_ha_link_conn_cfg *hl_conn_cfg, struct m0_uint128 *id_local, struct m0_uint128 *id_remote, struct m0_uint128 *id_connection, bool tag_even, const char *ep)
 
static void ha_ut_link_cfg_create (struct m0_ha_link_cfg *hl_cfg, struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service)
 
static void ha_ut_link_conn_cfg_free (struct m0_ha_link_conn_cfg *hl_conn_cfg)
 
static void ha_ut_link_init (struct ha_ut_link_ctx *link_ctx, struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service, struct m0_uint128 *id_local, struct m0_uint128 *id_remote, struct m0_uint128 *id_connection, bool tag_even, bool start)
 
static void ha_ut_link_fini (struct ha_ut_link_ctx *link_ctx)
 
static void ha_ut_link_set_some_msg (struct m0_ha_msg *msg)
 
void m0_ha_ut_link_usecase (void)
 
static void ha_ut_link_mt_thread (void *param)
 
 M0_UT_THREADS_DEFINE (ha_ut_link_mt, &ha_ut_link_mt_thread)
 
void m0_ha_ut_link_multithreaded (void)
 
static void ha_ut_links_init (struct m0_ha_ut_rpc_ctx **rpc_ctx, struct m0_reqh_service **hl_service, int nr_links, struct ha_ut_link_ctx ***ctx, struct m0_ha_link ***hl, struct m0_uint128 *id1, struct m0_uint128 *id2, struct m0_uint128 *id, int *tag_even, bool start)
 
static void ha_ut_links_fini (struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service, int nr_links, struct ha_ut_link_ctx **ctx, struct m0_ha_link **hl)
 
static void ha_ut_link_msg_transfer (struct m0_ha_link *hl1, struct m0_ha_link *hl2)
 
void m0_ha_ut_link_reconnect_simple (void)
 
void m0_ha_ut_link_reconnect_multiple (void)