Switch.cc (6284:a63d1dc4c820) | Switch.cc (6285:ce086eca1ede) |
---|---|
1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 68 unchanged lines hidden (view full) --- 77 m_throttles.insertAtBottom(throttle_ptr); 78 79 // Create one buffer per vnet (these are intermediaryQueues) 80 Vector<MessageBuffer*> intermediateBuffers; 81 for (int i=0; i<out.size(); i++) { 82 MessageBuffer* buffer_ptr = new MessageBuffer; 83 // Make these queues ordered 84 buffer_ptr->setOrdering(true); | 1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 68 unchanged lines hidden (view full) --- 77 m_throttles.insertAtBottom(throttle_ptr); 78 79 // Create one buffer per vnet (these are intermediaryQueues) 80 Vector<MessageBuffer*> intermediateBuffers; 81 for (int i=0; i<out.size(); i++) { 82 MessageBuffer* buffer_ptr = new MessageBuffer; 83 // Make these queues ordered 84 buffer_ptr->setOrdering(true); |
85 if(FINITE_BUFFERING) { 86 buffer_ptr->setSize(FINITE_BUFFER_SIZE); | 85 Network* net_ptr = RubySystem::getNetwork(); 86 if(net_ptr->getBufferSize() > 0) { 87 buffer_ptr->setSize(net_ptr->getBufferSize()); |
87 } 88 intermediateBuffers.insertAtBottom(buffer_ptr); 89 m_buffers_to_free.insertAtBottom(buffer_ptr); 90 } 91 92 // Hook the queues to the PerfectSwitch 93 m_perfect_switch_ptr->addOutPort(intermediateBuffers, routing_table_entry); 94 --- 111 unchanged lines hidden --- | 88 } 89 intermediateBuffers.insertAtBottom(buffer_ptr); 90 m_buffers_to_free.insertAtBottom(buffer_ptr); 91 } 92 93 // Hook the queues to the PerfectSwitch 94 m_perfect_switch_ptr->addOutPort(intermediateBuffers, routing_table_entry); 95 --- 111 unchanged lines hidden --- |