CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Posts
    2

    Driver slows calls to GetIfTable

    I have inherited an NDIS 5.1 intermediate driver which runs correctly under XP yet with Vista the processor occupancy shoots up as soon as the user part of the application (a firewall) is started. The culprit appears to be the time taken to call the Windows GetIfTable function. A simple test app shows that a call to this function prior to installing the driver takes around 3ms yet this increases to 220ms once the driver is installed.

    Neither static analysis (PREfast and SDV) nor dynamic testing (verifier) highlighted any issues with the driver.

    I’m using the latest WDK and building the driver in the XP checked build environment.

    Any suggestions as to possible issues with the driver or information as to how GetIfTable interacts with driver are gratefully received.

    Thanks for your time

    Dave

  2. #2
    Join Date
    Jan 2010
    Posts
    2

    Re: Driver slows calls to GetIfTable

    Whilst I still don't understand cause of the problem, I can now see where all the processor time is going. Each call to GetIfTable calls the MiniportQueryInformation function 198 times per adapter - so as the driver is installed by five adapters (two NICs and three WAN Miniports), this results in 990 calls to MiniportQueryInformation for each GetIfTable.

    Interestingly, the calls are batched in groups of either 66 or 132 per adapter MiniportQueryInformation, so a typical sequence maybe

    66 calls for adapter A;
    66 calls for adapter B;
    132 calls for adapter C;
    66 calls for adapter A;
    66 calls for adapter D;
    132 calls for adapter E;
    66 calls for adapter A;
    66 calls for adapter C;
    132 calls for adapter B;
    132 calls for adapter D;
    66 calls for adapter E;

    Needless to say I don't see all these calls under XP! The timer taken for each invocation of MiniportQueryInformation is very similar for XP and Vista.

    I've no idea what all this tells me, but at least I feel I'm making progress!

    Dave

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured