VirtualBox

Ignore:
Timestamp:
Aug 12, 2009 4:18:32 AM (15 years ago)
Author:
vboxsync
Message:

NAT: slirp_can_send (on NAT thread and EMT)
flushes PDM queue on flushing Slirp's one

File:
1 edited

Legend:

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

    r22160 r22192  
    6161 */
    6262#define VBOX_NAT_DELAY_HACK
     63#if 0
     64#define SLIRP_CAN_SAND_IN_PDM 1
     65#define SLIRP_FLUSH_DEV 1
     66#endif
    6367
    6468#define GET_EXTRADATA(pthis, node, name, rc, type, type_name, var)                                  \
     
    537541int slirp_can_output(void *pvUser)
    538542{
     543#ifdef SLIRP_CAN_SAND_IN_PDM
    539544    int status = 0;
    540545    int rc = 0;
     
    552557    }
    553558    return 0;
    554 }
    555 
     559#else
     560   PDRVNAT pThis = (PDRVNAT)pvUser;
     561   return (RT_SUCCESS(pThis->pPort->pfnWaitReceiveAvail(pThis->pPort, 0))? 1 : 0);
     562#endif
     563}
     564
     565void slirp_flush_dev(void *pvUser)
     566{
     567#ifdef SLIRP_FLUSH_DEV
     568    PDRVNAT pThis = (PDRVNAT)pvUser;
     569    /*@todo: idealy should be done in other thread */
     570    PDMQueueFlush(pThis->pSendQueue);
     571#endif
     572}
    556573
    557574/**
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