gem5
v20.0.0.2
|
Public Member Functions | |
TxDescCache (IGbE *i, std::string n, int s) | |
unsigned | getPacketSize (EthPacketPtr p) |
Tell the cache to DMA a packet from main memory into its buffer and return the size the of the packet to reserve space in tx fifo. More... | |
void | getPacketData (EthPacketPtr p) |
void | processContextDesc () |
unsigned | descInBlock (unsigned num_desc) |
Return the number of dsecriptors in a cache block for threshold operations. More... | |
bool | packetAvailable () |
Ask if the packet has been transfered so the state machine can give it to the fifo. More... | |
bool | packetWaiting () |
Ask if we are still waiting for the packet to be transfered. More... | |
bool | packetMultiDesc () |
Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for more before we can send it out. More... | |
void | pktComplete () |
Called by event when dma to write packet is completed. More... | |
void | headerComplete () |
void | completionWriteback (Addr a, bool enabled) |
bool | hasOutstandingEvents () override |
void | nullCallback () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
![]() | |
DescCache (IGbE *i, const std::string n, int s) | |
virtual | ~DescCache () |
std::string | name () |
void | areaChanged () |
If the address/len/head change when we've got descriptors that are dirty that is very bad. More... | |
void | writeback (Addr aMask) |
void | writeback1 () |
void | fetchDescriptors () |
Fetch a chunk of descriptors into the descriptor cache. More... | |
void | fetchDescriptors1 () |
void | fetchComplete () |
Called by event when dma to read descriptors is completed. More... | |
void | wbComplete () |
Called by event when dma to writeback descriptors is completed. More... | |
unsigned | descLeft () const |
unsigned | descUsed () const |
unsigned | descUnused () const |
void | reset () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
![]() | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
EventFunctionWrapper | pktEvent |
EventFunctionWrapper | headerEvent |
EventFunctionWrapper | nullEvent |
![]() | |
std::string | annSmFetch |
Annotate sm. More... | |
std::string | annSmWb |
std::string | annUnusedDescQ |
std::string | annUsedCacheQ |
std::string | annUsedDescQ |
std::string | annUnusedCacheQ |
std::string | annDescQ |
EventFunctionWrapper | wbDelayEvent |
EventFunctionWrapper | fetchDelayEvent |
EventFunctionWrapper | fetchEvent |
EventFunctionWrapper | wbEvent |
Protected Member Functions | |
Addr | descBase () const override |
long | descHead () const override |
long | descTail () const override |
long | descLen () const override |
void | updateHead (long h) override |
void | enableSm () override |
void | actionAfterWb () override |
void | fetchAfterWb () override |
![]() | |
Addr | pciToDma (Addr a) |
Shortcut for DMA address translation. More... | |
Protected Attributes | |
bool | pktDone |
bool | isTcp |
bool | pktWaiting |
bool | pktMultiDesc |
Addr | completionAddress |
bool | completionEnabled |
uint32_t | descEnd |
bool | useTso |
Addr | tsoHeaderLen |
Addr | tsoMss |
Addr | tsoTotalLen |
Addr | tsoUsedLen |
Addr | tsoPrevSeq |
Addr | tsoPktPayloadBytes |
bool | tsoLoadedHeader |
bool | tsoPktHasHeader |
uint8_t | tsoHeader [256] |
Addr | tsoDescBytesUsed |
Addr | tsoCopyBytes |
int | tsoPkts |
![]() | |
CacheType | usedCache |
CacheType | unusedCache |
iGbReg::TxDesc * | fetchBuf |
iGbReg::TxDesc * | wbBuf |
IGbE * | igbe |
std::string | _name |
int | cachePnt |
int | size |
int | curFetching |
int | wbOut |
bool | moreToWb |
Addr | wbAlignment |
EthPacketPtr | pktPtr |
The packet that is currently being dmad to memory if any. More... | |
Additional Inherited Members | |
![]() | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
![]() | |
typedef std::deque< iGbReg::TxDesc *> | CacheType |
Definition at line 397 of file i8254xGBe.hh.
IGbE::TxDescCache::TxDescCache | ( | IGbE * | i, |
std::string | n, | ||
int | s | ||
) |
Definition at line 1553 of file i8254xGBe.cc.
References IGbE::DescCache< iGbReg::TxDesc >::annDescQ, IGbE::DescCache< iGbReg::TxDesc >::annSmFetch, IGbE::DescCache< iGbReg::TxDesc >::annSmWb, IGbE::DescCache< iGbReg::TxDesc >::annUnusedCacheQ, IGbE::DescCache< iGbReg::TxDesc >::annUnusedDescQ, IGbE::DescCache< iGbReg::TxDesc >::annUsedCacheQ, IGbE::DescCache< iGbReg::TxDesc >::annUsedDescQ, headerComplete(), headerEvent, ArmISA::n, nullCallback(), nullEvent, and pktComplete().
|
overrideprotectedvirtual |
Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 1968 of file i8254xGBe.cc.
References completionAddress, completionEnabled, descEnd, DmaDevice::dmaWrite(), DPRINTF, IGbE::DescCache< iGbReg::TxDesc >::igbe, iGbReg::IT_TXDW, mbits(), nullEvent, IGbE::DescCache< iGbReg::TxDesc >::pciToDma(), IGbE::postInterrupt(), IGbE::regs, and iGbReg::Regs::tdh.
|
inline |
Definition at line 486 of file i8254xGBe.hh.
References ArmISA::a, DPRINTF, Stats::enabled(), and IGbE::DescCache< T >::hasOutstandingEvents().
Referenced by IGbE::write().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 400 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, IGbE::regs, and iGbReg::Regs::tdba.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 401 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, IGbE::regs, and iGbReg::Regs::tdh.
|
inline |
Return the number of dsecriptors in a cache block for threshold operations.
Definition at line 453 of file i8254xGBe.hh.
References DmaDevice::cacheBlockSize(), and IGbE::DescCache< T >::igbe.
Referenced by pktComplete().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 403 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, IGbE::regs, and iGbReg::Regs::tdlen.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 402 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, IGbE::regs, and iGbReg::Regs::tdt.
|
overrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 2052 of file i8254xGBe.cc.
References Draining, Drainable::drainState(), IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::restartClock(), and IGbE::txTick.
Referenced by headerComplete(), and pktComplete().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 407 of file i8254xGBe.hh.
References Drainable::drainState(), IGbE::DescCache< T >::fetchDescriptors(), IGbE::DescCache< T >::igbe, Running, and IGbE::txTick.
void IGbE::TxDescCache::getPacketData | ( | EthPacketPtr | p | ) |
Definition at line 1716 of file i8254xGBe.cc.
References DmaDevice::dmaRead(), DPRINTF, iGbReg::TxdOp::getBuf(), iGbReg::TxdOp::getLen(), IGbE::DescCache< iGbReg::TxDesc >::igbe, iGbReg::TxdOp::isData(), iGbReg::TxdOp::isLegacy(), MipsISA::p, IGbE::DescCache< iGbReg::TxDesc >::pciToDma(), pktEvent, IGbE::DescCache< iGbReg::TxDesc >::pktPtr, pktWaiting, tsoCopyBytes, tsoDescBytesUsed, tsoHeader, tsoHeaderLen, tsoLoadedHeader, tsoPktHasHeader, IGbE::txReadDelay, IGbE::DescCache< iGbReg::TxDesc >::unusedCache, and useTso.
Referenced by IGbE::txStateMachine().
unsigned IGbE::TxDescCache::getPacketSize | ( | EthPacketPtr | p | ) |
Tell the cache to DMA a packet from main memory into its buffer and return the size the of the packet to reserve space in tx fifo.
Definition at line 1676 of file i8254xGBe.cc.
References iGbReg::TxDesc::d1, iGbReg::TxDesc::d2, DPRINTF, iGbReg::TxdOp::getLen(), tsoCopyBytes, tsoDescBytesUsed, tsoHeaderLen, tsoLoadedHeader, tsoMss, tsoPktHasHeader, tsoTotalLen, tsoUsedLen, IGbE::DescCache< iGbReg::TxDesc >::unusedCache, and useTso.
Referenced by IGbE::txStateMachine().
|
overridevirtual |
Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 2061 of file i8254xGBe.cc.
References IGbE::DescCache< iGbReg::TxDesc >::fetchEvent, pktEvent, Event::scheduled(), and IGbE::DescCache< iGbReg::TxDesc >::wbEvent.
Referenced by IGbE::checkDrain(), and IGbE::drain().
void IGbE::TxDescCache::headerComplete | ( | ) |
Definition at line 1651 of file i8254xGBe.cc.
References IGbE::checkDrain(), DPRINTF, enableSm(), iGbReg::TxdOp::getLen(), IGbE::DescCache< iGbReg::TxDesc >::igbe, pktWaiting, tsoDescBytesUsed, tsoHeaderLen, tsoLoadedHeader, IGbE::DescCache< iGbReg::TxDesc >::unusedCache, and IGbE::DescCache< iGbReg::TxDesc >::usedCache.
Referenced by TxDescCache().
|
inline |
bool IGbE::TxDescCache::packetAvailable | ( | ) |
Ask if the packet has been transfered so the state machine can give it to the fifo.
Definition at line 2042 of file i8254xGBe.cc.
References pktDone.
Referenced by IGbE::txStateMachine().
|
inline |
Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for more before we can send it out.
Definition at line 475 of file i8254xGBe.hh.
Referenced by IGbE::txStateMachine().
|
inline |
Ask if we are still waiting for the packet to be transfered.
Definition at line 467 of file i8254xGBe.hh.
Referenced by IGbE::txStateMachine().
void IGbE::TxDescCache::pktComplete | ( | ) |
Called by event when dma to write packet is completed.
Definition at line 1764 of file i8254xGBe.cc.
References IGbE::anBegin(), IGbE::anDq(), IGbE::DescCache< iGbReg::TxDesc >::annUnusedCacheQ, IGbE::DescCache< iGbReg::TxDesc >::annUsedCacheQ, IGbE::anQ(), DmaDevice::cacheBlockSize(), IGbE::checkDrain(), Net::cksum(), curTick(), iGbReg::TxDesc::d1, iGbReg::TxDesc::d2, descInBlock(), DPRINTF, DTRACE, enableSm(), iGbReg::TxdOp::eop(), Net::TcpHdr::flags(), iGbReg::TxdOp::getLen(), Net::IpHdr::id(), ArmISA::ide, IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::intClock(), iGbReg::TxdOp::ip(), MipsISA::ip6, iGbReg::TxdOp::isData(), iGbReg::TxdOp::isLegacy(), iGbReg::TxdOp::ixsm(), Net::IpHdr::len(), Net::UdpHdr::len(), panic, pktDone, pktMultiDesc, IGbE::DescCache< iGbReg::TxDesc >::pktPtr, pktWaiting, Net::Ip6Hdr::plen(), IGbE::regs, EventManager::reschedule(), ArmISA::rs, EventManager::schedule(), Event::scheduled(), Net::TcpHdr::seq(), iGbReg::TxdOp::setDd(), IGbE::DescCache< iGbReg::TxDesc >::size, Net::IpHdr::sum(), Net::TcpHdr::sum(), Net::UdpHdr::sum(), iGbReg::Regs::tadv, IGbE::tadvEvent, iGbReg::TxdOp::tcp(), iGbReg::Regs::tidv, IGbE::tidvEvent, tsoCopyBytes, tsoDescBytesUsed, tsoHeaderLen, tsoLoadedHeader, tsoMss, tsoPktHasHeader, tsoPkts, tsoPrevSeq, tsoTotalLen, tsoUsedLen, iGbReg::Regs::txdctl, EtherDevice::txIpChecksums, iGbReg::TxdOp::txsm(), EtherDevice::txTcpChecksums, EtherDevice::txUdpChecksums, IGbE::DescCache< iGbReg::TxDesc >::unusedCache, IGbE::DescCache< iGbReg::TxDesc >::usedCache, useTso, iGbReg::TxdOp::vle(), and IGbE::DescCache< iGbReg::TxDesc >::writeback().
Referenced by TxDescCache().
void IGbE::TxDescCache::processContextDesc | ( | ) |
Definition at line 1574 of file i8254xGBe.cc.
References IGbE::anDq(), IGbE::DescCache< iGbReg::TxDesc >::annUnusedCacheQ, IGbE::DescCache< iGbReg::TxDesc >::annUsedCacheQ, IGbE::anQ(), DmaDevice::dmaRead(), DPRINTF, iGbReg::TxdOp::getBuf(), iGbReg::TxdOp::getLen(), iGbReg::TxdOp::getTsoLen(), iGbReg::TxdOp::hdrlen(), headerEvent, IGbE::DescCache< iGbReg::TxDesc >::igbe, iGbReg::TxdOp::isContext(), iGbReg::TxdOp::isData(), isTcp, iGbReg::TxdOp::isType(), iGbReg::TxdOp::mss(), IGbE::DescCache< iGbReg::TxDesc >::pciToDma(), pktWaiting, iGbReg::TxdOp::setDd(), iGbReg::TxdOp::tcp(), iGbReg::TxdOp::tse(), tsoCopyBytes, tsoDescBytesUsed, tsoHeader, tsoHeaderLen, tsoLoadedHeader, tsoMss, tsoPktHasHeader, tsoPkts, tsoPrevSeq, tsoTotalLen, tsoUsedLen, iGbReg::TxdOp::TXD_ADVDATA, iGbReg::TxdOp::TXD_CNXT, IGbE::DescCache< iGbReg::TxDesc >::unusedCache, IGbE::DescCache< iGbReg::TxDesc >::usedCache, and useTso.
Referenced by IGbE::txStateMachine().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 1984 of file i8254xGBe.cc.
References completionAddress, completionEnabled, descEnd, isTcp, pktDone, pktMultiDesc, pktWaiting, IGbE::DescCache< T >::serialize(), SERIALIZE_ARRAY, SERIALIZE_SCALAR, tsoCopyBytes, tsoDescBytesUsed, tsoHeader, tsoHeaderLen, tsoLoadedHeader, tsoMss, tsoPktHasHeader, tsoPktPayloadBytes, tsoPkts, tsoPrevSeq, tsoTotalLen, tsoUsedLen, and useTso.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 2013 of file i8254xGBe.cc.
References completionAddress, completionEnabled, descEnd, isTcp, pktDone, pktMultiDesc, pktWaiting, tsoCopyBytes, tsoDescBytesUsed, tsoHeader, tsoHeaderLen, tsoLoadedHeader, tsoMss, tsoPktHasHeader, tsoPktPayloadBytes, tsoPkts, tsoPrevSeq, tsoTotalLen, tsoUsedLen, IGbE::DescCache< T >::unserialize(), UNSERIALIZE_ARRAY, UNSERIALIZE_SCALAR, and useTso.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 404 of file i8254xGBe.hh.
References IGbE::DescCache< T >::actionAfterWb(), IGbE::DescCache< T >::enableSm(), IGbE::DescCache< T >::igbe, IGbE::regs, and iGbReg::Regs::tdh.
|
protected |
Definition at line 418 of file i8254xGBe.hh.
Referenced by actionAfterWb(), serialize(), and unserialize().
|
protected |
Definition at line 419 of file i8254xGBe.hh.
Referenced by actionAfterWb(), serialize(), and unserialize().
|
protected |
Definition at line 420 of file i8254xGBe.hh.
Referenced by actionAfterWb(), serialize(), and unserialize().
EventFunctionWrapper IGbE::TxDescCache::headerEvent |
Definition at line 483 of file i8254xGBe.hh.
Referenced by processContextDesc(), and TxDescCache().
|
protected |
Definition at line 415 of file i8254xGBe.hh.
Referenced by processContextDesc(), serialize(), and unserialize().
EventFunctionWrapper IGbE::TxDescCache::nullEvent |
Definition at line 499 of file i8254xGBe.hh.
Referenced by actionAfterWb(), and TxDescCache().
|
protected |
Definition at line 414 of file i8254xGBe.hh.
Referenced by packetAvailable(), pktComplete(), serialize(), and unserialize().
EventFunctionWrapper IGbE::TxDescCache::pktEvent |
Definition at line 480 of file i8254xGBe.hh.
Referenced by getPacketData(), and hasOutstandingEvents().
|
protected |
Definition at line 417 of file i8254xGBe.hh.
Referenced by pktComplete(), serialize(), and unserialize().
|
protected |
Definition at line 416 of file i8254xGBe.hh.
Referenced by getPacketData(), headerComplete(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 435 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 434 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), headerComplete(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 433 of file i8254xGBe.hh.
Referenced by getPacketData(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 425 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), headerComplete(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 431 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), headerComplete(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 426 of file i8254xGBe.hh.
Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 432 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 430 of file i8254xGBe.hh.
Referenced by serialize(), and unserialize().
|
protected |
Definition at line 436 of file i8254xGBe.hh.
Referenced by pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 429 of file i8254xGBe.hh.
Referenced by pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 427 of file i8254xGBe.hh.
Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 428 of file i8254xGBe.hh.
Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().
|
protected |
Definition at line 424 of file i8254xGBe.hh.
Referenced by getPacketData(), getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().