Motr  M0
LNet Transport
Collaboration diagram for LNet Transport:

Modules

 LNet Buffer Event Queue Interface
 
 LNet Transport Core Interfaces
 
 LNet Transport Device
 
 LNet Transport XO Interface
 

Enumerations

enum  { M0_NET_LNET_PID = 12345, M0_NET_LNET_XEP_ADDR_LEN = 80, M0_NET_LNET_TM_STAT_INTERVAL_SECS = 60 * 5 }
 

Functions

M0_INTERNAL int m0_net_lnet_ep_addr_net_cmp (const char *addr1, const char *addr2)
 
M0_INTERNAL int m0_net_lnet_ifaces_get (struct m0_net_domain *dom, char ***addrs)
 
M0_INTERNAL void m0_net_lnet_ifaces_put (struct m0_net_domain *dom, char ***addrs)
 
M0_INTERNAL int m0_net_lnet_init (void)
 
M0_INTERNAL void m0_net_lnet_fini (void)
 
M0_INTERNAL void m0_net_lnet_dom_set_debug (struct m0_net_domain *dom, unsigned dbg)
 
M0_INTERNAL void m0_net_lnet_tm_set_debug (struct m0_net_transfer_mc *tm, unsigned dbg)
 
 module_param (quiet, bool, S_IRUGO)
 
 MODULE_PARM_DESC (quiet, "quiet mode")
 
 module_param (verbose, int, S_IRUGO)
 
 MODULE_PARM_DESC (verbose, "verbosity level")
 
 module_param (client_only, bool, S_IRUGO)
 
 MODULE_PARM_DESC (verbose, "run client only")
 
 module_param (server_only, bool, S_IRUGO)
 
 MODULE_PARM_DESC (server_only, "run server only")
 
 module_param (async_events, bool, S_IRUGO)
 
 MODULE_PARM_DESC (async_events, "async event processing (old style)")
 
 module_param (nr_bufs, uint, S_IRUGO)
 
 MODULE_PARM_DESC (nr_bufs, "total number of network buffers to allocate")
 
 module_param (nr_recv_bufs, uint, S_IRUGO)
 
 MODULE_PARM_DESC (nr_recv_bufs, "number of receive buffers (server only)")
 
 module_param (bulk_size, charp, S_IRUGO)
 
 MODULE_PARM_DESC (bulk_size, "bulk data size")
 
 module_param (active_bulk_delay, int, S_IRUGO)
 
 MODULE_PARM_DESC (active_bulk_delay, "Delay before sending active receive")
 
 module_param (nr_clients, int, S_IRUGO)
 
 MODULE_PARM_DESC (nr_clients, "number of client threads")
 
 module_param (loops, int, S_IRUGO)
 
 MODULE_PARM_DESC (loops, "loops to run")
 
 module_param (bulk_timeout, int, S_IRUGO)
 
 MODULE_PARM_DESC (bulk_timeout, "bulk timeout")
 
 module_param (msg_timeout, int, S_IRUGO)
 
 MODULE_PARM_DESC (msg_timeout, "message timeout")
 
 module_param (client_network, charp, S_IRUGO)
 
 MODULE_PARM_DESC (client_network, "client network interface (ip@intf)")
 
 module_param (client_portal, int, S_IRUGO)
 
 MODULE_PARM_DESC (client_portal, "client portal (optional)")
 
 module_param (client_tmid, int, S_IRUGO)
 
 MODULE_PARM_DESC (client_tmid, "client base TMID (optional)")
 
 module_param (server_network, charp, S_IRUGO)
 
 MODULE_PARM_DESC (server_network, "server network interface (ip@intf)")
 
 module_param (server_portal, int, S_IRUGO)
 
 MODULE_PARM_DESC (server_portal, "server portal (optional)")
 
 module_param (server_tmid, int, S_IRUGO)
 
 MODULE_PARM_DESC (server_tmid, "server TMID (optional)")
 
 module_param (server_min_recv_size, int, S_IRUGO)
 
 MODULE_PARM_DESC (server_min_recv_size, "server min receive size (optional)")
 
 module_param (server_max_recv_msgs, int, S_IRUGO)
 
 MODULE_PARM_DESC (server_max_recv_msgs, "server max receive msgs (optional)")
 
 module_param (send_msg_size, int, S_IRUGO)
 
 MODULE_PARM_DESC (send_msg_size, "client message size (optional)")
 
 module_param (server_debug, int, S_IRUGO)
 
 MODULE_PARM_DESC (server_debug, "server debug (optional)")
 
 module_param (client_debug, int, S_IRUGO)
 
 MODULE_PARM_DESC (client_debug, "client debug (optional)")
 
static int quiet_printk (const char *fmt,...)
 
static int verbose_printk (const char *fmt,...)
 
static int __init m0_netst_init_k (void)
 
static void __exit m0_netst_fini_k (void)
 

Variables

const struct m0_net_xprt m0_net_lnet_xprt
 
const struct m0_net_xprt m0_net_lnet_xprt
 
static bool quiet = false
 
static int verbose = 0
 
static bool client_only = false
 
static bool server_only = false
 
static bool async_events = false
 
static uint nr_bufs = PING_DEF_BUFS
 
static uint nr_recv_bufs = 0
 
static char * bulk_size = NULL
 
static int active_bulk_delay = 0
 
static int nr_clients = PING_DEF_CLIENT_THREADS
 
static int loops = PING_DEF_LOOPS
 
static int bulk_timeout = PING_DEF_BULK_TIMEOUT
 
static int msg_timeout = PING_DEF_MSG_TIMEOUT
 
static char * client_network = NULL
 
static int client_portal = -1
 
static int client_tmid = PING_CLIENT_DYNAMIC_TMID
 
static char * server_network = NULL
 
static int server_portal = -1
 
static int server_tmid = -1
 
static int server_min_recv_size = -1
 
static int server_max_recv_msgs = -1
 
static int send_msg_size = -1
 
static int server_debug = 0
 
static int client_debug = 0
 
static struct nlx_ping_ops verbose_ops
 
static struct nlx_ping_ops quiet_ops
 
static struct nlx_ping_ctx sctx
 
static struct m0_thread server_thread
 
static struct m0_threadclient_thread
 
static struct nlx_ping_client_paramsparams
 

Detailed Description

The external interfaces of the LNet transport are obtained by including the file net/lnet/lnet.h. The m0_net_lnet_xprt variable represents the transport itself and is used as an argument to m0_net_domain_init().

An end point address for this transport is of the form:

NetworkIdentifierString : PID : PortalNumber : TransferMachineIdentifier

For example:

10.72.49.14@o2ib0:12345:31:0
192.168.96.128@tcp1:12345:32:*

The PID value of 12345 is used by Lustre in the kernel and is the only value currently supported. The symbolic constant M0_NET_LNET_PID provides this value.

The "*" indicates a dynamic assignment of a transfer machine identifier. This syntax is valid only when starting a transfer machine with the m0_net_tm_start() subroutine; it is intended for use by ephemeral processes like management utilities and user interactive programs, not by servers.

Some LNet transport idiosyncrasies to be aware of:

See also
LNet Transport DLD

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_NET_LNET_PID 

The Lustre PID value used in the kernel.

M0_NET_LNET_XEP_ADDR_LEN 

Maximum LNet end point address length.

M0_NET_LNET_TM_STAT_INTERVAL_SECS 

Report TM statistics once every 5 minutes by default.

Definition at line 116 of file lnet.h.

Function Documentation

◆ m0_net_lnet_dom_set_debug()

M0_INTERNAL void m0_net_lnet_dom_set_debug ( struct m0_net_domain dom,
unsigned  dbg 
)

Definition at line 977 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_ep_addr_net_cmp()

M0_INTERNAL int m0_net_lnet_ep_addr_net_cmp ( const char *  addr1,
const char *  addr2 
)

Subroutine compares the network portions of two LNet end point address strings.

Return values
-1if any of the two strings do not have a colon character.
intReturn value like strcmp().

Definition at line 941 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_fini()

M0_INTERNAL void m0_net_lnet_fini ( void  )

Definition at line 933 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_ifaces_get()

M0_INTERNAL int m0_net_lnet_ifaces_get ( struct m0_net_domain dom,
char ***  addrs 
)

Gets a list of strings corresponding to the local LNET network interfaces. The returned array must be released using m0_net_lnet_ifaces_put().

Parameters
domPointer to the domain.
addrsA NULL-terminated (like argv) array of NID strings is returned.

Definition at line 955 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_ifaces_put()

M0_INTERNAL void m0_net_lnet_ifaces_put ( struct m0_net_domain dom,
char ***  addrs 
)

Releases the string array returned by m0_net_lnet_ifaces_get().

Definition at line 966 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_init()

M0_INTERNAL int m0_net_lnet_init ( void  )

Definition at line 923 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_lnet_tm_set_debug()

M0_INTERNAL void m0_net_lnet_tm_set_debug ( struct m0_net_transfer_mc tm,
unsigned  dbg 
)

Definition at line 992 of file lnet_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_netst_fini_k()

static void __exit m0_netst_fini_k ( void  )
static

Definition at line 309 of file m0lnetping_main.c.

Here is the call graph for this function:

◆ m0_netst_init_k()

static int __init m0_netst_init_k ( void  )
static

Definition at line 179 of file m0lnetping_main.c.

Here is the call graph for this function:

◆ module_param() [1/24]

module_param ( quiet  ,
bool  ,
S_IRUGO   
)

◆ module_param() [2/24]

module_param ( verbose  ,
int  ,
S_IRUGO   
)

◆ module_param() [3/24]

module_param ( client_only  ,
bool  ,
S_IRUGO   
)

◆ module_param() [4/24]

module_param ( server_only  ,
bool  ,
S_IRUGO   
)

◆ module_param() [5/24]

module_param ( async_events  ,
bool  ,
S_IRUGO   
)

◆ module_param() [6/24]

module_param ( nr_bufs  ,
uint  ,
S_IRUGO   
)

◆ module_param() [7/24]

module_param ( nr_recv_bufs  ,
uint  ,
S_IRUGO   
)

◆ module_param() [8/24]

module_param ( bulk_size  ,
charp  ,
S_IRUGO   
)

◆ module_param() [9/24]

module_param ( active_bulk_delay  ,
int  ,
S_IRUGO   
)

◆ module_param() [10/24]

module_param ( nr_clients  ,
int  ,
S_IRUGO   
)

◆ module_param() [11/24]

module_param ( loops  ,
int  ,
S_IRUGO   
)

◆ module_param() [12/24]

module_param ( bulk_timeout  ,
int  ,
S_IRUGO   
)

◆ module_param() [13/24]

module_param ( msg_timeout  ,
int  ,
S_IRUGO   
)

◆ module_param() [14/24]

module_param ( client_network  ,
charp  ,
S_IRUGO   
)

◆ module_param() [15/24]

module_param ( client_portal  ,
int  ,
S_IRUGO   
)

◆ module_param() [16/24]

module_param ( client_tmid  ,
int  ,
S_IRUGO   
)

◆ module_param() [17/24]

module_param ( server_network  ,
charp  ,
S_IRUGO   
)

◆ module_param() [18/24]

module_param ( server_portal  ,
int  ,
S_IRUGO   
)

◆ module_param() [19/24]

module_param ( server_tmid  ,
int  ,
S_IRUGO   
)

◆ module_param() [20/24]

module_param ( server_min_recv_size  ,
int  ,
S_IRUGO   
)

◆ module_param() [21/24]

module_param ( server_max_recv_msgs  ,
int  ,
S_IRUGO   
)

◆ module_param() [22/24]

module_param ( send_msg_size  ,
int  ,
S_IRUGO   
)

◆ module_param() [23/24]

module_param ( server_debug  ,
int  ,
S_IRUGO   
)

◆ module_param() [24/24]

module_param ( client_debug  ,
int  ,
S_IRUGO   
)

◆ MODULE_PARM_DESC() [1/24]

MODULE_PARM_DESC ( quiet  ,
"quiet mode  
)

◆ MODULE_PARM_DESC() [2/24]

MODULE_PARM_DESC ( verbose  ,
"verbosity level  
)

◆ MODULE_PARM_DESC() [3/24]

MODULE_PARM_DESC ( verbose  ,
"run client only"   
)

◆ MODULE_PARM_DESC() [4/24]

MODULE_PARM_DESC ( server_only  ,
"run server only"   
)

◆ MODULE_PARM_DESC() [5/24]

MODULE_PARM_DESC ( async_events  ,
"async event processing (old style)"   
)

◆ MODULE_PARM_DESC() [6/24]

MODULE_PARM_DESC ( nr_bufs  ,
"total number of network buffers to allocate"   
)

◆ MODULE_PARM_DESC() [7/24]

MODULE_PARM_DESC ( nr_recv_bufs  ,
"number of receive buffers (server only)"   
)

◆ MODULE_PARM_DESC() [8/24]

MODULE_PARM_DESC ( bulk_size  ,
"bulk data size  
)

◆ MODULE_PARM_DESC() [9/24]

MODULE_PARM_DESC ( active_bulk_delay  ,
"Delay before sending active receive"   
)

◆ MODULE_PARM_DESC() [10/24]

MODULE_PARM_DESC ( nr_clients  ,
"number of client threads"   
)

◆ MODULE_PARM_DESC() [11/24]

MODULE_PARM_DESC ( loops  ,
"loops to run  
)

◆ MODULE_PARM_DESC() [12/24]

MODULE_PARM_DESC ( bulk_timeout  ,
"bulk timeout  
)

◆ MODULE_PARM_DESC() [13/24]

MODULE_PARM_DESC ( msg_timeout  ,
"message timeout  
)

◆ MODULE_PARM_DESC() [14/24]

MODULE_PARM_DESC ( client_network  ,
"client network interface (ip@intf)"   
)

◆ MODULE_PARM_DESC() [15/24]

MODULE_PARM_DESC ( client_portal  ,
"client portal (optional)"   
)

◆ MODULE_PARM_DESC() [16/24]

MODULE_PARM_DESC ( client_tmid  ,
"client base TMID (optional)"   
)

◆ MODULE_PARM_DESC() [17/24]

MODULE_PARM_DESC ( server_network  ,
"server network interface (ip@intf)"   
)

◆ MODULE_PARM_DESC() [18/24]

MODULE_PARM_DESC ( server_portal  ,
"server portal (optional)"   
)

◆ MODULE_PARM_DESC() [19/24]

MODULE_PARM_DESC ( server_tmid  ,
"server TMID (optional)"   
)

◆ MODULE_PARM_DESC() [20/24]

MODULE_PARM_DESC ( server_min_recv_size  ,
"server min receive size (optional)"   
)

◆ MODULE_PARM_DESC() [21/24]

MODULE_PARM_DESC ( server_max_recv_msgs  ,
"server max receive msgs (optional)"   
)

◆ MODULE_PARM_DESC() [22/24]

MODULE_PARM_DESC ( send_msg_size  ,
"client message size (optional)"   
)

◆ MODULE_PARM_DESC() [23/24]

MODULE_PARM_DESC ( server_debug  ,
"server debug (optional)"   
)

◆ MODULE_PARM_DESC() [24/24]

MODULE_PARM_DESC ( client_debug  ,
"client debug (optional)"   
)

◆ quiet_printk()

static int quiet_printk ( const char *  fmt,
  ... 
)
static

Definition at line 135 of file m0lnetping_main.c.

◆ verbose_printk()

static int verbose_printk ( const char *  fmt,
  ... 
)
static

Definition at line 140 of file m0lnetping_main.c.

Here is the call graph for this function:

Variable Documentation

◆ active_bulk_delay

int active_bulk_delay = 0
static

Definition at line 71 of file m0lnetping_main.c.

◆ async_events

bool async_events = false
static

Definition at line 55 of file m0lnetping_main.c.

◆ bulk_size

char* bulk_size = NULL
static

Definition at line 67 of file m0lnetping_main.c.

◆ bulk_timeout

int bulk_timeout = PING_DEF_BULK_TIMEOUT
static

Definition at line 83 of file m0lnetping_main.c.

◆ client_debug

int client_debug = 0
static

Definition at line 131 of file m0lnetping_main.c.

◆ client_network

char* client_network = NULL
static

Definition at line 91 of file m0lnetping_main.c.

◆ client_only

bool client_only = false
static

Definition at line 47 of file m0lnetping_main.c.

◆ client_portal

int client_portal = -1
static

Definition at line 95 of file m0lnetping_main.c.

◆ client_thread

struct m0_thread* client_thread
static

Definition at line 176 of file m0lnetping_main.c.

◆ client_tmid

int client_tmid = PING_CLIENT_DYNAMIC_TMID
static

Definition at line 99 of file m0lnetping_main.c.

◆ loops

int loops = PING_DEF_LOOPS
static

Definition at line 79 of file m0lnetping_main.c.

◆ m0_net_lnet_xprt [1/2]

const struct m0_net_xprt m0_net_lnet_xprt

The LNet transport is used by specifying this data structure to the m0_net_domain_init() subroutine.

Definition at line 679 of file lnet_xo.c.

◆ m0_net_lnet_xprt [2/2]

const struct m0_net_xprt m0_net_lnet_xprt
Initial value:
= {
.nx_name = "lnet",
.nx_ops = &nlx_xo_xprt_ops
}
static const struct m0_net_xprt_ops nlx_xo_xprt_ops
Definition: lnet_xo.c:642

The LNet transport is used by specifying this data structure to the m0_net_domain_init() subroutine.

Definition at line 679 of file lnet_xo.c.

◆ msg_timeout

int msg_timeout = PING_DEF_MSG_TIMEOUT
static

Definition at line 87 of file m0lnetping_main.c.

◆ nr_bufs

uint nr_bufs = PING_DEF_BUFS
static

Definition at line 59 of file m0lnetping_main.c.

◆ nr_clients

int nr_clients = PING_DEF_CLIENT_THREADS
static

Definition at line 75 of file m0lnetping_main.c.

◆ nr_recv_bufs

uint nr_recv_bufs = 0
static

Definition at line 63 of file m0lnetping_main.c.

◆ params

Definition at line 177 of file m0lnetping_main.c.

◆ quiet

bool quiet = false
static

Definition at line 39 of file m0lnetping_main.c.

◆ quiet_ops

struct nlx_ping_ops quiet_ops
static
Initial value:
= {
.pf = quiet_printk,
}
static int quiet_printk(const char *fmt,...)
void nlx_ping_print_qstats_tm(struct nlx_ping_ctx *ctx, bool reset)
Definition: ping.c:136

Definition at line 164 of file m0lnetping_main.c.

◆ sctx

struct nlx_ping_ctx sctx
static
Initial value:
= {
.pc_tm = {
.ntm_state = M0_NET_TM_UNDEFINED
}
}

Definition at line 169 of file m0lnetping_main.c.

◆ send_msg_size

int send_msg_size = -1
static

Definition at line 123 of file m0lnetping_main.c.

◆ server_debug

int server_debug = 0
static

Definition at line 127 of file m0lnetping_main.c.

◆ server_max_recv_msgs

int server_max_recv_msgs = -1
static

Definition at line 119 of file m0lnetping_main.c.

◆ server_min_recv_size

int server_min_recv_size = -1
static

Definition at line 115 of file m0lnetping_main.c.

◆ server_network

char* server_network = NULL
static

Definition at line 103 of file m0lnetping_main.c.

◆ server_only

bool server_only = false
static

Definition at line 51 of file m0lnetping_main.c.

◆ server_portal

int server_portal = -1
static

Definition at line 107 of file m0lnetping_main.c.

◆ server_thread

struct m0_thread server_thread
static

Definition at line 175 of file m0lnetping_main.c.

◆ server_tmid

int server_tmid = -1
static

Definition at line 111 of file m0lnetping_main.c.

◆ verbose

int verbose = 0
static

Definition at line 43 of file m0lnetping_main.c.

◆ verbose_ops

struct nlx_ping_ops verbose_ops
static
Initial value:
= {
}
static int verbose_printk(const char *fmt,...)
void nlx_ping_print_qstats_tm(struct nlx_ping_ctx *ctx, bool reset)
Definition: ping.c:136

Definition at line 159 of file m0lnetping_main.c.