Changeset 39498 in vbox for trunk/src/VBox/NetworkServices/NAT
- Timestamp:
- Dec 1, 2011 7:59:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/VBoxNetNAT.cpp
r39468 r39498 101 101 RTSEMEVENT m_EventUrgSend; 102 102 103 PRTREQQUEUE m_pReqQueue;104 PRTREQQUEUE m_pSendQueue;105 PRTREQQUEUE m_pUrgSendQueue;103 RTREQQUEUE m_hReqQueue; 104 RTREQQUEUE m_hSendQueue; 105 RTREQQUEUE m_hUrgSendQueue; 106 106 volatile uint32_t cUrgPkt; 107 107 volatile uint32_t cPkt; … … 186 186 slirp_register_external_event(m_pNATState, m_hWakeupEvent, VBOX_WAKEUP_EVENT_INDEX); 187 187 #endif 188 rc = RTReq CreateQueue(&m_pReqQueue);189 AssertReleaseRC(rc); 190 191 rc = RTReq CreateQueue(&m_pSendQueue);192 AssertReleaseRC(rc); 193 194 rc = RTReq CreateQueue(&m_pUrgSendQueue);188 rc = RTReqQueueCreate(&m_hReqQueue); 189 AssertReleaseRC(rc); 190 191 rc = RTReqQueueCreate(&m_hSendQueue); 192 AssertReleaseRC(rc); 193 194 rc = RTReqQueueCreate(&m_hUrgSendQueue); 195 195 AssertReleaseRC(rc); 196 196 … … 226 226 WaitReq.cMillies = 2000; /* 2 secs - the sleep is for some reason uninterruptible... */ /** @todo fix interruptability in SrvIntNet! */ 227 227 #if 0 228 RTReqProcess(m_ pSendQueue, 0);229 RTReqProcess(m_ pUrgSendQueue, 0);228 RTReqProcess(m_hSendQueue, 0); 229 RTReqProcess(m_hUrgSendQueue, 0); 230 230 #endif 231 231 int rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr); … … 267 267 268 268 /* don't wait, we may have to wakeup the NAT thread first */ 269 rc = RTReq CallEx(m_pReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,270 (PFNRT)SendWorker, 2, m, cbFrame);269 rc = RTReqQueueCallEx(m_hReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, 270 (PFNRT)SendWorker, 2, m, cbFrame); 271 271 natNotifyNATThread(); 272 272 AssertReleaseRC(rc); … … 301 301 memcpy(pvSlirpFrame, pvSegFrame, cbSegFrame); 302 302 303 rc = RTReq CallEx(m_pReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,304 RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,305 (PFNRT)SendWorker, 2, m, cbSegFrame);303 rc = RTReqQueueCallEx(m_hReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, 304 RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, 305 (PFNRT)SendWorker, 2, m, cbSegFrame); 306 306 AssertReleaseRC(rc); 307 307 } … … 357 357 { 358 358 LogFlowFunc(("ENTER: m:%p, pu8Buf:%p, cb:%d\n", m, pu8Buf, cb)); 359 int rc = RTReq CallEx(g_pNAT->m_pUrgSendQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,360 (PFNRT)IntNetSendWorker, 4, (uintptr_t)1, (uintptr_t)pu8Buf, (uintptr_t)cb, (uintptr_t)m);359 int rc = RTReqQueueCallEx(g_pNAT->m_hUrgSendQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, 360 (PFNRT)IntNetSendWorker, 4, (uintptr_t)1, (uintptr_t)pu8Buf, (uintptr_t)cb, (uintptr_t)m); 361 361 ASMAtomicIncU32(&g_pNAT->cUrgPkt); 362 362 RTSemEventSignal(g_pNAT->m_EventUrgSend); … … 368 368 LogFlowFunc(("ENTER: m:%p, pu8Buf:%p, cb:%d\n", m, pu8Buf, cb)); 369 369 AssertRelease(g_pNAT == pvUser); 370 int rc = RTReq CallEx(g_pNAT->m_pSendQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,371 (PFNRT)IntNetSendWorker, 4, (uintptr_t)0, (uintptr_t)pu8Buf, (uintptr_t)cb, (uintptr_t)m);370 int rc = RTReqQueueCallEx(g_pNAT->m_hSendQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, 371 (PFNRT)IntNetSendWorker, 4, (uintptr_t)0, (uintptr_t)pu8Buf, (uintptr_t)cb, (uintptr_t)m); 372 372 ASMAtomicIncU32(&g_pNAT->cPkt); 373 373 RTSemEventSignal(g_pNAT->m_EventSend); … … 524 524 } 525 525 /* process _all_ outstanding requests but don't wait */ 526 RTReq Process(pThis->m_pReqQueue, 0);526 RTReqQueueProcess(pThis->m_hReqQueue, 0); 527 527 RTMemFree(polls); 528 528 … … 551 551 slirp_select_poll(pThis->m_pNATState, /* fTimeout=*/false, /* fIcmp=*/(dwEvent == WSA_WAIT_EVENT_0)); 552 552 /* process _all_ outstanding requests but don't wait */ 553 RTReq Process(pThis->m_pReqQueue, 0);553 RTReqQueueProcess(pThis->m_hReqQueue, 0); 554 554 #endif /* RT_OS_WINDOWS */ 555 555 } … … 561 561 { 562 562 while (g_pNAT->fIsRunning) 563 RTReq Process(g_pNAT->m_pSendQueue, 0);563 RTReqQueueProcess(g_pNAT->m_hSendQueue, 0); 564 564 return VINF_SUCCESS; 565 565 } … … 567 567 { 568 568 while (g_pNAT->fIsRunning) 569 RTReq Process(g_pNAT->m_pUrgSendQueue, 0);569 RTReqQueueProcess(g_pNAT->m_hUrgSendQueue, 0); 570 570 return VINF_SUCCESS; 571 571 }
Note:
See TracChangeset
for help on using the changeset viewer.