X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=dev%2Fethertap.cc;h=7589991ef7fd3ec1ec84bda413e7bf63ddcddc87;hb=466284b5d29ad0d44c1b020353cf7521be2b90de;hp=807765d91ac289e8703ee8878677827303f81dc5;hpb=c389c2e327cc3ee1c988855b05505660c6670172;p=gem5.git diff --git a/dev/ethertap.cc b/dev/ethertap.cc index 807765d91..7589991ef 100644 --- a/dev/ethertap.cc +++ b/dev/ethertap.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2004 The Regents of The University of Michigan + * Copyright (c) 2003-2005 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -237,9 +237,10 @@ EtherTap::process(int revent) DPRINTF(Ethernet, "bus busy...buffer for retransmission\n"); packetBuffer.push(packet); if (!txEvent.scheduled()) - txEvent.schedule(curTick + 1000); - } else if (dump) + txEvent.schedule(curTick + retryTime); + } else if (dump) { dump->dump(packet); + } } } @@ -259,7 +260,7 @@ EtherTap::retransmit() } if (!packetBuffer.empty() && !txEvent.scheduled()) - txEvent.schedule(curTick + 1000); + txEvent.schedule(curTick + retryTime); } //===================================================================== @@ -269,7 +270,8 @@ EtherTap::serialize(ostream &os) { SERIALIZE_SCALAR(socket); SERIALIZE_SCALAR(buflen); - SERIALIZE_ARRAY((uint8_t *)buffer,buflen); + uint8_t *buffer = (uint8_t *)this->buffer; + SERIALIZE_ARRAY(buffer, buflen); SERIALIZE_SCALAR(buffer_offset); SERIALIZE_SCALAR(data_len); @@ -289,7 +291,8 @@ EtherTap::unserialize(Checkpoint *cp, const std::string §ion) { UNSERIALIZE_SCALAR(socket); UNSERIALIZE_SCALAR(buflen); - UNSERIALIZE_ARRAY((uint8_t *)buffer,buflen); + uint8_t *buffer = (uint8_t *)this->buffer; + UNSERIALIZE_ARRAY(buffer, buflen); UNSERIALIZE_SCALAR(buffer_offset); UNSERIALIZE_SCALAR(data_len);