ns_gige.cc (11299:72046b9b3323) ns_gige.cc (11701:5e7599457b97)
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
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->simLength = txPacketBufPtr - txPacket->data;
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) {
1742 txPacket->length = txPacketBufPtr - txPacket->data;
1743 // this is just because the receive can't handle a
1744 // packet bigger want to make sure
1745 if (txPacket->length > 1514)
1746 panic("transmit packet too large, %s > 1514\n",
1747 txPacket->length);
1748
1749#ifndef NDEBUG

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

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

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

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

--- 107 unchanged lines hidden ---