Changeset 5298 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Oct 15, 2007 5:22:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r5183 r5298 303 303 /* 304 304 * Wait for the device to have space for this frame. 305 * Most guests use frame-sized receive buffers, hence non-zero cbMax 306 * automatically means there is enough room for entire frame. Some 307 * guests (eg. Solaris) use large chains of small receive buffers 308 * (each 128 or so bytes large). We will still start receiving as soon 309 * as cbMax is non-zero because: 310 * - it would be quite expensive for pfnCanReceive to accurately 311 * determine free receive buffer space 312 * - if we were waiting for enough free buffers, there is a risk 313 * of deadlocking because the guest could be waiting for a receive 314 * overflow error to allocate more receive buffers 305 315 */ 306 316 size_t cbMax = pData->pPort->pfnCanReceive(pData->pPort); 307 if (cbMax < cbRead)317 if (cbMax == 0) 308 318 { 309 319 /** @todo receive overflow handling needs serious improving! */ 310 320 STAM_PROFILE_ADV_STOP(&pData->StatReceive, a); 311 321 STAM_PROFILE_START(&pData->StatRecvOverflows, b); 312 while ( cbMax < cbRead322 while ( cbMax == 0 313 323 && pData->enmState != ASYNCSTATE_TERMINATE) 314 324 {
Note:
See TracChangeset
for help on using the changeset viewer.