View | Details | Raw Unified | Return to bug 939
Collapse All | Expand All

(-)a/src/devices/emu/emu-net-device.cc (-2 / +9 lines)
 Lines 57-63    Link Here 
57
NS_OBJECT_ENSURE_REGISTERED (EmuNetDevice);
57
NS_OBJECT_ENSURE_REGISTERED (EmuNetDevice);
58
58
59
#define EMU_MAGIC 65867
59
#define EMU_MAGIC 65867
60
#define MAX_PENDING_READS 8
61
60
62
61
63
TypeId 
62
TypeId 
 Lines 109-114    Link Here 
109
                   MakePointerAccessor (&EmuNetDevice::m_queue),
108
                   MakePointerAccessor (&EmuNetDevice::m_queue),
110
                   MakePointerChecker<Queue> ())
109
                   MakePointerChecker<Queue> ())
111
110
111
    .AddAttribute ("RxQueueSize", "Maximum size of the read queue.  "
112
                   "This value limits number of packets that have been read "
113
                   "from the network into a memory buffer but have not yet "
114
                   "been processed by the simulator.",
115
                   UintegerValue (1000),
116
                   MakeUintegerAccessor (&EmuNetDevice::m_maxPendingReads),
117
                   MakeUintegerChecker<uint32_t> ())
118
112
    //
119
    //
113
    // Trace sources at the "top" of the net device, where packets transition
120
    // Trace sources at the "top" of the net device, where packets transition
114
    // to/from higher layers.  These points do not really correspond to the 
121
    // to/from higher layers.  These points do not really correspond to the 
 Lines 772-778    Link Here 
772
      {
779
      {
773
        CriticalSection cs (m_pendingReadMutex);            
780
        CriticalSection cs (m_pendingReadMutex);            
774
        //std::cerr << std::endl << "EmuNetDevice read thread: m_pendingReadCount is " << m_pendingReadCount << std::endl;
781
        //std::cerr << std::endl << "EmuNetDevice read thread: m_pendingReadCount is " << m_pendingReadCount << std::endl;
775
        if (m_pendingReadCount >= MAX_PENDING_READS)
782
        if (m_pendingReadCount >= m_maxPendingReads)
776
          {
783
          {
777
            skip = true;
784
            skip = true;
778
          }
785
          }
(-)a/src/devices/emu/emu-net-device.h (+1 lines)
 Lines 522-527    Link Here 
522
   */
522
   */
523
  uint32_t m_nodeId;
523
  uint32_t m_nodeId;
524
524
525
  uint32_t m_maxPendingReads;
525
  uint32_t m_pendingReadCount;
526
  uint32_t m_pendingReadCount;
526
  SystemMutex m_pendingReadMutex;
527
  SystemMutex m_pendingReadMutex;
527
};
528
};

Return to bug 939