VirtualBox

Changeset 44355 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jan 24, 2013 1:27:28 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83319
Message:

PDMNetShaper: Cleanups & fixes (untested). PVM -> PUVM. Note: cs is a register within the VMM, not critical section. :)

File:
1 edited

Legend:

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

    r42102 r44355  
    128128    STAM_REL_COUNTER_ADD(&pThis->StatXmitBytesRequested, cbMin);
    129129    STAM_REL_COUNTER_INC(&pThis->StatXmitPktsRequested);
    130 #ifdef IN_RING3
    131     if (!PDMR3NsAllocateBandwidth(&pThis->Filter, cbMin))
    132     {
    133         STAM_REL_COUNTER_ADD(&pThis->StatXmitBytesDenied, cbMin);
    134         STAM_REL_COUNTER_INC(&pThis->StatXmitPktsDenied);
    135         return VERR_TRY_AGAIN;
    136     }
    137 #endif
    138 #ifdef IN_RING0
    139     if (!PDMR0NsAllocateBandwidth(&pThis->Filter, cbMin))
     130#if defined(IN_RING3) || defined(IN_RING0)
     131    if (!PDMNsAllocateBandwidth(&pThis->Filter, cbMin))
    140132    {
    141133        STAM_REL_COUNTER_ADD(&pThis->StatXmitBytesDenied, cbMin);
     
    477469        rc = VINF_SUCCESS;
    478470
    479     pThis->Filter.pIDrvNet = &pThis->INetworkDown;
     471    pThis->Filter.pIDrvNetR3 = &pThis->INetworkDown;
    480472    rc = PDMDrvHlpNetShaperAttach(pDrvIns, pThis->pszBwGroup, &pThis->Filter);
    481473    if (RT_FAILURE(rc))
Note: See TracChangeset for help on using the changeset viewer.

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