summaryrefslogtreecommitdiff
path: root/src/dev/i8254xGBe.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2008-12-05 13:58:21 -0500
committerAli Saidi <saidi@eecs.umich.edu>2008-12-05 13:58:21 -0500
commit400e5162619f3a63c2ac3f7698af89a677829295 (patch)
tree25813233aeb51b207cb1a480fe30f0ce1e12fa19 /src/dev/i8254xGBe.hh
parentaab595a3062d59388fed76f03c38eaf1e137a099 (diff)
downloadgem5-400e5162619f3a63c2ac3f7698af89a677829295.tar.xz
IGbE: Add support for TCP segment offload
Diffstat (limited to 'src/dev/i8254xGBe.hh')
-rw-r--r--src/dev/i8254xGBe.hh25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh
index 618145d07..473174bcb 100644
--- a/src/dev/i8254xGBe.hh
+++ b/src/dev/i8254xGBe.hh
@@ -462,8 +462,8 @@ class IGbE : public EtherDevice
int descLeft() const
{
int left = unusedCache.size();
- if (cachePnt - descTail() >= 0)
- left += (cachePnt - descTail());
+ if (cachePnt >= descTail())
+ left += (descLen() - cachePnt + descTail());
else
left += (descTail() - cachePnt);
@@ -636,6 +636,21 @@ class IGbE : public EtherDevice
bool pktWaiting;
bool pktMultiDesc;
+ // tso variables
+ 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;
+
public:
TxDescCache(IGbE *i, std::string n, int s);
@@ -643,8 +658,9 @@ class IGbE : public EtherDevice
* return the size the of the packet to reserve space in tx fifo.
* @return size of the packet
*/
- int getPacketSize();
+ int getPacketSize(EthPacketPtr p);
void getPacketData(EthPacketPtr p);
+ void processContextDesc();
/** Ask if the packet has been transfered so the state machine can give
* it to the fifo.
@@ -670,6 +686,9 @@ class IGbE : public EtherDevice
void pktComplete();
EventWrapper<TxDescCache, &TxDescCache::pktComplete> pktEvent;
+ void headerComplete();
+ EventWrapper<TxDescCache, &TxDescCache::headerComplete> headerEvent;
+
virtual bool hasOutstandingEvents();
virtual void serialize(std::ostream &os);