photon  1.1
Data Structures | Macros | Enumerations | Functions | Variables
photon_backend.h File Reference
#include "libphoton.h"
#include "photon_buffer.h"
#include "photon_request.h"
#include "photon_msgbuffer.h"
#include "photon_rdma_ledger.h"
#include "photon_rdma_INFO_ledger.h"
#include "photon_rdma_EAGER_buf.h"
#include "htable.h"
#include "logging.h"
#include "squeue.h"
#include "libsync/sync.h"
#include "libsync/queues.h"

Go to the source code of this file.

Data Structures

struct  ProcessInfo
 
struct  photon_mem_register_req
 
struct  photon_ud_hdr
 
struct  photon_backend_attr
 
struct  photonBackend
 

Macros

#define PHOTON_GET_CQ_IND(n, i)   ((n > 1) ? (i % n) : 0)
 
#define DEF_EAGER_BUF_SIZE   (1024*8)
 
#define DEF_PWC_BUF_SIZE   (1024*8)
 
#define DEF_PWC_CID_SIZE   (8)
 
#define DEF_SMALL_MSG_SIZE   (1024)
 
#define DEF_LEDGER_SIZE   (64)
 
#define DEF_SP_SIZE   (128)
 
#define DEF_NUM_CQ   1
 
#define DEF_USE_RCQ   0
 
#define MAX_LEDGER_SIZE   (1<<13)
 
#define MAX_PWC_BUF_SIZE   (1<<13)
 
#define MIN_PWC_BUF_SIZE   (1024)
 
#define UD_MASK_SIZE   (1<<6)
 
#define EVENT_NIL   0x00
 
#define LEDGER   0x01
 
#define EVQUEUE   0x02
 
#define SENDRECV   0x03
 
#define RDMA_FLAG_NIL   0x00
 
#define RDMA_FLAG_NO_CQE   (1<<1)
 
#define RDMA_FLAG_WITH_IMM   (1<<2)
 
#define LEDGER_ALL   0xff
 
#define LEDGER_INFO   (1<<1)
 
#define LEDGER_EAGER   (1<<2)
 
#define LEDGER_FIN   (1<<3)
 
#define LEDGER_PWC   (1<<4)
 
#define LEDGER_BUF   (1<<5)
 
#define LEDGER_PBUF   (1<<6)
 
#define PH_BE_NIL   0x00
 
#define PH_BE_IN_ORDER   (1<<1)
 

Enumerations

enum  photon_connect_mode_t { PHOTON_CONN_ACTIVE, PHOTON_CONN_PASSIVE }
 

Functions

PHOTON_INTERNAL int _photon_initialized (void)
 
PHOTON_INTERNAL int _photon_init (photonConfig cfg, ProcessInfo *info, photonBufferHandle ss)
 
PHOTON_INTERNAL int _photon_cancel (photon_rid request, int flags)
 
PHOTON_INTERNAL int _photon_finalize (void)
 
PHOTON_INTERNAL int _photon_register_buffer (void *buffer, uint64_t size)
 
PHOTON_INTERNAL int _photon_unregister_buffer (void *buffer, uint64_t size)
 
PHOTON_INTERNAL int _photon_test (photon_rid request, int *flag, int *type, photonStatus status)
 
PHOTON_INTERNAL int _photon_wait (photon_rid request)
 
PHOTON_INTERNAL int _photon_send (photonAddr addr, void *ptr, uint64_t size, int flags, photon_rid *request)
 
PHOTON_INTERNAL int _photon_recv (uint64_t request, void *ptr, uint64_t size, int flags)
 
PHOTON_INTERNAL int _photon_post_recv_buffer_rdma (int proc, void *ptr, uint64_t size, int tag, photon_rid *request)
 
PHOTON_INTERNAL int _photon_post_send_buffer_rdma (int proc, void *ptr, uint64_t size, int tag, photon_rid *request)
 
PHOTON_INTERNAL int _photon_post_send_request_rdma (int proc, uint64_t size, int tag, photon_rid *request)
 
PHOTON_INTERNAL int _photon_wait_recv_buffer_rdma (int proc, uint64_t size, int tag, photon_rid *request)
 
PHOTON_INTERNAL int _photon_wait_send_buffer_rdma (int proc, uint64_t size, int tag, photon_rid *request)
 
PHOTON_INTERNAL int _photon_wait_send_request_rdma (int tag)
 
PHOTON_INTERNAL int _photon_post_os_put (photon_rid request, int proc, void *ptr, uint64_t size, int tag, uint64_t r_offset)
 
PHOTON_INTERNAL int _photon_post_os_get (photon_rid request, int proc, void *ptr, uint64_t size, int tag, uint64_t r_offset)
 
PHOTON_INTERNAL int _photon_post_os_put_direct (int proc, void *ptr, uint64_t size, photonBuffer rbuf, int flags, photon_rid *request)
 
PHOTON_INTERNAL int _photon_post_os_get_direct (int proc, void *ptr, uint64_t size, photonBuffer rbuf, int flags, photon_rid *request)
 
PHOTON_INTERNAL int _photon_send_FIN (photon_rid request, int proc, int flags)
 
PHOTON_INTERNAL int _photon_wait_any (int *ret_proc, photon_rid *ret_req)
 
PHOTON_INTERNAL int _photon_wait_any_ledger (int *ret_proc, photon_rid *ret_req)
 
PHOTON_INTERNAL int _photon_probe_ledger (int proc, int *flag, int type, photonStatus status)
 
PHOTON_INTERNAL int _photon_probe (photonAddr addr, int *flag, photonStatus status)
 
PHOTON_INTERNAL int _photon_io_init (char *file, int amode, void *view, int niter)
 
PHOTON_INTERNAL int _photon_io_finalize ()
 
int _photon_get_buffer_private (void *buf, uint64_t size, const struct photon_buffer_priv_t **pptr)
 
int _photon_get_buffer_remote (photon_rid request, photonBuffer ret_buf)
 
int _photon_handle_addr (photonAddr addr, photonAddr ret_addr)
 

Variables

struct photon_backend_t photon_default_backend
 
ProcessInfophoton_processes
 
photonBufferHandle shared_storage
 

Macro Definition Documentation

◆ DEF_EAGER_BUF_SIZE

#define DEF_EAGER_BUF_SIZE   (1024*8)

Definition at line 41 of file photon_backend.h.

◆ DEF_LEDGER_SIZE

#define DEF_LEDGER_SIZE   (64)

Definition at line 45 of file photon_backend.h.

◆ DEF_NUM_CQ

#define DEF_NUM_CQ   1

Definition at line 47 of file photon_backend.h.

◆ DEF_PWC_BUF_SIZE

#define DEF_PWC_BUF_SIZE   (1024*8)

Definition at line 42 of file photon_backend.h.

◆ DEF_PWC_CID_SIZE

#define DEF_PWC_CID_SIZE   (8)

Definition at line 43 of file photon_backend.h.

◆ DEF_SMALL_MSG_SIZE

#define DEF_SMALL_MSG_SIZE   (1024)

Definition at line 44 of file photon_backend.h.

◆ DEF_SP_SIZE

#define DEF_SP_SIZE   (128)

Definition at line 46 of file photon_backend.h.

◆ DEF_USE_RCQ

#define DEF_USE_RCQ   0

Definition at line 48 of file photon_backend.h.

◆ EVENT_NIL

#define EVENT_NIL   0x00

Definition at line 56 of file photon_backend.h.

◆ EVQUEUE

#define EVQUEUE   0x02

Definition at line 58 of file photon_backend.h.

◆ LEDGER

#define LEDGER   0x01

Definition at line 57 of file photon_backend.h.

◆ LEDGER_ALL

#define LEDGER_ALL   0xff

Definition at line 65 of file photon_backend.h.

◆ LEDGER_BUF

#define LEDGER_BUF   (1<<5)

Definition at line 70 of file photon_backend.h.

◆ LEDGER_EAGER

#define LEDGER_EAGER   (1<<2)

Definition at line 67 of file photon_backend.h.

◆ LEDGER_FIN

#define LEDGER_FIN   (1<<3)

Definition at line 68 of file photon_backend.h.

◆ LEDGER_INFO

#define LEDGER_INFO   (1<<1)

Definition at line 66 of file photon_backend.h.

◆ LEDGER_PBUF

#define LEDGER_PBUF   (1<<6)

Definition at line 71 of file photon_backend.h.

◆ LEDGER_PWC

#define LEDGER_PWC   (1<<4)

Definition at line 69 of file photon_backend.h.

◆ MAX_LEDGER_SIZE

#define MAX_LEDGER_SIZE   (1<<13)

Definition at line 50 of file photon_backend.h.

◆ MAX_PWC_BUF_SIZE

#define MAX_PWC_BUF_SIZE   (1<<13)

Definition at line 51 of file photon_backend.h.

◆ MIN_PWC_BUF_SIZE

#define MIN_PWC_BUF_SIZE   (1024)

Definition at line 52 of file photon_backend.h.

◆ PH_BE_IN_ORDER

#define PH_BE_IN_ORDER   (1<<1)

Definition at line 74 of file photon_backend.h.

◆ PH_BE_NIL

#define PH_BE_NIL   0x00

Definition at line 73 of file photon_backend.h.

◆ PHOTON_GET_CQ_IND

#define PHOTON_GET_CQ_IND (   n,
 
)    ((n > 1) ? (i % n) : 0)

Definition at line 39 of file photon_backend.h.

◆ RDMA_FLAG_NIL

#define RDMA_FLAG_NIL   0x00

Definition at line 61 of file photon_backend.h.

◆ RDMA_FLAG_NO_CQE

#define RDMA_FLAG_NO_CQE   (1<<1)

Definition at line 62 of file photon_backend.h.

◆ RDMA_FLAG_WITH_IMM

#define RDMA_FLAG_WITH_IMM   (1<<2)

Definition at line 63 of file photon_backend.h.

◆ SENDRECV

#define SENDRECV   0x03

Definition at line 59 of file photon_backend.h.

◆ UD_MASK_SIZE

#define UD_MASK_SIZE   (1<<6)

Definition at line 54 of file photon_backend.h.

Enumeration Type Documentation

◆ photon_connect_mode_t

Enumerator
PHOTON_CONN_ACTIVE 
PHOTON_CONN_PASSIVE 

Definition at line 76 of file photon_backend.h.

Function Documentation

◆ _photon_cancel()

PHOTON_INTERNAL int _photon_cancel ( photon_rid  request,
int  flags 
)

Definition at line 279 of file photon_backend.c.

◆ _photon_finalize()

PHOTON_INTERNAL int _photon_finalize ( void  )

Definition at line 298 of file photon_backend.c.

◆ _photon_get_buffer_private()

int _photon_get_buffer_private ( void *  buf,
uint64_t  size,
const struct photon_buffer_priv_t **  pptr 
)

Definition at line 1663 of file photon_backend.c.

◆ _photon_get_buffer_remote()

int _photon_get_buffer_remote ( photon_rid  request,
photonBuffer  ret_buf 
)

Definition at line 1686 of file photon_backend.c.

◆ _photon_handle_addr()

int _photon_handle_addr ( photonAddr  addr,
photonAddr  ret_addr 
)

Definition at line 1636 of file photon_backend.c.

◆ _photon_init()

PHOTON_INTERNAL int _photon_init ( photonConfig  cfg,
ProcessInfo info,
photonBufferHandle  ss 
)

Definition at line 49 of file photon_backend.c.

◆ _photon_initialized()

PHOTON_INTERNAL int _photon_initialized ( void  )

◆ _photon_io_finalize()

PHOTON_INTERNAL int _photon_io_finalize ( )

Definition at line 1624 of file photon_backend.c.

◆ _photon_io_init()

PHOTON_INTERNAL int _photon_io_init ( char *  file,
int  amode,
void *  view,
int  niter 
)

Definition at line 1614 of file photon_backend.c.

◆ _photon_post_os_get()

PHOTON_INTERNAL int _photon_post_os_get ( photon_rid  request,
int  proc,
void *  ptr,
uint64_t  size,
int  tag,
uint64_t  r_offset 
)

Definition at line 1169 of file photon_backend.c.

◆ _photon_post_os_get_direct()

PHOTON_INTERNAL int _photon_post_os_get_direct ( int  proc,
void *  ptr,
uint64_t  size,
photonBuffer  rbuf,
int  flags,
photon_rid request 
)

Definition at line 1308 of file photon_backend.c.

◆ _photon_post_os_put()

PHOTON_INTERNAL int _photon_post_os_put ( photon_rid  request,
int  proc,
void *  ptr,
uint64_t  size,
int  tag,
uint64_t  r_offset 
)

Definition at line 1106 of file photon_backend.c.

◆ _photon_post_os_put_direct()

PHOTON_INTERNAL int _photon_post_os_put_direct ( int  proc,
void *  ptr,
uint64_t  size,
photonBuffer  rbuf,
int  flags,
photon_rid request 
)

Definition at line 1259 of file photon_backend.c.

◆ _photon_post_recv_buffer_rdma()

PHOTON_INTERNAL int _photon_post_recv_buffer_rdma ( int  proc,
void *  ptr,
uint64_t  size,
int  tag,
photon_rid request 
)

Definition at line 545 of file photon_backend.c.

◆ _photon_post_send_buffer_rdma()

PHOTON_INTERNAL int _photon_post_send_buffer_rdma ( int  proc,
void *  ptr,
uint64_t  size,
int  tag,
photon_rid request 
)

Definition at line 821 of file photon_backend.c.

◆ _photon_post_send_request_rdma()

PHOTON_INTERNAL int _photon_post_send_request_rdma ( int  proc,
uint64_t  size,
int  tag,
photon_rid request 
)

Definition at line 849 of file photon_backend.c.

◆ _photon_probe()

PHOTON_INTERNAL int _photon_probe ( photonAddr  addr,
int *  flag,
photonStatus  status 
)

Definition at line 1587 of file photon_backend.c.

◆ _photon_probe_ledger()

PHOTON_INTERNAL int _photon_probe_ledger ( int  proc,
int *  flag,
int  type,
photonStatus  status 
)

Definition at line 1504 of file photon_backend.c.

◆ _photon_recv()

PHOTON_INTERNAL int _photon_recv ( uint64_t  request,
void *  ptr,
uint64_t  size,
int  flags 
)

Definition at line 541 of file photon_backend.c.

◆ _photon_register_buffer()

PHOTON_INTERNAL int _photon_register_buffer ( void *  buffer,
uint64_t  size 
)

Definition at line 324 of file photon_backend.c.

◆ _photon_send()

PHOTON_INTERNAL int _photon_send ( photonAddr  addr,
void *  ptr,
uint64_t  size,
int  flags,
photon_rid request 
)

Definition at line 537 of file photon_backend.c.

◆ _photon_send_FIN()

PHOTON_INTERNAL int _photon_send_FIN ( photon_rid  request,
int  proc,
int  flags 
)

Definition at line 1356 of file photon_backend.c.

◆ _photon_test()

PHOTON_INTERNAL int _photon_test ( photon_rid  request,
int *  flag,
int *  type,
photonStatus  status 
)

Definition at line 423 of file photon_backend.c.

◆ _photon_unregister_buffer()

PHOTON_INTERNAL int _photon_unregister_buffer ( void *  buffer,
uint64_t  size 
)

Definition at line 380 of file photon_backend.c.

◆ _photon_wait()

PHOTON_INTERNAL int _photon_wait ( photon_rid  request)

Definition at line 507 of file photon_backend.c.

◆ _photon_wait_any()

PHOTON_INTERNAL int _photon_wait_any ( int *  ret_proc,
photon_rid ret_req 
)

Definition at line 1433 of file photon_backend.c.

◆ _photon_wait_any_ledger()

PHOTON_INTERNAL int _photon_wait_any_ledger ( int *  ret_proc,
photon_rid ret_req 
)

Definition at line 1455 of file photon_backend.c.

◆ _photon_wait_recv_buffer_rdma()

PHOTON_INTERNAL int _photon_wait_recv_buffer_rdma ( int  proc,
uint64_t  size,
int  tag,
photon_rid request 
)

Definition at line 932 of file photon_backend.c.

◆ _photon_wait_send_buffer_rdma()

PHOTON_INTERNAL int _photon_wait_send_buffer_rdma ( int  proc,
uint64_t  size,
int  tag,
photon_rid request 
)

Definition at line 982 of file photon_backend.c.

◆ _photon_wait_send_request_rdma()

PHOTON_INTERNAL int _photon_wait_send_request_rdma ( int  tag)

Definition at line 1061 of file photon_backend.c.

Variable Documentation

◆ photon_default_backend

struct photon_backend_t photon_default_backend

◆ photon_processes

ProcessInfo* photon_processes

Definition at line 33 of file photon_backend.c.

◆ shared_storage

photonBufferHandle shared_storage

Definition at line 32 of file photon_backend.c.