w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11Rdma.hpp>
Public Types | |
enum | stats { kStatNQueRMem , kStatNQueWMem , kStatNRdmaRMem , kStatNRdmaWMem , kStatNExtClist , kStatNFailRdma , kDimStat } |
enum | status { kStatusDone , kStatusBusy , kStatusBusyLast , kStatusFailRdma } |
typedef std::function< void(int, size_t, size_t, RlinkCommandList &)> | precb_t |
typedef std::function< void(int, size_t, RlinkCommandList &, size_t)> | postcb_t |
Public Member Functions | |
Rw11Rdma (Rw11Cntl *pcntl, precb_t &&precb, postcb_t &&postcb) | |
Constructor. | |
virtual | ~Rw11Rdma () |
Destructor. | |
Rw11Rdma (const Rw11Rdma &)=delete | |
Rw11Rdma & | operator= (const Rw11Rdma &)=delete |
Rw11Cntl & | CntlBase () const |
FIXME_docs. | |
Rw11Cpu & | Cpu () const |
FIXME_docs. | |
Rw11 & | W11 () const |
FIXME_docs. | |
RlinkServer & | Server () const |
FIXME_docs. | |
RlinkConnect & | Connect () const |
FIXME_docs. | |
RlogFile & | LogFile () const |
FIXME_docs. | |
void | SetChunkSize (size_t chunk) |
FIXME_docs. | |
size_t | ChunkSize () const |
FIXME_docs. | |
bool | IsActive () const |
FIXME_docs. | |
void | QueueRMem (uint32_t addr, uint16_t *block, size_t size, uint16_t mode) |
FIXME_docs. | |
void | QueueWMem (uint32_t addr, const uint16_t *block, size_t size, uint16_t mode) |
FIXME_docs. | |
Rstats & | Stats () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Protected Member Functions | |
void | SetupRdma (bool iswmem, uint32_t addr, uint16_t *block, size_t size, uint16_t mode) |
FIXME_docs. | |
int | RdmaHandler () |
FIXME_docs. | |
virtual void | PreRdmaHook () |
FIXME_docs. | |
virtual void | PostRdmaHook (size_t nwdone) |
FIXME_docs. | |
Protected Attributes | |
Rw11Cntl * | fpCntlBase |
plain Rw11Cntl ptr | |
precb_t | fPreExecCB |
pre Exec callback | |
postcb_t | fPostExecCB |
post Exec callback | |
size_t | fChunksize |
channel chunk size | |
enum status | fStatus |
dma status | |
bool | fIsWMem |
is memory write | |
uint32_t | fAddr |
current mem address | |
uint16_t | fMode |
current mode | |
size_t | fNWordMax |
transfer chunk size | |
size_t | fNWordRest |
words to be done | |
size_t | fNWordDone |
words transfered | |
uint16_t * | fpBlock |
current buffer pointer | |
Rstats | fStats |
statistics | |
Additional Inherited Members | |
Static Public Attributes inherited from Retro::Rbits | |
static const uint8_t | kBBit00 = 1u<< 0 |
static const uint8_t | kBBit01 = 1u<< 1 |
static const uint8_t | kBBit02 = 1u<< 2 |
static const uint8_t | kBBit03 = 1u<< 3 |
static const uint8_t | kBBit04 = 1u<< 4 |
static const uint8_t | kBBit05 = 1u<< 5 |
static const uint8_t | kBBit06 = 1u<< 6 |
static const uint8_t | kBBit07 = 1u<< 7 |
static const uint16_t | kWBit00 = 1u<< 0 |
static const uint16_t | kWBit01 = 1u<< 1 |
static const uint16_t | kWBit02 = 1u<< 2 |
static const uint16_t | kWBit03 = 1u<< 3 |
static const uint16_t | kWBit04 = 1u<< 4 |
static const uint16_t | kWBit05 = 1u<< 5 |
static const uint16_t | kWBit06 = 1u<< 6 |
static const uint16_t | kWBit07 = 1u<< 7 |
static const uint16_t | kWBit08 = 1u<< 8 |
static const uint16_t | kWBit09 = 1u<< 9 |
static const uint16_t | kWBit10 = 1u<<10 |
static const uint16_t | kWBit11 = 1u<<11 |
static const uint16_t | kWBit12 = 1u<<12 |
static const uint16_t | kWBit13 = 1u<<13 |
static const uint16_t | kWBit14 = 1u<<14 |
static const uint16_t | kWBit15 = 1u<<15 |
static const uint32_t | kLBit00 = 1u<< 0 |
static const uint32_t | kLBit01 = 1u<< 1 |
static const uint32_t | kLBit02 = 1u<< 2 |
static const uint32_t | kLBit03 = 1u<< 3 |
static const uint32_t | kLBit04 = 1u<< 4 |
static const uint32_t | kLBit05 = 1u<< 5 |
static const uint32_t | kLBit06 = 1u<< 6 |
static const uint32_t | kLBit07 = 1u<< 7 |
static const uint32_t | kLBit08 = 1u<< 8 |
static const uint32_t | kLBit09 = 1u<< 9 |
static const uint32_t | kLBit10 = 1u<<10 |
static const uint32_t | kLBit11 = 1u<<11 |
static const uint32_t | kLBit12 = 1u<<12 |
static const uint32_t | kLBit13 = 1u<<13 |
static const uint32_t | kLBit14 = 1u<<14 |
static const uint32_t | kLBit15 = 1u<<15 |
static const uint32_t | kLBit16 = 1u<<16 |
static const uint32_t | kLBit17 = 1u<<17 |
static const uint32_t | kLBit18 = 1u<<18 |
static const uint32_t | kLBit19 = 1u<<19 |
static const uint32_t | kLBit20 = 1u<<20 |
static const uint32_t | kLBit21 = 1u<<21 |
static const uint32_t | kLBit22 = 1u<<22 |
static const uint32_t | kLBit23 = 1u<<23 |
static const uint32_t | kLBit24 = 1u<<24 |
static const uint32_t | kLBit25 = 1u<<25 |
static const uint32_t | kLBit26 = 1u<<26 |
static const uint32_t | kLBit27 = 1u<<27 |
static const uint32_t | kLBit28 = 1u<<28 |
static const uint32_t | kLBit29 = 1u<<29 |
static const uint32_t | kLBit30 = 1u<<30 |
static const uint32_t | kLBit31 = 1u<<31 |
FIXME_docs.
Definition at line 34 of file Rw11Rdma.hpp.
typedef std::function<void(int,size_t,size_t, RlinkCommandList&)> Retro::Rw11Rdma::precb_t |
Definition at line 38 of file Rw11Rdma.hpp.
typedef std::function<void(int,size_t, RlinkCommandList&,size_t)> Retro::Rw11Rdma::postcb_t |
Definition at line 40 of file Rw11Rdma.hpp.
Definition at line 71 of file Rw11Rdma.hpp.
Enumerator | |
---|---|
kStatusDone | all chunks done and ok |
kStatusBusy | more chunks to come |
kStatusBusyLast | last chunk to come |
kStatusFailRdma | last rdma transfer failed |
Definition at line 82 of file Rw11Rdma.hpp.
Constructor.
Definition at line 43 of file Rw11Rdma.cpp.
References Retro::Rstats::Define(), fStats, kStatNExtClist, kStatNFailRdma, kStatNQueRMem, kStatNQueWMem, kStatNRdmaRMem, and kStatNRdmaWMem.
|
virtual |
Destructor.
Definition at line 69 of file Rw11Rdma.cpp.
|
delete |
|
inline |
FIXME_docs.
Definition at line 21 of file Rw11Rdma.ipp.
References fpCntlBase.
Referenced by SetChunkSize().
|
inline |
FIXME_docs.
Definition at line 29 of file Rw11Rdma.ipp.
References Retro::Rw11Cntl::Cpu(), and fpCntlBase.
Referenced by RdmaHandler().
|
inline |
FIXME_docs.
Definition at line 37 of file Rw11Rdma.ipp.
References fpCntlBase, and Retro::Rw11Cntl::W11().
|
inline |
FIXME_docs.
Definition at line 45 of file Rw11Rdma.ipp.
References fpCntlBase, and Retro::Rw11Cntl::Server().
Referenced by QueueRMem(), QueueWMem(), and RdmaHandler().
|
inline |
FIXME_docs.
Definition at line 53 of file Rw11Rdma.ipp.
References Retro::Rw11Cntl::Connect(), and fpCntlBase.
Referenced by SetChunkSize(), and SetupRdma().
|
inline |
FIXME_docs.
Definition at line 61 of file Rw11Rdma.ipp.
References fpCntlBase, and Retro::Rw11Cntl::LogFile().
void Retro::Rw11Rdma::SetChunkSize | ( | size_t | chunk | ) |
FIXME_docs.
Definition at line 75 of file Rw11Rdma.cpp.
References Retro::RlinkConnect::BlockSizePrudent(), CntlBase(), Connect(), fChunksize, and Retro::Rw11Cntl::IsStarted().
Referenced by Retro::Rw11CntlRHRP::SetChunkSize(), Retro::Rw11CntlRK11::SetChunkSize(), Retro::Rw11CntlRL11::SetChunkSize(), and Retro::Rw11CntlTM11::SetChunkSize().
|
inline |
FIXME_docs.
Definition at line 69 of file Rw11Rdma.ipp.
References fChunksize.
Referenced by Retro::Rw11CntlRHRP::ChunkSize(), Retro::Rw11CntlRK11::ChunkSize(), Retro::Rw11CntlRL11::ChunkSize(), and Retro::Rw11CntlTM11::ChunkSize().
|
inline |
FIXME_docs.
Definition at line 77 of file Rw11Rdma.ipp.
References fStatus, and kStatusDone.
Referenced by Retro::Rw11CntlRHRP::AttnHandler(), Retro::Rw11CntlRK11::AttnHandler(), Retro::Rw11CntlRL11::AttnHandler(), Retro::Rw11CntlTM11::AttnHandler(), and SetupRdma().
void Retro::Rw11Rdma::QueueRMem | ( | uint32_t | addr, |
uint16_t * | block, | ||
size_t | size, | ||
uint16_t | mode | ||
) |
FIXME_docs.
Definition at line 86 of file Rw11Rdma.cpp.
References fStats, Retro::Rstats::Inc(), kStatNQueRMem, Retro::RlinkServer::QueueAction(), RdmaHandler(), Server(), and SetupRdma().
Referenced by Retro::Rw11CntlTM11::AttnHandler(), Retro::Rw11RdmaDisk::QueueDiskWrite(), and Retro::Rw11RdmaDisk::QueueDiskWriteCheck().
void Retro::Rw11Rdma::QueueWMem | ( | uint32_t | addr, |
const uint16_t * | block, | ||
size_t | size, | ||
uint16_t | mode | ||
) |
FIXME_docs.
Definition at line 98 of file Rw11Rdma.cpp.
References fStats, Retro::Rstats::Inc(), kStatNQueWMem, Retro::RlinkServer::QueueAction(), RdmaHandler(), Server(), and SetupRdma().
Referenced by Retro::Rw11CntlTM11::AttnHandler(), and Retro::Rw11RdmaDisk::QueueDiskRead().
|
inline |
FIXME_docs.
Definition at line 85 of file Rw11Rdma.ipp.
References fStats.
Referenced by Retro::Rw11CntlRHRP::RdmaStats(), Retro::Rw11CntlRK11::RdmaStats(), Retro::Rw11CntlRL11::RdmaStats(), and Retro::Rw11CntlTM11::RdmaStats().
|
virtual |
FIXME_docs.
Reimplemented in Retro::Rw11RdmaDisk.
Definition at line 110 of file Rw11Rdma.cpp.
References Retro::Rstats::Dump(), fAddr, fChunksize, fIsWMem, fNWordDone, fNWordMax, fNWordRest, fpBlock, fStats, fStatus, and Retro::RosPrintf().
Referenced by Retro::Rw11CntlTM11::Dump(), and Retro::Rw11RdmaDisk::Dump().
|
protected |
FIXME_docs.
Definition at line 132 of file Rw11Rdma.cpp.
References Retro::RlinkConnect::BlockSizePrudent(), Connect(), fAddr, fChunksize, fIsWMem, fMode, fNWordDone, fNWordMax, fNWordRest, fpBlock, fStatus, IsActive(), and kStatusBusy.
Referenced by QueueRMem(), and QueueWMem().
|
protected |
FIXME_docs.
Definition at line 157 of file Rw11Rdma.cpp.
References Retro::Rw11Cpu::AddRMem(), Retro::Rw11Cpu::AddWMem(), Cpu(), Retro::RlinkServer::Exec(), fAddr, fIsWMem, fMode, fNWordDone, fNWordMax, fNWordRest, fpBlock, fPostExecCB, fPreExecCB, fStats, fStatus, Retro::Rstats::Inc(), kStatNExtClist, kStatNFailRdma, kStatNRdmaRMem, kStatNRdmaWMem, kStatusBusy, kStatusBusyLast, kStatusDone, kStatusFailRdma, PostRdmaHook(), PreRdmaHook(), Server(), and Retro::RlinkCommandList::Size().
Referenced by QueueRMem(), and QueueWMem().
|
protectedvirtual |
FIXME_docs.
Reimplemented in Retro::Rw11RdmaDisk.
Definition at line 215 of file Rw11Rdma.cpp.
Referenced by RdmaHandler().
|
protectedvirtual |
FIXME_docs.
Reimplemented in Retro::Rw11RdmaDisk.
Definition at line 223 of file Rw11Rdma.cpp.
Referenced by RdmaHandler().
|
protected |
plain Rw11Cntl ptr
Definition at line 97 of file Rw11Rdma.hpp.
Referenced by CntlBase(), Connect(), Cpu(), LogFile(), Server(), and W11().
|
protected |
|
protected |
|
protected |
channel chunk size
Definition at line 100 of file Rw11Rdma.hpp.
Referenced by ChunkSize(), Dump(), SetChunkSize(), and SetupRdma().
|
protected |
dma status
Definition at line 101 of file Rw11Rdma.hpp.
Referenced by Dump(), IsActive(), RdmaHandler(), and SetupRdma().
|
protected |
is memory write
Definition at line 102 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
current mem address
Definition at line 103 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
current mode
Definition at line 104 of file Rw11Rdma.hpp.
Referenced by RdmaHandler(), and SetupRdma().
|
protected |
transfer chunk size
Definition at line 105 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
words to be done
Definition at line 106 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
words transfered
Definition at line 107 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
current buffer pointer
Definition at line 108 of file Rw11Rdma.hpp.
Referenced by Dump(), RdmaHandler(), and SetupRdma().
|
protected |
statistics
Definition at line 109 of file Rw11Rdma.hpp.
Referenced by Dump(), Retro::Rw11RdmaDisk::PostRdmaHook(), QueueRMem(), QueueWMem(), RdmaHandler(), Rw11Rdma(), Retro::Rw11RdmaDisk::Rw11RdmaDisk(), Stats(), and Retro::Rw11RdmaDisk::WriteCheck().