gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
IGbE::TxDescCache Class Reference
Inheritance diagram for IGbE::TxDescCache:
IGbE::DescCache< iGbReg::TxDesc > Serializable

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

EventFunctionWrapper pktEvent
 
EventFunctionWrapper headerEvent
 
EventFunctionWrapper 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
 
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
 
- 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::TxDescfetchBuf
 
iGbReg::TxDescwbBuf
 
IGbEigbe
 
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 ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Protected Types inherited from IGbE::DescCache< iGbReg::TxDesc >
typedef std::deque< iGbReg::TxDesc *> CacheType
 

Detailed Description

Definition at line 397 of file i8254xGBe.hh.

Constructor & Destructor Documentation

◆ TxDescCache()

IGbE::TxDescCache::TxDescCache ( IGbE i,
std::string  n,
int  s 
)

Member Function Documentation

◆ actionAfterWb()

void IGbE::TxDescCache::actionAfterWb ( )
overrideprotectedvirtual

◆ completionWriteback()

void IGbE::TxDescCache::completionWriteback ( Addr  a,
bool  enabled 
)
inline

Definition at line 486 of file i8254xGBe.hh.

References ArmISA::a, DPRINTF, Stats::enabled(), and IGbE::DescCache< T >::hasOutstandingEvents().

Referenced by IGbE::write().

◆ descBase()

Addr IGbE::TxDescCache::descBase ( ) const
inlineoverrideprotectedvirtual

◆ descHead()

long IGbE::TxDescCache::descHead ( ) const
inlineoverrideprotectedvirtual

◆ descInBlock()

unsigned IGbE::TxDescCache::descInBlock ( unsigned  num_desc)
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().

◆ descLen()

long IGbE::TxDescCache::descLen ( ) const
inlineoverrideprotectedvirtual

◆ descTail()

long IGbE::TxDescCache::descTail ( ) const
inlineoverrideprotectedvirtual

◆ enableSm()

void IGbE::TxDescCache::enableSm ( )
overrideprotectedvirtual

◆ fetchAfterWb()

void IGbE::TxDescCache::fetchAfterWb ( )
inlineoverrideprotectedvirtual

◆ getPacketData()

void IGbE::TxDescCache::getPacketData ( EthPacketPtr  p)

◆ getPacketSize()

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.

Returns
size of the packet

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().

◆ hasOutstandingEvents()

bool IGbE::TxDescCache::hasOutstandingEvents ( )
overridevirtual

◆ headerComplete()

void IGbE::TxDescCache::headerComplete ( )

◆ nullCallback()

void IGbE::TxDescCache::nullCallback ( )
inline

Definition at line 496 of file i8254xGBe.hh.

References DPRINTF.

Referenced by TxDescCache().

◆ packetAvailable()

bool IGbE::TxDescCache::packetAvailable ( )

Ask if the packet has been transfered so the state machine can give it to the fifo.

Returns
packet available in descriptor cache

Definition at line 2042 of file i8254xGBe.cc.

References pktDone.

Referenced by IGbE::txStateMachine().

◆ packetMultiDesc()

bool IGbE::TxDescCache::packetMultiDesc ( )
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.

Returns
packet can't be sent out because it's a multi-descriptor packet

Definition at line 475 of file i8254xGBe.hh.

Referenced by IGbE::txStateMachine().

◆ packetWaiting()

bool IGbE::TxDescCache::packetWaiting ( )
inline

Ask if we are still waiting for the packet to be transfered.

Returns
packet still in transit.

Definition at line 467 of file i8254xGBe.hh.

Referenced by IGbE::txStateMachine().

◆ pktComplete()

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().

◆ processContextDesc()

void IGbE::TxDescCache::processContextDesc ( )

◆ serialize()

void IGbE::TxDescCache::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint 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.

◆ unserialize()

void IGbE::TxDescCache::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint 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.

◆ updateHead()

void IGbE::TxDescCache::updateHead ( long  h)
inlineoverrideprotectedvirtual

Member Data Documentation

◆ completionAddress

Addr IGbE::TxDescCache::completionAddress
protected

Definition at line 418 of file i8254xGBe.hh.

Referenced by actionAfterWb(), serialize(), and unserialize().

◆ completionEnabled

bool IGbE::TxDescCache::completionEnabled
protected

Definition at line 419 of file i8254xGBe.hh.

Referenced by actionAfterWb(), serialize(), and unserialize().

◆ descEnd

uint32_t IGbE::TxDescCache::descEnd
protected

Definition at line 420 of file i8254xGBe.hh.

Referenced by actionAfterWb(), serialize(), and unserialize().

◆ headerEvent

EventFunctionWrapper IGbE::TxDescCache::headerEvent

Definition at line 483 of file i8254xGBe.hh.

Referenced by processContextDesc(), and TxDescCache().

◆ isTcp

bool IGbE::TxDescCache::isTcp
protected

Definition at line 415 of file i8254xGBe.hh.

Referenced by processContextDesc(), serialize(), and unserialize().

◆ nullEvent

EventFunctionWrapper IGbE::TxDescCache::nullEvent

Definition at line 499 of file i8254xGBe.hh.

Referenced by actionAfterWb(), and TxDescCache().

◆ pktDone

bool IGbE::TxDescCache::pktDone
protected

Definition at line 414 of file i8254xGBe.hh.

Referenced by packetAvailable(), pktComplete(), serialize(), and unserialize().

◆ pktEvent

EventFunctionWrapper IGbE::TxDescCache::pktEvent

Definition at line 480 of file i8254xGBe.hh.

Referenced by getPacketData(), and hasOutstandingEvents().

◆ pktMultiDesc

bool IGbE::TxDescCache::pktMultiDesc
protected

Definition at line 417 of file i8254xGBe.hh.

Referenced by pktComplete(), serialize(), and unserialize().

◆ pktWaiting

bool IGbE::TxDescCache::pktWaiting
protected

◆ tsoCopyBytes

Addr IGbE::TxDescCache::tsoCopyBytes
protected

◆ tsoDescBytesUsed

Addr IGbE::TxDescCache::tsoDescBytesUsed
protected

◆ tsoHeader

uint8_t IGbE::TxDescCache::tsoHeader[256]
protected

Definition at line 433 of file i8254xGBe.hh.

Referenced by getPacketData(), processContextDesc(), serialize(), and unserialize().

◆ tsoHeaderLen

Addr IGbE::TxDescCache::tsoHeaderLen
protected

◆ tsoLoadedHeader

bool IGbE::TxDescCache::tsoLoadedHeader
protected

◆ tsoMss

Addr IGbE::TxDescCache::tsoMss
protected

Definition at line 426 of file i8254xGBe.hh.

Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().

◆ tsoPktHasHeader

bool IGbE::TxDescCache::tsoPktHasHeader
protected

◆ tsoPktPayloadBytes

Addr IGbE::TxDescCache::tsoPktPayloadBytes
protected

Definition at line 430 of file i8254xGBe.hh.

Referenced by serialize(), and unserialize().

◆ tsoPkts

int IGbE::TxDescCache::tsoPkts
protected

Definition at line 436 of file i8254xGBe.hh.

Referenced by pktComplete(), processContextDesc(), serialize(), and unserialize().

◆ tsoPrevSeq

Addr IGbE::TxDescCache::tsoPrevSeq
protected

Definition at line 429 of file i8254xGBe.hh.

Referenced by pktComplete(), processContextDesc(), serialize(), and unserialize().

◆ tsoTotalLen

Addr IGbE::TxDescCache::tsoTotalLen
protected

Definition at line 427 of file i8254xGBe.hh.

Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().

◆ tsoUsedLen

Addr IGbE::TxDescCache::tsoUsedLen
protected

Definition at line 428 of file i8254xGBe.hh.

Referenced by getPacketSize(), pktComplete(), processContextDesc(), serialize(), and unserialize().

◆ useTso

bool IGbE::TxDescCache::useTso
protected

The documentation for this class was generated from the following files:

Generated on Mon Jun 8 2020 15:45:24 for gem5 by doxygen 1.8.13