VirtualBox

Changeset 22413 in vbox


Ignore:
Timestamp:
Aug 24, 2009 1:53:08 PM (15 years ago)
Author:
vboxsync
Message:

NAT: Backed r51387

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

Legend:

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

    r22410 r22413  
    5252#include <iprt/req.h>
    5353
    54 #define COUNTERS_INIT
    55 #include "counters.h"
    5654
    5755/*******************************************************************************
     
    237235static DECLCALLBACK(void) drvNATRecvWorker(PDRVNAT pThis, uint8_t *pu8Buf, int cb)
    238236{
    239     STAM_PROFILE_START(&pThis->StatNATRecv, a);
    240237    if (RT_FAILURE(pThis->pPort->pfnWaitReceiveAvail(pThis->pPort, RT_INDEFINITE_WAIT)))
    241238    {
    242239        AssertMsgFailed(("NAT: No RX available even on indefinite wait"));
    243240    }
    244     STAM_PROFILE_STOP(&pThis->StatNATRecvWait, a);
    245241    int rc = pThis->pPort->pfnReceive(pThis->pPort, pu8Buf, cb);
    246242    RTMemFree(pu8Buf);
    247     STAM_PROFILE_STOP(&pThis->StatNATRecv, a);
    248243    AssertRC(rc);
    249244}
  • trunk/src/VBox/Devices/Network/slirp/counters.h

    r22410 r22413  
    4747#  define DEREGISTER_COUNTER(name, storage) do {} while (0)
    4848# endif
    49 #else
    5049# undef COUNTERS_INIT
    5150#endif
     
    119118#  ifdef SLIRP_SPLIT_CAN_OUTPUT
    120119DRV_COUNTING_COUNTER(NATRecvWakeups, "counting wakeups of NAT RX thread");
    121 DRV_PROFILE_COUNTER(NATRecv,"Time spent in NATRecv worker");
    122 DRV_PROFILE_COUNTER(NATRecvWait,"Time spent in NATRecv worker in waiting of free RX buffers");
    123120#  endif
    124121DRV_COUNTING_COUNTER(QueuePktSent, "counting packet sent via PDM Queue");       /**< counting packet sent via PDM queue */
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r22410 r22413  
     1#include "slirp.h"
    12#ifdef RT_OS_OS2
    23# include <paths.h>
     
    1516#endif
    1617#include <alias.h>
     18#define COUNTERS_INIT
     19#include "counters.h"
    1720
    1821#if !defined(RT_OS_WINDOWS)
     
    567570# define PROFILE_COUNTER(name, dsc)     REGISTER_COUNTER(name, pData, STAMTYPE_PROFILE, STAMUNIT_TICKS_PER_CALL, dsc)
    568571# define COUNTING_COUNTER(name, dsc)    REGISTER_COUNTER(name, pData, STAMTYPE_COUNTER, STAMUNIT_COUNT,          dsc)
     572
    569573# include "counters.h"
     574
    570575# undef COUNTER
    571576/** @todo register statistics for the variables dumped by:
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r22410 r22413  
    2323
    2424#include <iprt/req.h>
    25 
    26 #define COUNTERS_INIT
    27 #include "counters.h"
    28 
    2925#include "ip_icmp.h"
    3026#include "dnsproxy/dnsproxy.h"
     27
    3128/** Number of DHCP clients supported by NAT. */
    3229#define NB_ADDR     16
     
    251248#define PROFILE_COUNTER(name, dsc)     STAMPROFILE Stat ## name
    252249#define COUNTING_COUNTER(name, dsc)    STAMCOUNTER Stat ## name
     250
    253251#include "counters.h"
    254252
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