14 #ifndef PHOTON_REQUEST_H 15 #define PHOTON_REQUEST_H 24 #include "bit_array/bit_array.h" 25 #include "libsync/locks.h" 26 #include "libsync/queues.h" 28 #define DEF_NR_LEVELS (14) // up to 14 levels of request buffers 29 #define DEF_NUM_REQUESTS (1024) // 1K pre-allocated requests per rank, power of 2 30 #define DEF_MAX_REQUESTS (1<<20) // Allows up to 1M requests per pank 32 #define NULL_REQUEST 0x0 33 #define DEF_MAX_BUF_ENTRIES 64 // The number msgbuf entries for UD mode 35 #define REQUEST_NEW 0x01 36 #define REQUEST_PENDING 0x02 37 #define REQUEST_FAILED 0x03 38 #define REQUEST_COMPLETED 0x04 39 #define REQUEST_FREE 0x05 41 #define REQUEST_COOK_MASK 0xfff00000 42 #define REQUEST_COOK_NIL 0xff000000 43 #define REQUEST_COOK_SEND 0xff100000 44 #define REQUEST_COOK_RECV 0xff200000 45 #define REQUEST_COOK_EAGER 0xff300000 46 #define REQUEST_COOK_ELEDG 0xff400000 47 #define REQUEST_COOK_PLEDG 0xff500000 48 #define REQUEST_COOK_EBUF 0xff600000 49 #define REQUEST_COOK_PBUF 0xff700000 50 #define REQUEST_COOK_FIN 0xff800000 51 #define REQUEST_COOK_SINFO 0xff900000 52 #define REQUEST_COOK_RINFO 0xffa00000 53 #define REQUEST_COOK_GPWC 0xffb00000 55 #define REQUEST_OP_DEFAULT 0x0000 56 #define REQUEST_OP_SENDBUF (1<<1) 57 #define REQUEST_OP_SENDREQ (1<<2) 58 #define REQUEST_OP_SENDFIN (1<<3) 59 #define REQUEST_OP_RECVBUF (1<<4) 60 #define REQUEST_OP_PWC (1<<5) 61 #define REQUEST_OP_COLL (1<<6) 63 #define REQUEST_FLAG_NIL 0x0000 64 #define REQUEST_FLAG_WFIN (1<<1) 65 #define REQUEST_FLAG_EAGER (1<<2) 66 #define REQUEST_FLAG_EDONE (1<<3) 67 #define REQUEST_FLAG_LDONE (1<<4) 68 #define REQUEST_FLAG_NO_LCE (1<<5) 69 #define REQUEST_FLAG_NO_RCE (1<<6) 70 #define REQUEST_FLAG_ROP (1<<7) 71 #define REQUEST_FLAG_1PWC (1<<8) 72 #define REQUEST_FLAG_2PWC (1<<9) 73 #define REQUEST_FLAG_CMD (1<<10) 75 #define MARK_DONE(e,s) (sync_fadd(&e->tail, s, SYNC_RELAXED)) 76 #define PROC_REQUEST_ID(p,id) (((uint64_t)p<<32) | id) 77 #define IS_VALID_PROC(p) ((p >= 0) && (p < _photon_nproc)) 79 typedef struct photon_req_t {
106 typedef struct photon_req_table_t {
136 int proc,
int events);
Convenience pointer type for the buffer structure.
The Photon completion ID used by the PWC API.
struct photon_ri_ledger_entry_t * photonRILedgerEntry
PHOTON_INTERNAL int photon_request_init(photonConfig cfg)
PHOTON_INTERNAL photonRequest photon_setup_request_ledger_info(photonRILedgerEntry ri_entry, int curr, int proc)
struct photon_req_t ** reqs
struct photon_rdma_ledger_entry_t * photonRDMALedgerEntry
struct photon_req_table_t * photonRequestTable
uint64_t photon_rid
The Photon request ID.
photonRequest photon_lookup_request(photon_rid rid)
PHOTON_INTERNAL photonRequest photon_get_request(int proc)
two_lock_queue_t * comp_q
PHOTON_INTERNAL int photon_count_request(int proc)
union photon_addr_t * photonAddr
Convenience pointer type for the address union.
PHOTON_INTERNAL photonRequest photon_setup_request_direct(photonBuffer lbuf, photonBuffer rbuf, uint64_t size, int proc, int events)
struct photon_req_t * photonRequest
PHOTON_INTERNAL photonRequest photon_setup_request_recv(photonAddr addr, int msn, int msize, int bindex, int nbufs)
volatile uint32_t gpcount
PHOTON_INTERNAL photonRequest photon_setup_request_ledger_eager(photonRDMALedgerEntry l_entry, int curr, int proc)
two_lock_queue_t * gwc_pwc_q
PHOTON_INTERNAL photonRequest photon_setup_request_send(photonAddr addr, int *bufs, int nbufs)
PHOTON_INTERNAL int photon_free_request(photonRequest req)