PadicoTM

Documentation

« back to PM2 home.

PSP driver for Infiniband Verbs. More...

#include <Padico/Puk.h>
#include <Padico/Module.h>
#include <Padico/PadicoTM.h>
#include <Padico/Topology.h>
#include <Padico/PSP.h>
#include <Padico/PadicoControl.h>
#include <Padico/Timing.h>
#include "InfinibandVerbs.h"
#include <infiniband/verbs.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/resource.h>
#include <time.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
Include dependency graph for psp-ibv.c:

Go to the source code of this file.

Data Structures

struct  padico_ibv_addr_s
 
struct  lr2_header_s
 
struct  padico_ibv_lz_cell_s
 
struct  padico_ibv_lz_cell_s::padico_ibv_lz_header_s
 
struct  padico_ibv_lz_header_s
 
struct  padico_ibv_connection_hash_entry_s
 stores an entry in the hashtable More...
 
struct  padico_ibv_connection_hash_entry_block_lfstack_cell_s
 
struct  padico_ibv_connection_hash_entry_block_lfstack_s
 
struct  padico_ibv_connection_hash_entry_slice_lfstack_cell_s
 
struct  padico_ibv_connection_hash_entry_slice_lfstack_s
 
struct  padico_ibv_connection_hash_entry_allocator_s
 
struct  padico_ibv_connection_hashtable_s
 
struct  padico_ibv_connection_hashtable_enumerator_s
 
struct  padico_ibv_s
 
struct  padico_ibv_connector_s
 
struct  psp_ibv_instance_s
 

Macros

#define PADICO_IBV_TX_DEPTH   20 /* 2 */
 
#define PADICO_IBV_RX_DEPTH   2 /* 2 */
 
#define PADICO_IBV_RDMA_DEPTH   2 /* 8 */
 
#define PADICO_IBV_MAX_SG_SQ   2 /* 16 */
 
#define PADICO_IBV_MAX_SG_RQ   2
 
#define PADICO_IBV_MAX_INLINE   512 /* 512 */
 
#define PADICO_IBV_LZ_THRESHOLD   (32*1024) /* 64 kB */
 
#define PADICO_IBV_LZ_BUFSIZE   (16*1024) /* 32 kB */
 
#define PADICO_IBV_LZ_BUFNUM   48
 
#define PADICO_IBV_LZ_CREDITS_THRESHOLD   40
 
#define PADICO_IBV_LZ_CREDITS_GUARD   4
 
#define PADICO_IBV_LZ_STATUS_EMPTY   0x00
 no message in LZ
 
#define PADICO_IBV_LZ_STATUS_DATA   0x01
 data in LZ (sent by copy)
 
#define PADICO_IBV_LZ_STATUS_BYRDV   0x02
 data sent as attachment through rdma

 
#define PADICO_IBV_LZ_STATUS_RVREQ   0x04
 message is a r.
 
#define PADICO_IBV_LZ_STATUS_CREDITS   0x08
 message contains credits
 
#define PADICO_IBV_LR2_BUFSIZE   (512*1024)
 
#define PADICO_IBV_LR2_NBUF   3
 
#define PADICO_IBV_LR2_BLOCKSIZE   4096
 
#define PSP_IBV_HEADER_SIZE   72
 
#define PSP_IBV_FRAG_SIZE   ((size_t)(32*1024*1024)) /* 128 MB */
 

Typedefs

typedef uint32_t(* padico_ibv_connection_hash_hfunc_t) (padico_topo_node_t key)
 
typedef int(* padico_ibv_connection_hash_eqfunc_t) (padico_topo_node_t key1, padico_topo_node_t key2)
 
typedef void(* padico_ibv_connection_hash_destructor_t) (padico_topo_node_t key, padico_ibv_connection_t data)
 
typedef struct padico_ibv_connection_hash_entry_block_lfstack_s padico_ibv_connection_hash_entry_block_lfstack_t
 
typedef struct padico_ibv_connection_hash_entry_slice_lfstack_s padico_ibv_connection_hash_entry_slice_lfstack_t
 
typedef struct padico_ibv_connection_hash_entry_allocator_s * padico_ibv_connection_hash_entry_allocator_t
 
typedef struct padico_ibv_connection_hashtable_s * padico_ibv_connection_hashtable_t
 
typedef struct padico_ibv_connection_hashtable_enumerator_s * padico_ibv_connection_hashtable_enumerator_t
 

Enumerations

enum  {
  PADICO_WRID_RECV = 1 , PADICO_WRID_SEND = 2 , PADICO_WRID_SP_CHUNK = 3 , PADICO_WRID_SP_ACK = 4 ,
  PADICO_WRID_NUM = 5
}
 

Functions

static int padico_ibv_init (void)
 
static void padico_ibv_finalize (void)
 
static void padico_module_create_initializer__PSP_InfinibandVerbs (void)
 
static void * psp_ibv_instantiate (puk_instance_t ai, puk_context_t context)
 
static void psp_ibv_destroy (void *_instance)
 
static void psp_ibv_init (void *_instance, uint32_t tag, const char *label, size_t *h_size, padico_psp_handler_t handler, void *key)
 
static void psp_ibv_connect (void *_instance, padico_topo_node_t remote_node)
 
static padico_psp_connection_t psp_ibv_new_message (void *_instance, padico_topo_node_t node, void **_sbuf)
 
static void psp_ibv_pack (void *_instance, padico_psp_connection_t _conn, const char *bytes, size_t size)
 
static void psp_ibv_end_message (void *_instance, padico_psp_connection_t _conn)
 
struct lr2_header_s __attribute__ ((packed))
 
struct padico_ibv_lz_cell_s __attribute__ ((packed, aligned(__alignof__(unsigned int))))
 
struct padico_ibv_connection_hash_entry_block_lfstack_cell_s __attribute__ ((aligned(16)))
 
 __attribute__ ((unused))
 lookup in the oldtable; if found, migrate row and return cell in regular table
 
 __attribute__ ((unused, nonnull))
 initialize a new hashtable
 
static struct padico_ibv_connection_hash_entry_s * padico_ibv_connection_hash_entry_lookup (padico_ibv_connection_hashtable_t h, const padico_topo_node_t key)
 
static void padico_ibv_connection_hash_entry_insert (padico_ibv_connection_hashtable_t h, padico_topo_node_t key, padico_ibv_connection_t data)
 
static int padico_ibv_connection_hash_entry_oldprobe (padico_ibv_connection_hashtable_t h, const padico_topo_node_t key)
 
static void padico_ibv_connection_hash_entry_rehash_row (padico_ibv_connection_hashtable_t h, ssize_t z)
 
static void padico_ibv_connection_hash_entry_rehash_n (padico_ibv_connection_hashtable_t h, ssize_t n)
 
static void padico_ibv_connection_hash_entry_rehash_flush (padico_ibv_connection_hashtable_t h)
 
 __attribute__ ((unused, nonnull(1)))
 insert an entry into a hashtable
 
static int padico_ibv_poll_lz_all (void)
 
static void padico_ibv_wait_any (void)
 wait for any event in the rdma landing zone
 
static void padico_ibv_wait_one (struct padico_ibv_connection_s *conn)
 wait for an event in a given rdma connection
 
static int padico_ibv_min (const int a, const int b)
 
static void padico_assert (int cond, const char *msg,...)
 
static void padico_ibv_lock (void)
 
static void padico_ibv_unlock (void)
 
static struct padico_ibv_connection_s * padico_ibv_connection_init (padico_topo_node_t remote_node)
 Create a (not-connected-yet) connection structure.
 
static void padico_ibv_connection_connect (struct padico_ibv_connection_s *conn, struct padico_ibv_addr_s *dest)
 Connect an (already created) connection to peer.
 
static void padico_ibv_request_connect (struct padico_ibv_connection_s *conn, padico_topo_node_t remote_node)
 
static void * padico_ibv_connector (void *_arg)
 asynchronous worker for connection establishment
 
static void padico_ibv_connect_start_handler (puk_parse_entity_t e)
 
static void padico_ibv_do_rdma_send (struct padico_ibv_connection_s *conn, uint32_t lkey, void *buf, int size, uint32_t rkey, uintptr_t _raddr, uint64_t wrid)
 
static void padico_ibv_do_send_wait (struct padico_ibv_connection_s *conn, uint64_t wrid)
 
static void padico_ibv_do_zone_send (struct padico_ibv_connection_s *conn, void *buf, int size, void *raddr, uint64_t wrid)
 
static void padico_ibv_do_recv (struct padico_ibv_connection_s *conn, uint32_t lkey, void *buf, int size)
 
static void padico_ibv_do_recv_wait (struct padico_ibv_connection_s *conn)
 
static int padico_ibv_lz_recover_credits (struct padico_ibv_connection_s *conn)
 
static void padico_ibv_idle (struct padico_ibv_connection_s *conn)
 
static void padico_ibv_lz_send (struct padico_ibv_connection_s *conn, struct iovec *buffers, int num)
 
static void padico_ibv_sp_send (struct padico_ibv_connection_s *conn, const void *buf, int size)
 
static void padico_ibv_send (struct padico_ibv_connection_s *conn, const void *buf, int size)
 
static void padico_ibv_lz_process_incoming (struct padico_ibv_connection_s *conn, struct padico_ibv_lz_header_s *h)
 
static void padico_ibv_lz_cell_completed (struct padico_ibv_connection_s *conn, struct padico_ibv_lz_header_s *h)
 acknowledges the processing completion of an incoming LZ cell.
 
static void padico_ibv_lz_recv (struct padico_ibv_connection_s *conn, void *buf, int size)
 
static void padico_ibv_sp_recv (struct padico_ibv_connection_s *conn, void *buf, int size)
 
static void padico_ibv_recv (struct padico_ibv_connection_s *conn, void *buf, int size)
 
static void psp_ibv_pump (void *token, void *bytes, size_t size)
 
static void * psp_ibv_worker (void *dummy)
 

Variables

struct puk_mod_binary_s padico_mod_binary__PSP_InfinibandVerbs = { .name = "PSP_InfinibandVerbs", .funcs = &padico_mod_funcs__PSP_InfinibandVerbs , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_0 , .n_deps = sizeof((char*[]){ 0, "PadicoControl", "PSP", "InfinibandVerbs" }) / sizeof(char*), .deps = { NULL, "PadicoControl", "PSP", "InfinibandVerbs" } }
 
static const struct puk_mod_funcs_s padico_mod_funcs__PSP_InfinibandVerbs = { .init = ( padico_ibv_init ), .run = ( NULL ), .finalize = ( padico_ibv_finalize ) }
 
static const struct puk_component_driver_s psp_ibv_component_driver
 instanciation facet for PSP-IBV
 
static const struct padico_psp_driver_s psp_ibv_driver
 'PadicoSimplePackets' facet for PSP-IBV
 
static const int lr2_steps []
 
static const int lr2_nsteps = sizeof(lr2_steps) / sizeof(int) - 1
 
volatile uint8_t busy
 
static const int lr2_hsize = sizeof(struct lr2_header_s)
 
char buffer [(16 *1024)]
 
struct padico_ibv_lz_header_s header
 
 padico_ibv_connection
 
struct ibv_qp * qp
 
struct ibv_cq * of_cq
 
struct ibv_cq * if_cq
 
struct padico_ibv_addr_s local_addr
 
padico_topo_node_t remote_node
 
uint32_t max_inline
 max size of data for IBV inline
 
struct { 
 
   uint64_t   raddr 
 base absolute address of the remote LZ More...
 
   uint32_t   rkey 
 rkey of the remote MR More...
 
   uint32_t   next_out 
 next sequence number for outgoing packet More...
 
   uint32_t   credits 
 remaining credits for sending More...
 
   uint32_t   next_in 
 cell number of next expected packet More...
 
   uint32_t   to_ack 
 credits not acked yet by the receiver More...
 
   int   pending [PADICO_WRID_NUM] 
 
   struct { 
 
      const char *   message 
 
      int   size 
 
      int   done 
 
      void *   rbuf 
 
      void *   sbuf 
 
      int   step 
 
      int   nbuffer 
 
   }   send 
 
   struct { 
 
      char *   message 
 
      int   size 
 
      void *   rbuf 
 
      int   done 
 
      int   step 
 
      int   nbuffer 
 
   }   recv 
 
   struct { 
 
      struct padico_ibv_lz_cell_s   cells [48] 
 
      struct padico_ibv_lz_cell_s   out_cell [2] 
 
      struct padico_ibv_lz_header_s   rv_buf 
 prepare outgoing r. More...
 
      struct padico_ibv_lz_header_s   rv_box 
 incoming r. More...
 
      char   sbuf [(512 *1024) *3] 
 
      char   rbuf [(512 *1024) *3] 
 
      volatile uint32_t   rack 
 
      volatile uint32_t   sack 
 
   }   zones 
 
   struct ibv_mr *   mr 
 
} lz 
 
struct padico_ibv_connection_hash_entry_block_lfstack_cell_s * _next
 
struct padico_ibv_connection_hash_entry_block_lfstack_s __attribute__
 
struct padico_ibv_connection_hash_entry_block_lfstack_cell_s block []
 
static struct padico_ibv_s padico_ibv
 

Detailed Description

PSP driver for Infiniband Verbs.

Note
This file contains excerpts from OpenIB.org examples released under the the terms of the GNU General Public License (GPL) Version 2. Copyright (c) 2005 Topspin Communications.

Definition in file psp-ibv.c.

Macro Definition Documentation

◆ PADICO_IBV_LR2_BLOCKSIZE

#define PADICO_IBV_LR2_BLOCKSIZE   4096

Definition at line 166 of file psp-ibv.c.

◆ PADICO_IBV_LR2_BUFSIZE

#define PADICO_IBV_LR2_BUFSIZE   (512*1024)

Definition at line 164 of file psp-ibv.c.

◆ PADICO_IBV_LR2_NBUF

#define PADICO_IBV_LR2_NBUF   3

Definition at line 165 of file psp-ibv.c.

◆ PADICO_IBV_LZ_BUFNUM

#define PADICO_IBV_LZ_BUFNUM   48

Definition at line 155 of file psp-ibv.c.

◆ PADICO_IBV_LZ_BUFSIZE

#define PADICO_IBV_LZ_BUFSIZE   (16*1024) /* 32 kB */

Definition at line 154 of file psp-ibv.c.

◆ PADICO_IBV_LZ_CREDITS_GUARD

#define PADICO_IBV_LZ_CREDITS_GUARD   4

Definition at line 157 of file psp-ibv.c.

◆ PADICO_IBV_LZ_CREDITS_THRESHOLD

#define PADICO_IBV_LZ_CREDITS_THRESHOLD   40

Definition at line 156 of file psp-ibv.c.

◆ PADICO_IBV_LZ_STATUS_BYRDV

#define PADICO_IBV_LZ_STATUS_BYRDV   0x02

data sent as attachment through rdma

Definition at line 160 of file psp-ibv.c.

◆ PADICO_IBV_LZ_STATUS_CREDITS

#define PADICO_IBV_LZ_STATUS_CREDITS   0x08

message contains credits

Definition at line 162 of file psp-ibv.c.

◆ PADICO_IBV_LZ_STATUS_DATA

#define PADICO_IBV_LZ_STATUS_DATA   0x01

data in LZ (sent by copy)

Definition at line 159 of file psp-ibv.c.

◆ PADICO_IBV_LZ_STATUS_EMPTY

#define PADICO_IBV_LZ_STATUS_EMPTY   0x00

no message in LZ

Definition at line 158 of file psp-ibv.c.

◆ PADICO_IBV_LZ_STATUS_RVREQ

#define PADICO_IBV_LZ_STATUS_RVREQ   0x04

message is a r.

-v. request

Definition at line 161 of file psp-ibv.c.

◆ PADICO_IBV_LZ_THRESHOLD

#define PADICO_IBV_LZ_THRESHOLD   (32*1024) /* 64 kB */

Definition at line 153 of file psp-ibv.c.

◆ PADICO_IBV_MAX_INLINE

#define PADICO_IBV_MAX_INLINE   512 /* 512 */

Definition at line 151 of file psp-ibv.c.

◆ PADICO_IBV_MAX_SG_RQ

#define PADICO_IBV_MAX_SG_RQ   2

Definition at line 150 of file psp-ibv.c.

◆ PADICO_IBV_MAX_SG_SQ

#define PADICO_IBV_MAX_SG_SQ   2 /* 16 */

Definition at line 149 of file psp-ibv.c.

◆ PADICO_IBV_RDMA_DEPTH

#define PADICO_IBV_RDMA_DEPTH   2 /* 8 */

Definition at line 148 of file psp-ibv.c.

◆ PADICO_IBV_RX_DEPTH

#define PADICO_IBV_RX_DEPTH   2 /* 2 */

Definition at line 147 of file psp-ibv.c.

◆ PADICO_IBV_TX_DEPTH

#define PADICO_IBV_TX_DEPTH   20 /* 2 */

Definition at line 146 of file psp-ibv.c.

◆ PSP_IBV_FRAG_SIZE

#define PSP_IBV_FRAG_SIZE   ((size_t)(32*1024*1024)) /* 128 MB */

Definition at line 1050 of file psp-ibv.c.

◆ PSP_IBV_HEADER_SIZE

#define PSP_IBV_HEADER_SIZE   72

Definition at line 1049 of file psp-ibv.c.

Typedef Documentation

◆ padico_ibv_connection_hash_destructor_t

typedef void(* padico_ibv_connection_hash_destructor_t) (padico_topo_node_t key, padico_ibv_connection_t data)

Definition at line 243 of file psp-ibv.c.

◆ padico_ibv_connection_hash_entry_allocator_t

◆ padico_ibv_connection_hash_entry_block_lfstack_t

◆ padico_ibv_connection_hash_entry_slice_lfstack_t

◆ padico_ibv_connection_hash_eqfunc_t

typedef int(* padico_ibv_connection_hash_eqfunc_t) (padico_topo_node_t key1, padico_topo_node_t key2)

Definition at line 243 of file psp-ibv.c.

◆ padico_ibv_connection_hash_hfunc_t

typedef uint32_t(* padico_ibv_connection_hash_hfunc_t) (padico_topo_node_t key)

Definition at line 243 of file psp-ibv.c.

◆ padico_ibv_connection_hashtable_enumerator_t

◆ padico_ibv_connection_hashtable_t

Enumeration Type Documentation

◆ anonymous enum

Enumerator
PADICO_WRID_RECV 
PADICO_WRID_SEND 
PADICO_WRID_SP_CHUNK 
PADICO_WRID_SP_ACK 
PADICO_WRID_NUM 

Definition at line 129 of file psp-ibv.c.

Function Documentation

◆ __attribute__() [1/6]

◆ __attribute__() [2/6]

struct lr2_header_s __attribute__ ( (packed)  )

◆ __attribute__() [3/6]

◆ __attribute__() [4/6]

__attribute__ ( (unused)  )

lookup in the oldtable; if found, migrate row and return cell in regular table

get the seq part of a tagged ptr

pop key & data of any element in the table

remove entry with given key from hashtable; does nothing if key not found

allocate a new hashtable

trigger progressive rehashing

flush all rows of a pending rehash

lookup an entry in the hashtable

insert an entry in the given table, without rehashing

make progress on rehash for n rows

force rehashing of given row

Definition at line 243 of file psp-ibv.c.

◆ __attribute__() [5/6]

__attribute__ ( (unused, nonnull(1))  )

insert an entry into a hashtable

returns <key,value> associated with given key, outkey is set to NULL if key not found

probes whether an entry with given key exists in the hashtable

returns value associated with key, NULL if not found

Definition at line 243 of file psp-ibv.c.

◆ __attribute__() [6/6]

__attribute__ ( (unused, nonnull)  )

initialize a new hashtable

deallocate a hashtable

destroy a hashtable

Definition at line 243 of file psp-ibv.c.

◆ padico_assert()

◆ padico_ibv_connect_start_handler()

static void padico_ibv_connect_start_handler ( puk_parse_entity_t  e)
static

◆ padico_ibv_connection_connect()

◆ padico_ibv_connection_hash_entry_insert()

static void padico_ibv_connection_hash_entry_insert ( padico_ibv_connection_hashtable_t  h,
padico_topo_node_t  key,
padico_ibv_connection_t  data 
)
inlinestatic

◆ padico_ibv_connection_hash_entry_lookup()

static struct padico_ibv_connection_hash_entry_s * padico_ibv_connection_hash_entry_lookup ( padico_ibv_connection_hashtable_t  h,
const padico_topo_node_t  key 
)
inlinestatic

◆ padico_ibv_connection_hash_entry_oldprobe()

static int padico_ibv_connection_hash_entry_oldprobe ( padico_ibv_connection_hashtable_t  h,
const padico_topo_node_t  key 
)
inlinestatic

◆ padico_ibv_connection_hash_entry_rehash_flush()

static void padico_ibv_connection_hash_entry_rehash_flush ( padico_ibv_connection_hashtable_t  h)
inlinestatic

◆ padico_ibv_connection_hash_entry_rehash_n()

static void padico_ibv_connection_hash_entry_rehash_n ( padico_ibv_connection_hashtable_t  h,
ssize_t  n 
)
inlinestatic

◆ padico_ibv_connection_hash_entry_rehash_row()

static void padico_ibv_connection_hash_entry_rehash_row ( padico_ibv_connection_hashtable_t  h,
ssize_t  z 
)
inlinestatic

◆ padico_ibv_connection_init()

◆ padico_ibv_connector()

static void * padico_ibv_connector ( void *  _arg)
static

◆ padico_ibv_do_rdma_send()

static void padico_ibv_do_rdma_send ( struct padico_ibv_connection_s *  conn,
uint32_t  lkey,
void *  buf,
int  size,
uint32_t  rkey,
uintptr_t  _raddr,
uint64_t  wrid 
)
inlinestatic

Definition at line 516 of file psp-ibv.c.

References done, NULL, padico_assert(), raddr, rc, rkey, and size.

Referenced by padico_ibv_do_zone_send().

◆ padico_ibv_do_recv()

static void padico_ibv_do_recv ( struct padico_ibv_connection_s *  conn,
uint32_t  lkey,
void *  buf,
int  size 
)
inlinestatic

Definition at line 571 of file psp-ibv.c.

References done, padico_assert(), PADICO_WRID_RECV, rc, and size.

◆ padico_ibv_do_recv_wait()

static void padico_ibv_do_recv_wait ( struct padico_ibv_connection_s *  conn)
inlinestatic

Definition at line 588 of file psp-ibv.c.

References done, padico_assert(), and ready.

◆ padico_ibv_do_send_wait()

static void padico_ibv_do_send_wait ( struct padico_ibv_connection_s *  conn,
uint64_t  wrid 
)
inlinestatic

◆ padico_ibv_do_zone_send()

static void padico_ibv_do_zone_send ( struct padico_ibv_connection_s *  conn,
void *  buf,
int  size,
void *  raddr,
uint64_t  wrid 
)
inlinestatic

◆ padico_ibv_finalize()

static void padico_ibv_finalize ( void  )
static

◆ padico_ibv_idle()

static void padico_ibv_idle ( struct padico_ibv_connection_s *  conn)
inlinestatic

Definition at line 625 of file psp-ibv.c.

References done, padico_ibv_lock(), and padico_ibv_unlock().

Referenced by padico_ibv_lz_process_incoming(), and padico_ibv_lz_send().

◆ padico_ibv_init()

◆ padico_ibv_lock()

◆ padico_ibv_lz_cell_completed()

static void padico_ibv_lz_cell_completed ( struct padico_ibv_connection_s *  conn,
struct padico_ibv_lz_header_s *  h 
)
inlinestatic

acknowledges the processing completion of an incoming LZ cell.

Definition at line 839 of file psp-ibv.c.

References done, h, and PADICO_IBV_LZ_BUFNUM.

Referenced by padico_ibv_lz_recv(), and psp_ibv_worker().

◆ padico_ibv_lz_process_incoming()

◆ padico_ibv_lz_recover_credits()

◆ padico_ibv_lz_recv()

◆ padico_ibv_lz_send()

◆ padico_ibv_min()

static int padico_ibv_min ( const int  a,
const int  b 
)
inlinestatic

Definition at line 272 of file psp-ibv.c.

References a, and b.

Referenced by padico_ibv_sp_recv(), and padico_ibv_sp_send().

◆ padico_ibv_poll_lz_all()

static int padico_ibv_poll_lz_all ( void  )
inlinestatic

Definition at line 962 of file psp-ibv.c.

References padico_ibv_s::conns, done, i, padico_ibv, and ready.

Referenced by padico_ibv_wait_any().

◆ padico_ibv_recv()

static void padico_ibv_recv ( struct padico_ibv_connection_s *  conn,
void *  buf,
int  size 
)
static

Definition at line 947 of file psp-ibv.c.

References done, padico_ibv_lz_recv(), PADICO_IBV_LZ_THRESHOLD, padico_ibv_sp_recv(), and size.

Referenced by psp_ibv_pump(), and psp_ibv_worker().

◆ padico_ibv_request_connect()

◆ padico_ibv_send()

static void padico_ibv_send ( struct padico_ibv_connection_s *  conn,
const void *  buf,
int  size 
)
static

◆ padico_ibv_sp_recv()

◆ padico_ibv_sp_send()

static void padico_ibv_sp_send ( struct padico_ibv_connection_s *  conn,
const void *  buf,
int  size 
)
static

◆ padico_ibv_unlock()

◆ padico_ibv_wait_any()

static void padico_ibv_wait_any ( void  )
inlinestatic

wait for any event in the rdma landing zone

Definition at line 1011 of file psp-ibv.c.

References done, NULL, padico_ibv, padico_ibv_lock(), padico_ibv_poll_lz_all(), padico_ibv_unlock(), and ready.

Referenced by padico_ibv_wait_one(), and psp_ibv_worker().

◆ padico_ibv_wait_one()

static void padico_ibv_wait_one ( struct padico_ibv_connection_s *  conn)
inlinestatic

wait for an event in a given rdma connection

Definition at line 1030 of file psp-ibv.c.

References cell(), done, padico_ibv_lock(), padico_ibv_unlock(), and padico_ibv_wait_any().

Referenced by padico_ibv_lz_recv().

◆ padico_module_create_initializer__PSP_InfinibandVerbs()

static void padico_module_create_initializer__PSP_InfinibandVerbs ( void  )
static

Definition at line 69 of file psp-ibv.c.

◆ psp_ibv_connect()

◆ psp_ibv_destroy()

static void psp_ibv_destroy ( void *  _instance)
static

Definition at line 1113 of file psp-ibv.c.

References done, instance, padico_ibv, padico_psp_slot_remove(), and padico_ibv_s::slots.

◆ psp_ibv_end_message()

static void psp_ibv_end_message ( void *  _instance,
padico_psp_connection_t  _conn 
)
static

Definition at line 1205 of file psp-ibv.c.

References done, instance, padico_ibv_send(), and PSP_IBV_HEADER_SIZE.

◆ psp_ibv_init()

static void psp_ibv_init ( void *  _instance,
uint32_t  tag,
const char *  label,
size_t *  h_size,
padico_psp_handler_t  handler,
void *  key 
)
static

◆ psp_ibv_instantiate()

static void * psp_ibv_instantiate ( puk_instance_t  ai,
puk_context_t  context 
)
static

Definition at line 1106 of file psp-ibv.c.

References done, instance, and NULL.

◆ psp_ibv_new_message()

static padico_psp_connection_t psp_ibv_new_message ( void *  _instance,
padico_topo_node_t  node,
void **  _sbuf 
)
static

◆ psp_ibv_pack()

static void psp_ibv_pack ( void *  _instance,
padico_psp_connection_t  _conn,
const char *  bytes,
size_t  size 
)
static

◆ psp_ibv_pump()

static void psp_ibv_pump ( void *  token,
void *  bytes,
size_t  size 
)
static

Definition at line 1060 of file psp-ibv.c.

References done, padico_ibv_recv(), and size.

Referenced by psp_ibv_worker().

◆ psp_ibv_worker()

Variable Documentation

◆ __attribute__

◆ _next

◆ block

◆ buffer

char buffer[(16 *1024)]

Definition at line 0 of file psp-ibv.c.

◆ busy

Definition at line 0 of file psp-ibv.c.

◆ cells

Definition at line 229 of file psp-ibv.c.

◆ credits

uint32_t credits

remaining credits for sending

Definition at line 203 of file psp-ibv.c.

◆ done

◆ header

◆ if_cq

struct ibv_cq* if_cq

Definition at line 193 of file psp-ibv.c.

◆ local_addr

Definition at line 194 of file psp-ibv.c.

◆ lr2_hsize

const int lr2_hsize = sizeof(struct lr2_header_s)
static

Definition at line 176 of file psp-ibv.c.

Referenced by padico_ibv_sp_recv(), and padico_ibv_sp_send().

◆ lr2_nsteps

const int lr2_nsteps = sizeof(lr2_steps) / sizeof(int) - 1
static

Definition at line 169 of file psp-ibv.c.

Referenced by padico_ibv_sp_recv(), and padico_ibv_sp_send().

◆ lr2_steps

const int lr2_steps[]
static
Initial value:
=
{ 12*1024, 24*1024, 40*1024, 64*1024, 88*1024, 128*1024, 0}

Definition at line 167 of file psp-ibv.c.

Referenced by padico_ibv_sp_recv(), and padico_ibv_sp_send().

◆ [struct]

struct { ... } lz

◆ max_inline

uint32_t max_inline

max size of data for IBV inline

Definition at line 196 of file psp-ibv.c.

◆ message

◆ mr

Definition at line 238 of file psp-ibv.c.

◆ nbuffer

int nbuffer

Definition at line 215 of file psp-ibv.c.

◆ next_in

uint32_t next_in

cell number of next expected packet

Definition at line 204 of file psp-ibv.c.

◆ next_out

uint32_t next_out

next sequence number for outgoing packet

Definition at line 202 of file psp-ibv.c.

◆ of_cq

struct ibv_cq* of_cq

Definition at line 192 of file psp-ibv.c.

◆ out_cell

Definition at line 230 of file psp-ibv.c.

◆ padico_ibv

◆ padico_ibv_connection

padico_ibv_connection

Definition at line 190 of file psp-ibv.c.

◆ padico_mod_binary__PSP_InfinibandVerbs

struct puk_mod_binary_s padico_mod_binary__PSP_InfinibandVerbs = { .name = "PSP_InfinibandVerbs", .funcs = &padico_mod_funcs__PSP_InfinibandVerbs , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_0 , .n_deps = sizeof((char*[]){ 0, "PadicoControl", "PSP", "InfinibandVerbs" }) / sizeof(char*), .deps = { NULL, "PadicoControl", "PSP", "InfinibandVerbs" } }

Definition at line 69 of file psp-ibv.c.

◆ padico_mod_funcs__PSP_InfinibandVerbs

const struct puk_mod_funcs_s padico_mod_funcs__PSP_InfinibandVerbs = { .init = ( padico_ibv_init ), .run = ( NULL ), .finalize = ( padico_ibv_finalize ) }
static

Definition at line 69 of file psp-ibv.c.

◆ pending

int pending[PADICO_WRID_NUM]

Definition at line 206 of file psp-ibv.c.

Referenced by padico_ibv_lz_send(), padico_vio_accept(), and vpf_recv_post().

◆ qp

Definition at line 191 of file psp-ibv.c.

◆ rack

Definition at line 235 of file psp-ibv.c.

◆ raddr

◆ rbuf

char rbuf[(512 *1024) * 3]

Definition at line 212 of file psp-ibv.c.

Referenced by vpipe_write().

◆ [struct]

◆ remote_node

◆ rkey

uint32_t rkey

rkey of the remote MR

Definition at line 201 of file psp-ibv.c.

Referenced by padico_ibv_do_rdma_send().

◆ rv_box

incoming r.

-v. (for outgoing messages)

Definition at line 232 of file psp-ibv.c.

◆ rv_buf

prepare outgoing r.

-v. (for incoming messages)

Definition at line 231 of file psp-ibv.c.

◆ sack

Definition at line 236 of file psp-ibv.c.

◆ sbuf

char sbuf[(512 *1024) * 3]

Definition at line 213 of file psp-ibv.c.

Referenced by padico_psp_new_message(), and psp_sf_new_message().

◆ [struct]

struct { ... } send

◆ size

◆ step

int step

Definition at line 214 of file psp-ibv.c.

◆ to_ack

uint32_t to_ack

credits not acked yet by the receiver

Definition at line 205 of file psp-ibv.c.

◆ [struct]

struct { ... } zones