VirtualBox

Changeset 22206 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 12, 2009 12:41:36 PM (15 years ago)
Author:
vboxsync
Message:

NAT: make experiment more clear

Location:
trunk/src/VBox/Devices/Network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r22205 r22206  
    6464#define SLIRP_CAN_SAND_IN_PDM 1
    6565#define SLIRP_SPLIT_CAN_OUTPUT 1
    66 #define SLIRP_FLUSH_DEV 1
    6766#endif
    6867
     
    169168    STAMCOUNTER             StatQueuePktSent;       /**< counting packet sent via PDM queue */
    170169    STAMCOUNTER             StatQueuePktDropped;    /**< counting packet drops by PDM queue */
    171 #ifdef SLIRP_FLUSH_DEV
     170#ifdef SLIRP_SPLIT_CAN_OUTPUT
    172171    PPDMTHREAD              pPDMQueueFlusher;
    173172    RTSEMEVENT              semPDMQueueFlusher;
     
    178177typedef DRVNAT *PDRVNAT;
    179178
    180 #ifdef SLIRP_FLUSH_DEV
     179#ifdef SLIRP_SPLIT_CAN_OUTPUT
    181180static DECLCALLBACK(int) drvNATPDMQueueFlusher(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
    182181 {
     
    204203#endif
    205204        }
    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;
    218206        RTSemEventWait(pThis->semPDMQueueFlusher, RT_INDEFINITE_WAIT);
    219207        }
     
    622610# else
    623611   PDRVNAT pThis = (PDRVNAT)pvUser;
    624    //drvNATPDMQueueFlusherWakeup(pThis->pDrvIns, pThis->pPDMQueueFlusher);
    625612   return pThis->output_flag;
    626613# endif
    627614#else
    628615    return 1;
    629 #endif
    630 }
    631 
    632 void slirp_flush_dev(void *pvUser)
    633 {
    634 #ifdef SLIRP_FLUSH_DEV
    635 #if 0
    636     PDRVNAT pThis = (PDRVNAT)pvUser;
    637     drvNATPDMQueueFlusherWakeup(pThis->pDrvIns, pThis->pPDMQueueFlusher);
    638 #endif
    639616#endif
    640617}
     
    10551032            AssertRC(rc);
    10561033            pThis->output_flag = 0;
    1057 #ifdef SLIRP_FLUSH_DEV
     1034#ifdef SLIRP_SPLIT_CAN_OUTPUT
    10581035            rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pPDMQueueFlusher, pThis, drvNATPDMQueueFlusher,
    10591036                                          drvNATPDMQueueFlusherWakeup, 128 * _1K, RTTHREADTYPE_IO, "NAT-PDMFLUSHER");
  • trunk/src/VBox/Devices/Network/slirp/if.c

    r22192 r22206  
    228228        if (!if_queued)
    229229        {
    230             slirp_flush_dev(pData->pvUser);
    231230            return;
    232231        }
  • trunk/src/VBox/Devices/Network/slirp/libslirp.h

    r22192 r22206  
    113113 */
    114114unsigned int slirp_get_timeout_ms(PNATState pData);
    115 void slirp_flush_dev(void *pvUser);
    116115
    117116# ifndef RT_OS_WINDOWS
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette