Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

As a rule of thumb, how much work can I do in an NDIS DPC interrupt?

David12345David12345 Member Posts: 3

Hey everyone,

I have an NDIS driver which uses scatter gather lists for DMA. Previously when my MiniportProcessSgList callback was invoked but I didn't have room in my tx ring for the SGL, I'd fail the net buffer with NDIS_STATUS_RESOURCES and assume Windows would retry later.

This made NDISTest unhappy since it doesn't want any failed net buffers. I switched this to stick the net buffer in a work queue, and when my NIC triggers my interrupt to complete pending net buffers freeing up space in the descriptor ring, I would pop net buffers off my work queue and insert them into my tx ring.

This works, but I was hoping some experts could weigh in on whether doing this amount of work in an interrupt is appropriate. Would I be better off queueing an NDIS work item from the interrupt to reschedule these pending net buffers? Is this something not worth worrying about?

I mainly ask because the literature I can find suggests that the main point of work items is to do things that must be done at PASSIVE while you're at DISPATCH, and to process these net buffers I'd need to raise the IRQL to DISPATCH anyways, so maybe I'm approaching this problem from entirely the wrong angle.



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE