Changeset 7785 in vbox
- Timestamp:
- Apr 8, 2008 7:58:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r7033 r7785 245 245 static DECLCALLBACK(void) drvTAPNotifyCanReceive(PPDMINETWORKCONNECTOR pInterface) 246 246 { 247 #ifdef ASYNC_NET 247 248 PDRVTAP pData = PDMINETWORKCONNECTOR_2_DRVTAP(pInterface); 248 249 … … 262 263 if (ASMAtomicXchgU32(&pData->fOutOfSpace, false)) 263 264 RTSemEventSignal(pData->EventOutOfSpace); 265 #endif 264 266 } 265 267 … … 324 326 rc = RT_LIKELY(rc == DLPI_SUCCESS) ? VINF_SUCCESS : SolarisDLPIErr2VBoxErr(rc); 325 327 #else 328 /** @note At least on Linux we will never receive more than one network packet 329 * after poll() returned successfully. I don't know why but a second 330 * RTFileRead() operation will return with VERR_TRY_AGAIN. */ 326 331 rc = RTFileRead(pData->FileDevice, achBuf, sizeof(achBuf), &cbRead); 327 332 #endif … … 353 358 { 354 359 LogFlow(("drvTAPAsyncIoThread: cbMax=%d cbRead=%d waiting...\n", cbMax, cbRead)); 355 #if 1356 360 /* We get signalled by the network driver. 50ms is just for sanity */ 357 361 ASMAtomicXchgU32(&pData->fOutOfSpace, true); 358 362 RTSemEventWait(pData->EventOutOfSpace, 50); 359 #else360 RTThreadSleep(1);361 #endif362 363 cbMax = pData->pPort->pfnCanReceive(pData->pPort); 363 364 } … … 378 379 pData->u64LastReceiveTS = u64Now; 379 380 #endif 380 Log2(("drvTAPAsyncIoThread: cbRead=%#x\n" 381 "%.*Vhxd\n", 382 cbRead, cbRead, achBuf)); 381 Log2(("drvTAPAsyncIoThread: cbRead=%#x\n" "%.*Vhxd\n", cbRead, cbRead, achBuf)); 383 382 STAM_COUNTER_INC(&pData->StatPktRecv); 384 383 STAM_COUNTER_ADD(&pData->StatPktRecvBytes, cbRead);
Note:
See TracChangeset
for help on using the changeset viewer.