Deleted Added
sdiff udiff text old ( 11299:72046b9b3323 ) new ( 11701:5e7599457b97 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 1724 unchanged lines hidden (view full) ---

1733 ip->sum(cksum(ip));
1734 txIpChecksums++;
1735 } else {
1736 warn_once("IPPKT set, but not UDP!\n");
1737 }
1738 }
1739 }
1740
1741 txPacket->length = txPacketBufPtr - txPacket->data;
1742 // this is just because the receive can't handle a
1743 // packet bigger want to make sure
1744 if (txPacket->length > 1514)
1745 panic("transmit packet too large, %s > 1514\n",
1746 txPacket->length);
1747
1748#ifndef NDEBUG

--- 432 unchanged lines hidden (view full) ---

2181 txFifo.serialize("txFifo", cp);
2182
2183 /*
2184 * Serialize the various helper variables
2185 */
2186 bool txPacketExists = txPacket != nullptr;
2187 SERIALIZE_SCALAR(txPacketExists);
2188 if (txPacketExists) {
2189 txPacket->length = txPacketBufPtr - txPacket->data;
2190 txPacket->serialize("txPacket", cp);
2191 uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
2192 SERIALIZE_SCALAR(txPktBufPtr);
2193 }
2194
2195 bool rxPacketExists = rxPacket != nullptr;
2196 SERIALIZE_SCALAR(rxPacketExists);

--- 148 unchanged lines hidden (view full) ---

2345 txFifo.unserialize("txFifo", cp);
2346
2347 /*
2348 * unserialize the various helper variables
2349 */
2350 bool txPacketExists;
2351 UNSERIALIZE_SCALAR(txPacketExists);
2352 if (txPacketExists) {
2353 txPacket = make_shared<EthPacketData>(16384);
2354 txPacket->unserialize("txPacket", cp);
2355 uint32_t txPktBufPtr;
2356 UNSERIALIZE_SCALAR(txPktBufPtr);
2357 txPacketBufPtr = (uint8_t *) txPacket->data + txPktBufPtr;
2358 } else
2359 txPacket = 0;
2360
2361 bool rxPacketExists;
2362 UNSERIALIZE_SCALAR(rxPacketExists);
2363 rxPacket = 0;
2364 if (rxPacketExists) {
2365 rxPacket = make_shared<EthPacketData>(16384);
2366 rxPacket->unserialize("rxPacket", cp);
2367 uint32_t rxPktBufPtr;
2368 UNSERIALIZE_SCALAR(rxPktBufPtr);
2369 rxPacketBufPtr = (uint8_t *) rxPacket->data + rxPktBufPtr;
2370 } else
2371 rxPacket = 0;
2372
2373 UNSERIALIZE_SCALAR(txXferLen);

--- 107 unchanged lines hidden ---