Real time extension for NDIS IM driver

@page Section1 {margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {

}
P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}

Hi,

I am developing an IM driver using NDIS 5.1 on Windows XP. This driver has to be very deterministic, so I need to use some microsecond precision timers.

Could anyone please tell me if I can achieve this using some Real Time Extension for Windows XP? Thanks!

 

With Regards,

Subashini

 

Hi,

You can use KeInitializeTimerEx. But I dont understand the stuff that if miniport driver manages the packets in the milisecond then why IM driver needs to handle things in the more granular level?

Hope this will help.

–YatindraV

From: xxxxx@hcl.in
To: xxxxx@lists.osr.com
Date: Sat, 21 Nov 2009 16:40:06 +0530
Subject: [ntdev] Real time extension for NDIS IM driver

Hi,

I am developing an IM driver using NDIS 5.1 on Windows XP. This driver has to be very deterministic, so I need to use some microsecond precision timers.
Could anyone please tell me if I can achieve this using some Real Time Extension for Windows XP? Thanks!

With Regards,
Subashini


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

DISCLAIMER:

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.



For more of what happens online Head to the Daily Blob on Windows Live
http://windowslive.ninemsn.com.au/blog.aspx

I’m not sure that you can say that a miniport “manages packets in the millisecond”. The hardware receives packets and generates an interrupt. When the interrupt is serviced the miniport fetches one (or much more likely more than one) packet from the hardware, creates appropriate NDIS representations (NDIS_PACKET, NB, etc.) and indicates them to the higher-level miniports. These packets eventually get to TCP/IP and are processed.

TCP/IP doesn’t care about timestamps at the millisecond level. It just processes packets as it gets them and sends when it gets around to it. Overall performance is very good.

Windows just doesn’t need the timing functionality you are hoping for at this point in time.

Thomas F. Divine

From: yatindra vaishnav
Sent: Saturday, November 21, 2009 9:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Real time extension for NDIS IM driver

Hi,
You can use KeInitializeTimerEx. But I dont understand the stuff that if miniport driver manages the packets in the milisecond then why IM driver needs to handle things in the more granular level?

Hope this will help.

–YatindraV


From: xxxxx@hcl.in
To: xxxxx@lists.osr.com
Date: Sat, 21 Nov 2009 16:40:06 +0530
Subject: [ntdev] Real time extension for NDIS IM driver

Hi,
I am developing an IM driver using NDIS 5.1 on Windows XP. This driver has to be very deterministic, so I need to use some microsecond precision timers.

Could anyone please tell me if I can achieve this using some Real Time Extension for Windows XP? Thanks!

With Regards,

Subashini


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer DISCLAIMER:

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.



Head to the Daily Blob on Windows Live For more of what happens online

NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Subashini Venkatapathy - ERS, HCL Tech wrote:

I am developing an IM driver using NDIS 5.1 on Windows XP. This driver
has to be very deterministic, so I need to use some microsecond
precision timers.

Do you mean microsecond-precision interrupts and callbacks, or do you
mean interval timing with microsecond precision? Those are two VERY
different requirements.

You can achieve microsecond-precision interval timing in several ways.
The processor cycle counter (KeQueryPerformanceCounter) is one way, once
you understand its limitations. You can also use the APIC timer for
this, although there aren’t any defined APIs for this, as far as I know.

There is no way in Windows to achieve microsecond-precision interrupts.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hello,
I am looking for microsecond precision callbacks, I understand that we cannot achieve this through Windows, will we be able to achieve it if we use some real time extensions for windows. I have never used or i dont have much idea on using real time extensions. So i wanted to know whether we can use real time extension kernel APIs in our IM driver and achieve microsecond precision callbacks. Thanks!

With Regards,
Subashini

> Hello,

I am looking for microsecond precision callbacks, I understand that we
cannot
achieve this through Windows, will we be able to achieve it if we use
some
real time extensions for windows. I have never used or i dont have
much idea
on using real time extensions. So i wanted to know whether we can use
real
time extension kernel APIs in our IM driver and achieve microsecond
precision
callbacks. Thanks!

I think that if you want realtime behaviour, then you should choose a
realtime OS, or build the realtime elements into custom hardware and
interface windows to that instead. You haven’t stated what the
application is though so I can’t tell if that is a feasible thing to do
in your case.

James

> I think that if you want realtime behaviour, then you should choose a realtime OS,

This is exactly what he refers to with the term “realtime extensions” - it is, essentially, an RTOS in its own right that implements its own RT scheduler and provides its own RT API to GPOS that runs as a lowest-priority task that is allowed to miss all possible deadlines. In order to make it work quite a few modification to GPOS have to be applied - at the very minimum, it involves custom implementation of interrupt handling code and of a spinlock-related stuff . Therefore, once the target GPOS is Windows, this RTOS (or part of it) must be implemented as a custom HAL under Windows. It is understandable that
any component with RT requirements (either KM or UM one) cannot use any API that GPOS provides - all API functions that RT components rely upon have to be either implemented by RTOS or modified to the extent that allows them to be suitable for RT components, which implies A LOT of hooking under Windows…

You haven’t stated what the application is though so I can’t tell if that is a feasible thing to do in your case.

Actually, he did state the application - it is NDIS IM filter, which happens to be an element of Windows network stack. Therefore, in context of his question, the whole thing will involve custom implementation of at least HAL and NDIS library. In any case, trying to achieve RT performance of a component that is meant to sit in between two components that don’t have RT requirements does not seem to be particularly useful…

Anton Bassov

xxxxx@hcl.in wrote:

I am looking for microsecond precision callbacks, I understand that we cannot achieve this through Windows, will we be able to achieve it if we use some real time extensions for windows. I have never used or i dont have much idea on using real time extensions. So i wanted to know whether we can use real time extension kernel APIs in our IM driver and achieve microsecond precision callbacks.

You would have to ask the real-time extension vendor about this.
Without custom extensions, interrupt latency in Windows is unbounded.
Even if you had an interrupt-generating hardware clock with microsecond
precision, that won’t help if it takes 20us for you to enter your ISR.
Today, that scenario is not uncommon.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.