Changeset 22206 in vbox for trunk/src/VBox
- Timestamp:
- Aug 12, 2009 12:41:36 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r22205 r22206 64 64 #define SLIRP_CAN_SAND_IN_PDM 1 65 65 #define SLIRP_SPLIT_CAN_OUTPUT 1 66 #define SLIRP_FLUSH_DEV 167 66 #endif 68 67 … … 169 168 STAMCOUNTER StatQueuePktSent; /**< counting packet sent via PDM queue */ 170 169 STAMCOUNTER StatQueuePktDropped; /**< counting packet drops by PDM queue */ 171 #ifdef SLIRP_ FLUSH_DEV170 #ifdef SLIRP_SPLIT_CAN_OUTPUT 172 171 PPDMTHREAD pPDMQueueFlusher; 173 172 RTSEMEVENT semPDMQueueFlusher; … … 178 177 typedef DRVNAT *PDRVNAT; 179 178 180 #ifdef SLIRP_ FLUSH_DEV179 #ifdef SLIRP_SPLIT_CAN_OUTPUT 181 180 static DECLCALLBACK(int) drvNATPDMQueueFlusher(PPDMDRVINS pDrvIns, PPDMTHREAD pThread) 182 181 { … … 204 203 #endif 205 204 } 206 if (new_flag == 0) 207 { 208 pThis->output_flag = 0; 209 goto flusher_sleeping; /*flushing won't give any results */ 210 } 211 #if 0 212 pThis->output_flag = 0; 213 PDMQueueFlush(pThis->pSendQueue); 214 rc = pThis->pPort->pfnWaitReceiveAvail(pThis->pPort, 0); 215 pThis->output_flag = RT_SUCCESS(rc) ? 1 : 0; 216 #endif 217 flusher_sleeping: 205 pThis->output_flag = new_flag; 218 206 RTSemEventWait(pThis->semPDMQueueFlusher, RT_INDEFINITE_WAIT); 219 207 } … … 622 610 # else 623 611 PDRVNAT pThis = (PDRVNAT)pvUser; 624 //drvNATPDMQueueFlusherWakeup(pThis->pDrvIns, pThis->pPDMQueueFlusher);625 612 return pThis->output_flag; 626 613 # endif 627 614 #else 628 615 return 1; 629 #endif630 }631 632 void slirp_flush_dev(void *pvUser)633 {634 #ifdef SLIRP_FLUSH_DEV635 #if 0636 PDRVNAT pThis = (PDRVNAT)pvUser;637 drvNATPDMQueueFlusherWakeup(pThis->pDrvIns, pThis->pPDMQueueFlusher);638 #endif639 616 #endif 640 617 } … … 1055 1032 AssertRC(rc); 1056 1033 pThis->output_flag = 0; 1057 #ifdef SLIRP_ FLUSH_DEV1034 #ifdef SLIRP_SPLIT_CAN_OUTPUT 1058 1035 rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pPDMQueueFlusher, pThis, drvNATPDMQueueFlusher, 1059 1036 drvNATPDMQueueFlusherWakeup, 128 * _1K, RTTHREADTYPE_IO, "NAT-PDMFLUSHER"); -
trunk/src/VBox/Devices/Network/slirp/if.c
r22192 r22206 228 228 if (!if_queued) 229 229 { 230 slirp_flush_dev(pData->pvUser);231 230 return; 232 231 } -
trunk/src/VBox/Devices/Network/slirp/libslirp.h
r22192 r22206 113 113 */ 114 114 unsigned int slirp_get_timeout_ms(PNATState pData); 115 void slirp_flush_dev(void *pvUser);116 115 117 116 # ifndef RT_OS_WINDOWS
Note:
See TracChangeset
for help on using the changeset viewer.