gem5
v20.0.0.2
|
Public Member Functions | |
RxDescCache (IGbE *i, std::string n, int s) | |
int | writePacket (EthPacketPtr packet, int pkt_offset) |
Write the given packet into the buffer(s) pointed to by the descriptor and update the book keeping. More... | |
void | pktComplete () |
Called by event when dma to write packet is completed. More... | |
bool | packetDone () |
Check if the dma on the packet has completed and RX state machine can continue. More... | |
void | pktSplitDone () |
bool | hasOutstandingEvents () override |
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 | pktHdrEvent |
EventFunctionWrapper | pktDataEvent |
![]() | |
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 | descLen () const override |
long | descTail () const override |
void | updateHead (long h) override |
void | enableSm () override |
void | fetchAfterWb () override |
![]() | |
virtual void | actionAfterWb () |
Addr | pciToDma (Addr a) |
Shortcut for DMA address translation. More... | |
Protected Attributes | |
bool | pktDone |
int | splitCount |
Variable to head with header/data completion events. More... | |
unsigned | bytesCopied |
Bytes of packet that have been copied, so we know when to set EOP. More... | |
![]() | |
CacheType | usedCache |
CacheType | unusedCache |
iGbReg::RxDesc * | fetchBuf |
iGbReg::RxDesc * | 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::RxDesc *> | CacheType |
Definition at line 336 of file i8254xGBe.hh.
IGbE::RxDescCache::RxDescCache | ( | IGbE * | i, |
std::string | n, | ||
int | s | ||
) |
Definition at line 1198 of file i8254xGBe.cc.
References IGbE::DescCache< iGbReg::RxDesc >::annDescQ, IGbE::DescCache< iGbReg::RxDesc >::annSmFetch, IGbE::DescCache< iGbReg::RxDesc >::annSmWb, IGbE::DescCache< iGbReg::RxDesc >::annUnusedCacheQ, IGbE::DescCache< iGbReg::RxDesc >::annUnusedDescQ, IGbE::DescCache< iGbReg::RxDesc >::annUsedCacheQ, IGbE::DescCache< iGbReg::RxDesc >::annUsedDescQ, ArmISA::n, pktComplete(), pktDataEvent, pktHdrEvent, and pktSplitDone().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 339 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, iGbReg::Regs::rdba, and IGbE::regs.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 340 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, iGbReg::Regs::rdh, and IGbE::regs.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 341 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, iGbReg::Regs::rdlen, and IGbE::regs.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 342 of file i8254xGBe.hh.
References IGbE::DescCache< T >::igbe, iGbReg::Regs::rdt, and IGbE::regs.
|
overrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 1505 of file i8254xGBe.cc.
References Draining, Drainable::drainState(), IGbE::DescCache< iGbReg::RxDesc >::igbe, IGbE::restartClock(), and IGbE::rxTick.
Referenced by pktComplete().
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 345 of file i8254xGBe.hh.
References Drainable::drainState(), IGbE::DescCache< T >::fetchDescriptors(), IGbE::DescCache< T >::igbe, Running, and IGbE::rxTick.
|
overridevirtual |
Reimplemented from IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 1524 of file i8254xGBe.cc.
References IGbE::DescCache< iGbReg::RxDesc >::fetchEvent, pktDataEvent, pktEvent, pktHdrEvent, Event::scheduled(), and IGbE::DescCache< iGbReg::RxDesc >::wbEvent.
Referenced by IGbE::checkDrain(), and IGbE::drain().
bool IGbE::RxDescCache::packetDone | ( | ) |
Check if the dma on the packet has completed and RX state machine can continue.
Definition at line 1514 of file i8254xGBe.cc.
References pktDone.
Referenced by IGbE::rxStateMachine().
void IGbE::RxDescCache::pktComplete | ( | ) |
Called by event when dma to write packet is completed.
Definition at line 1338 of file i8254xGBe.cc.
References IGbE::anBegin(), IGbE::anDq(), IGbE::DescCache< iGbReg::RxDesc >::annUnusedCacheQ, IGbE::DescCache< iGbReg::RxDesc >::annUsedCacheQ, IGbE::anQ(), bytesCopied, IGbE::checkDrain(), Net::cksum(), curTick(), DPRINTF, enableSm(), htole(), Net::IpHdr::id(), IGbE::DescCache< iGbReg::RxDesc >::igbe, IGbE::intClock(), iGbReg::TxdOp::ip(), MipsISA::ip6, iGbReg::IT_RXT, iGbReg::IT_SRPD, length, panic, pktDone, IGbE::DescCache< iGbReg::RxDesc >::pktPtr, IGbE::postInterrupt(), iGbReg::Regs::radv, IGbE::radvEvent, iGbReg::Regs::rctl, iGbReg::Regs::rdtr, IGbE::rdtrEvent, IGbE::regs, EventManager::reschedule(), iGbReg::Regs::rsrpd, iGbReg::Regs::rxcsum, iGbReg::RXDE_IPE, iGbReg::RXDE_TCPE, iGbReg::RXDEE_IPE, iGbReg::RXDEE_TCPE, iGbReg::RXDP_IPV4, iGbReg::RXDP_IPV6, iGbReg::RXDP_TCP, iGbReg::RXDP_UDP, iGbReg::RXDS_DD, iGbReg::RXDS_EOP, iGbReg::RXDS_IPCS, iGbReg::RXDS_TCPCS, iGbReg::RXDS_UDPCS, iGbReg::RXDT_ADV_ONEBUF, iGbReg::RXDT_ADV_SPLIT_A, iGbReg::RXDT_LEGACY, EtherDevice::rxIpChecksums, EtherDevice::rxTcpChecksums, EtherDevice::rxUdpChecksums, EventManager::schedule(), Event::scheduled(), iGbReg::Regs::srrctl, ArmISA::status, iGbReg::TxdOp::tcp(), IGbE::DescCache< iGbReg::RxDesc >::unusedCache, and IGbE::DescCache< iGbReg::RxDesc >::usedCache.
Referenced by pktSplitDone(), and RxDescCache().
void IGbE::RxDescCache::pktSplitDone | ( | ) |
Definition at line 1215 of file i8254xGBe.cc.
References DPRINTF, pktComplete(), and splitCount.
Referenced by RxDescCache().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 1533 of file i8254xGBe.cc.
References bytesCopied, pktDone, IGbE::DescCache< T >::serialize(), SERIALIZE_SCALAR, and splitCount.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 1542 of file i8254xGBe.cc.
References bytesCopied, pktDone, splitCount, IGbE::DescCache< T >::unserialize(), and UNSERIALIZE_SCALAR.
|
inlineoverrideprotectedvirtual |
Implements IGbE::DescCache< iGbReg::RxDesc >.
Definition at line 343 of file i8254xGBe.hh.
References IGbE::DescCache< T >::enableSm(), IGbE::DescCache< T >::igbe, iGbReg::Regs::rdh, and IGbE::regs.
int IGbE::RxDescCache::writePacket | ( | EthPacketPtr | packet, |
int | pkt_offset | ||
) |
Write the given packet into the buffer(s) pointed to by the descriptor and update the book keeping.
Should only be called when there are no dma's pending.
packet | ethernet packet to write |
pkt_offset | bytes already copied from the packet to memory |
Definition at line 1230 of file i8254xGBe.cc.
References iGbReg::RxDesc::adv_read, iGbReg::RxDesc::adv_wb, iGbReg::Regs::SRRCTL::bufLen(), bytesCopied, iGbReg::Regs::RCTL::descSize(), DmaDevice::dmaWrite(), DPRINTF, iGbReg::Regs::SRRCTL::hdrLen(), Net::hsplit(), htole(), IGbE::DescCache< iGbReg::RxDesc >::igbe, iGbReg::RxDesc::legacy, panic, IGbE::DescCache< iGbReg::RxDesc >::pciToDma(), pktDataEvent, pktDone, pktEvent, pktHdrEvent, IGbE::DescCache< iGbReg::RxDesc >::pktPtr, iGbReg::Regs::rctl, IGbE::regs, iGbReg::RXDT_ADV_ONEBUF, iGbReg::RXDT_ADV_SPLIT_A, iGbReg::RXDT_LEGACY, IGbE::rxWriteDelay, iGbReg::Regs::srrctl, and IGbE::DescCache< iGbReg::RxDesc >::unusedCache.
Referenced by IGbE::rxStateMachine().
|
protected |
Bytes of packet that have been copied, so we know when to set EOP.
Definition at line 357 of file i8254xGBe.hh.
Referenced by pktComplete(), serialize(), unserialize(), and writePacket().
EventFunctionWrapper IGbE::RxDescCache::pktDataEvent |
Definition at line 386 of file i8254xGBe.hh.
Referenced by hasOutstandingEvents(), RxDescCache(), and writePacket().
|
protected |
Definition at line 350 of file i8254xGBe.hh.
Referenced by packetDone(), pktComplete(), serialize(), unserialize(), and writePacket().
EventFunctionWrapper IGbE::RxDescCache::pktEvent |
Definition at line 380 of file i8254xGBe.hh.
Referenced by hasOutstandingEvents(), and writePacket().
EventFunctionWrapper IGbE::RxDescCache::pktHdrEvent |
Definition at line 385 of file i8254xGBe.hh.
Referenced by hasOutstandingEvents(), RxDescCache(), and writePacket().
|
protected |
Variable to head with header/data completion events.
Definition at line 353 of file i8254xGBe.hh.
Referenced by pktSplitDone(), serialize(), and unserialize().