VirtualBox

Changeset 34109 in vbox for trunk


Ignore:
Timestamp:
Nov 16, 2010 12:02:12 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67812
Message:

NetFlt/win: comments & assertions

Location:
trunk/src/VBox/HostDrivers/VBoxNetFlt/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h

    r34102 r34109  
    333333    VBOXADAPTSTATE                 enmState;
    334334#ifndef VBOXNETADP
    335     /** true if we should indicate the receive complete used by the ProtocolReceeive mechanism */
     335    /** true if we should indicate the receive complete used by the ProtocolReceive mechanism.
     336     * We need to indicate it only with the ProtocolReceive + NdisMEthIndicateReceive path.
     337     * There is no guarantee in the docs that the ProtocolReceive & ProtocolReceiveComplete
     338     * for one transfer are called on one same CPU, however this is how the latest passthru
     339     * sample handles this
     340     * Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
     341     * we're running on 64bit win7+, which can handle > 64 CPUs, however since KeGetCurrentProcessorNumber
     342     * always returns the number < than the number of CPUs in the first group, we're guaranteed to have CPU index < 64
     343     * @todo: use KeGetCurrentProcessorNumberEx for Win7+ 64 and dynamically extended array */
    336344    bool                        abIndicateRcvComplete[64];
    337345
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c

    r34102 r34109  
    18001800
    18011801            {
     1802                /* Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
     1803                * we're running on 64bit win7+, which can handle > 64 CPUs, however since KeGetCurrentProcessorNumber
     1804                * always returns the number < than the number of CPUs in the first group, we're guaranteed to have CPU index < 64
     1805                * @todo: use KeGetCurrentProcessorNumberEx for Win7+ 64 and dynamically extended array */
    18021806                ULONG Proc = KeGetCurrentProcessorNumber();
     1807                Assert(Proc < RT_ELEMENTS(pAdapt->abIndicateRcvComplete));
    18031808                pAdapt->abIndicateRcvComplete[Proc] = TRUE;
    18041809                switch (pAdapt->Medium)
     
    18641869    bool bNetFltActive;
    18651870    bool fAdaptActive = vboxNetFltWinReferenceAdaptNetFlt(pNetFlt, pAdapt, &bNetFltActive);
     1871    /* Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
     1872    * we're running on 64bit win7+, which can handle > 64 CPUs, however since KeGetCurrentProcessorNumber
     1873    * always returns the number < than the number of CPUs in the first group, we're guaranteed to have CPU index < 64
     1874    * @todo: use KeGetCurrentProcessorNumberEx for Win7+ 64 and dynamically extended array */
    18661875    ULONG Proc = KeGetCurrentProcessorNumber();
     1876    Assert(Proc < RT_ELEMENTS(pAdapt->abIndicateRcvComplete));
    18671877
    18681878    vboxNetFltWinPtFlushReceiveQueue(pAdapt, false);
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