w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11RdmaDisk.hpp>
Public Types | |
enum | stats { kStatNWritePadded = Rw11Rdma::kDimStat , kStatNWChkFail , kDimStat } |
Public Types inherited from Retro::Rw11Rdma | |
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 | |
Rw11RdmaDisk (Rw11Cntl *pcntl, precb_t &&precb, postcb_t &&postcb) | |
Constructor. | |
~Rw11RdmaDisk () | |
Destructor. | |
void | QueueDiskRead (uint32_t addr, size_t size, uint16_t mode, uint32_t lba, Rw11UnitDisk *punit) |
FIXME_docs. | |
void | QueueDiskWrite (uint32_t addr, size_t size, uint16_t mode, uint32_t lba, Rw11UnitDisk *punit) |
FIXME_docs. | |
void | QueueDiskWriteCheck (uint32_t addr, size_t size, uint16_t mode, uint32_t lba, Rw11UnitDisk *punit) |
FIXME_docs. | |
size_t | WriteCheck (size_t nwdone) |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11Rdma | |
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 Types | |
enum | func { kFuncRead , kFuncWrite , kFuncWriteCheck } |
Protected Member Functions | |
void | SetupDisk (size_t size, uint32_t lba, Rw11UnitDisk *punit, Rw11RdmaDisk::func func) |
FIXME_docs. | |
virtual void | PreRdmaHook () |
FIXME_docs. | |
virtual void | PostRdmaHook (size_t nwdone) |
FIXME_docs. | |
Protected Member Functions inherited from Retro::Rw11Rdma | |
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 | |
std::vector< uint16_t > | fBuf |
data buffer | |
Rw11UnitDisk * | fpUnit |
UnitDisk to read VirtDisk. | |
size_t | fNWord |
words to transfer | |
size_t | fNBlock |
disk blocks to transfer | |
size_t | fLba |
disk lba | |
enum func | fFunc |
current function | |
Protected Attributes inherited from Retro::Rw11Rdma | |
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 27 of file Rw11RdmaDisk.hpp.
Enumerator | |
---|---|
kStatNWritePadded | padded disk write |
kStatNWChkFail | write check failed |
kDimStat |
Definition at line 47 of file Rw11RdmaDisk.hpp.
|
protected |
Enumerator | |
---|---|
kFuncRead | read function |
kFuncWrite | write function |
kFuncWriteCheck | write check function |
Definition at line 55 of file Rw11RdmaDisk.hpp.
Constructor.
Definition at line 35 of file Rw11RdmaDisk.cpp.
References Retro::Rstats::Define(), Retro::Rw11Rdma::fStats, kStatNWChkFail, and kStatNWritePadded.
Retro::Rw11RdmaDisk::~Rw11RdmaDisk | ( | ) |
Destructor.
Definition at line 51 of file Rw11RdmaDisk.cpp.
void Retro::Rw11RdmaDisk::QueueDiskRead | ( | uint32_t | addr, |
size_t | size, | ||
uint16_t | mode, | ||
uint32_t | lba, | ||
Rw11UnitDisk * | punit | ||
) |
FIXME_docs.
Definition at line 57 of file Rw11RdmaDisk.cpp.
References fBuf, kFuncRead, Retro::Rw11Rdma::QueueWMem(), and SetupDisk().
Referenced by Retro::Rw11CntlRHRP::AttnHandler(), Retro::Rw11CntlRK11::AttnHandler(), and Retro::Rw11CntlRL11::AttnHandler().
void Retro::Rw11RdmaDisk::QueueDiskWrite | ( | uint32_t | addr, |
size_t | size, | ||
uint16_t | mode, | ||
uint32_t | lba, | ||
Rw11UnitDisk * | punit | ||
) |
FIXME_docs.
Definition at line 68 of file Rw11RdmaDisk.cpp.
References fBuf, kFuncWrite, Retro::Rw11Rdma::QueueRMem(), and SetupDisk().
Referenced by Retro::Rw11CntlRHRP::AttnHandler(), Retro::Rw11CntlRK11::AttnHandler(), and Retro::Rw11CntlRL11::AttnHandler().
void Retro::Rw11RdmaDisk::QueueDiskWriteCheck | ( | uint32_t | addr, |
size_t | size, | ||
uint16_t | mode, | ||
uint32_t | lba, | ||
Rw11UnitDisk * | punit | ||
) |
FIXME_docs.
Definition at line 79 of file Rw11RdmaDisk.cpp.
References fBuf, kFuncWriteCheck, Retro::Rw11Rdma::QueueRMem(), and SetupDisk().
Referenced by Retro::Rw11CntlRHRP::AttnHandler(), Retro::Rw11CntlRK11::AttnHandler(), and Retro::Rw11CntlRL11::AttnHandler().
size_t Retro::Rw11RdmaDisk::WriteCheck | ( | size_t | nwdone | ) |
FIXME_docs.
Definition at line 91 of file Rw11RdmaDisk.cpp.
References Retro::Rw11UnitDisk::BlockSize(), fBuf, fLba, fpUnit, Retro::Rw11Rdma::fStats, Retro::Rstats::Inc(), kStatNWChkFail, and Retro::Rw11UnitDisk::VirtRead().
Referenced by Retro::Rw11CntlRHRP::RdmaPostExecCB(), Retro::Rw11CntlRK11::RdmaPostExecCB(), and Retro::Rw11CntlRL11::RdmaPostExecCB().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11Rdma.
Definition at line 121 of file Rw11RdmaDisk.cpp.
References Retro::Rw11Rdma::Dump(), fBuf, fFunc, fLba, fNBlock, fNWord, fpUnit, and Retro::RosPrintf().
Referenced by Retro::Rw11CntlRHRP::Dump(), Retro::Rw11CntlRK11::Dump(), and Retro::Rw11CntlRL11::Dump().
|
protected |
FIXME_docs.
Definition at line 140 of file Rw11RdmaDisk.cpp.
References Retro::Rw11UnitDisk::BlockSize(), fBuf, fFunc, fLba, fNBlock, fNWord, and fpUnit.
Referenced by QueueDiskRead(), QueueDiskWrite(), and QueueDiskWriteCheck().
|
protectedvirtual |
FIXME_docs.
Reimplemented from Retro::Rw11Rdma.
Definition at line 160 of file Rw11RdmaDisk.cpp.
References fBuf, fFunc, fLba, fNBlock, fpUnit, kFuncRead, and Retro::Rw11UnitDisk::VirtRead().
|
protectedvirtual |
FIXME_docs.
Reimplemented from Retro::Rw11Rdma.
Definition at line 175 of file Rw11RdmaDisk.cpp.
References Retro::Rw11UnitDisk::BlockSize(), fBuf, fFunc, fLba, fpUnit, Retro::Rw11Rdma::fStats, Retro::Rstats::Inc(), kFuncWrite, kStatNWritePadded, and Retro::Rw11UnitDisk::VirtWrite().
|
protected |
data buffer
Definition at line 67 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), PostRdmaHook(), PreRdmaHook(), QueueDiskRead(), QueueDiskWrite(), QueueDiskWriteCheck(), SetupDisk(), and WriteCheck().
|
protected |
UnitDisk to read VirtDisk.
Definition at line 68 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), PostRdmaHook(), PreRdmaHook(), SetupDisk(), and WriteCheck().
|
protected |
words to transfer
Definition at line 69 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), and SetupDisk().
|
protected |
disk blocks to transfer
Definition at line 70 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), PreRdmaHook(), and SetupDisk().
|
protected |
disk lba
Definition at line 71 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), PostRdmaHook(), PreRdmaHook(), SetupDisk(), and WriteCheck().
|
protected |
current function
Definition at line 72 of file Rw11RdmaDisk.hpp.
Referenced by Dump(), PostRdmaHook(), PreRdmaHook(), and SetupDisk().