gem5
|
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... | |
Public Member Functions inherited from IGbE::DescCache< iGbReg::TxDesc > | |
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... | |
Public Member Functions inherited from Serializable | |
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 | |
EventWrapper< TxDescCache,&TxDescCache::pktComplete > | pktEvent |
EventWrapper< TxDescCache,&TxDescCache::headerComplete > | headerEvent |
EventWrapper< TxDescCache,&TxDescCache::nullCallback > | nullEvent |
Public Attributes inherited from IGbE::DescCache< iGbReg::TxDesc > | |
std::string | annSmFetch |
Annotate sm. More... | |
std::string | annSmWb |
std::string | annUnusedDescQ |
std::string | annUsedCacheQ |
std::string | annUsedDescQ |
std::string | annUnusedCacheQ |
std::string | annDescQ |
EventWrapper< DescCache,&DescCache::writeback1 > | wbDelayEvent |
EventWrapper< DescCache,&DescCache::fetchDescriptors1 > | fetchDelayEvent |
EventWrapper< DescCache,&DescCache::fetchComplete > | fetchEvent |
EventWrapper< DescCache,&DescCache::wbComplete > | 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 |
Protected Member Functions inherited from IGbE::DescCache< iGbReg::TxDesc > | |
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 |
Protected Attributes inherited from IGbE::DescCache< iGbReg::TxDesc > | |
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 Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from Serializable | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
Protected Types inherited from IGbE::DescCache< iGbReg::TxDesc > | |
typedef std::deque < iGbReg::TxDesc * > | CacheType |
Definition at line 403 of file i8254xGBe.hh.
IGbE::TxDescCache::TxDescCache | ( | IGbE * | i, |
std::string | n, | ||
int | s | ||
) |
Definition at line 1545 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, and IGbE::DescCache< iGbReg::TxDesc >::annUsedDescQ.
|
overrideprotectedvirtual |
Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 1955 of file i8254xGBe.cc.
References DPRINTF, iGbReg::IT_TXDW, mbits(), and PciDevice::pciToDma().
|
inline |
Definition at line 492 of file i8254xGBe.hh.
References ArmISA::a, completionAddress, completionEnabled, DPRINTF, and Stats::enabled().
Referenced by IGbE::write().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 406 of file i8254xGBe.hh.
References IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::regs, and iGbReg::Regs::tdba.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 407 of file i8254xGBe.hh.
References IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::regs, and iGbReg::Regs::tdh.
|
inline |
Return the number of dsecriptors in a cache block for threshold operations.
Definition at line 459 of file i8254xGBe.hh.
References DmaDevice::cacheBlockSize(), and IGbE::DescCache< iGbReg::TxDesc >::igbe.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 409 of file i8254xGBe.hh.
References IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::regs, and iGbReg::Regs::tdlen.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 408 of file i8254xGBe.hh.
References IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::regs, and iGbReg::Regs::tdt.
|
overrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 2039 of file i8254xGBe.cc.
References Draining.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 413 of file i8254xGBe.hh.
References Drainable::drainState(), IGbE::DescCache< iGbReg::TxDesc >::fetchDescriptors(), IGbE::DescCache< iGbReg::TxDesc >::igbe, Running, and IGbE::txTick.
void IGbE::TxDescCache::getPacketData | ( | EthPacketPtr | p | ) |
Definition at line 1706 of file i8254xGBe.cc.
References DPRINTF, iGbReg::TxdOp::getBuf(), iGbReg::TxdOp::getLen(), iGbReg::TxdOp::isData(), iGbReg::TxdOp::isLegacy(), MipsISA::p, and PciDevice::pciToDma().
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 1666 of file i8254xGBe.cc.
References iGbReg::TxDesc::d1, iGbReg::TxDesc::d2, DPRINTF, and iGbReg::TxdOp::getLen().
Referenced by IGbE::txStateMachine().
|
overridevirtual |
Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 2048 of file i8254xGBe.cc.
Referenced by IGbE::checkDrain(), and IGbE::drain().
void IGbE::TxDescCache::headerComplete | ( | ) |
Definition at line 1641 of file i8254xGBe.cc.
References DPRINTF, and iGbReg::TxdOp::getLen().
|
inline |
Definition at line 502 of file i8254xGBe.hh.
References DPRINTF.
bool IGbE::TxDescCache::packetAvailable | ( | ) |
Ask if the packet has been transfered so the state machine can give it to the fifo.
Definition at line 2029 of file i8254xGBe.cc.
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 481 of file i8254xGBe.hh.
References pktMultiDesc.
Referenced by IGbE::txStateMachine().
|
inline |
Ask if we are still waiting for the packet to be transfered.
Definition at line 473 of file i8254xGBe.hh.
References pktWaiting.
Referenced by IGbE::txStateMachine().
void IGbE::TxDescCache::pktComplete | ( | ) |
Called by event when dma to write packet is completed.
Definition at line 1754 of file i8254xGBe.cc.
References Net::cksum(), curTick(), iGbReg::TxDesc::d1, iGbReg::TxDesc::d2, DPRINTF, DTRACE, iGbReg::TxdOp::eop(), Net::TcpHdr::flags(), iGbReg::TxdOp::getLen(), Net::IpHdr::id(), ArmISA::ide, iGbReg::TxdOp::ip(), iGbReg::TxdOp::isData(), iGbReg::TxdOp::isLegacy(), iGbReg::TxdOp::ixsm(), Net::IpHdr::len(), Net::UdpHdr::len(), panic, ArmISA::rs, Net::TcpHdr::seq(), iGbReg::TxdOp::setDd(), X86ISA::size(), Net::IpHdr::sum(), Net::TcpHdr::sum(), Net::UdpHdr::sum(), iGbReg::TxdOp::tcp(), iGbReg::TxdOp::txsm(), iGbReg::TxdOp::vle(), and ArmISA::writeback.
void IGbE::TxDescCache::processContextDesc | ( | ) |
Definition at line 1564 of file i8254xGBe.cc.
References DPRINTF, iGbReg::TxdOp::getBuf(), iGbReg::TxdOp::getLen(), iGbReg::TxdOp::getTsoLen(), iGbReg::TxdOp::hdrlen(), iGbReg::TxdOp::isContext(), iGbReg::TxdOp::isData(), iGbReg::TxdOp::isType(), iGbReg::TxdOp::mss(), PciDevice::pciToDma(), iGbReg::TxdOp::setDd(), iGbReg::TxdOp::tcp(), iGbReg::TxdOp::tse(), iGbReg::TxdOp::TXD_ADVDATA, and iGbReg::TxdOp::TXD_CNXT.
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 1971 of file i8254xGBe.cc.
References IGbE::DescCache< T >::serialize(), SERIALIZE_ARRAY, and SERIALIZE_SCALAR.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 2000 of file i8254xGBe.cc.
References IGbE::DescCache< T >::unserialize(), UNSERIALIZE_ARRAY, and UNSERIALIZE_SCALAR.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::TxDesc >.
Definition at line 410 of file i8254xGBe.hh.
References IGbE::DescCache< iGbReg::TxDesc >::igbe, IGbE::regs, and iGbReg::Regs::tdh.
|
protected |
Definition at line 424 of file i8254xGBe.hh.
Referenced by completionWriteback().
|
protected |
Definition at line 425 of file i8254xGBe.hh.
Referenced by completionWriteback().
|
protected |
Definition at line 426 of file i8254xGBe.hh.
EventWrapper<TxDescCache, &TxDescCache::headerComplete> IGbE::TxDescCache::headerEvent |
Definition at line 489 of file i8254xGBe.hh.
|
protected |
Definition at line 421 of file i8254xGBe.hh.
EventWrapper<TxDescCache, &TxDescCache::nullCallback> IGbE::TxDescCache::nullEvent |
Definition at line 505 of file i8254xGBe.hh.
|
protected |
Definition at line 420 of file i8254xGBe.hh.
EventWrapper<TxDescCache, &TxDescCache::pktComplete> IGbE::TxDescCache::pktEvent |
Definition at line 486 of file i8254xGBe.hh.
|
protected |
Definition at line 423 of file i8254xGBe.hh.
Referenced by packetMultiDesc().
|
protected |
Definition at line 422 of file i8254xGBe.hh.
Referenced by packetWaiting().
|
protected |
Definition at line 441 of file i8254xGBe.hh.
|
protected |
Definition at line 440 of file i8254xGBe.hh.
|
protected |
Definition at line 439 of file i8254xGBe.hh.
|
protected |
Definition at line 431 of file i8254xGBe.hh.
|
protected |
Definition at line 437 of file i8254xGBe.hh.
|
protected |
Definition at line 432 of file i8254xGBe.hh.
|
protected |
Definition at line 438 of file i8254xGBe.hh.
|
protected |
Definition at line 436 of file i8254xGBe.hh.
|
protected |
Definition at line 442 of file i8254xGBe.hh.
|
protected |
Definition at line 435 of file i8254xGBe.hh.
|
protected |
Definition at line 433 of file i8254xGBe.hh.
|
protected |
Definition at line 434 of file i8254xGBe.hh.
|
protected |
Definition at line 430 of file i8254xGBe.hh.