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:

Sending multiple WSK_BUF to kernel socket function WsksendTo()

parsaparsa Member Posts: 28

Hi All,

Is there anyway to send multiple WSK_Buf to WskSendTo() function to improve performance..
On the receive side WSK is offering WSK_DATA_INDICATION list to read multiple datagram packets in the callback, likewise i a looking on the send path.



  • MBond2MBond2 Member Posts: 140

    What kind of performance improvement are you hoping for?

  • parsaparsa Member Posts: 28

    Currently, I am invoking WskSendTo for every NET_BUFFER in the NET_BUFFER_LIST. Each call to WskSendTo invokes the IRP completion. Instead of calling WskSendTo for every NET_BUFFER in the NET_BUFFER_LIST, if i can send some list of WSK_Buf, i will be getting less number IRP completion callback as well as at the socket level it will have more data to transmit.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,489

    Do you have even the slightest evidence that this is a performance problem in any way?

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • MBond2MBond2 Member Posts: 140

    But the total work that has to be done by the CPU will be about the same? If you pass down a list, someone has to loop over it. Is that loop going to consume fewer CPU cycles if you do it further down the stack - not tangibly. The only difference in cost is function call overhead - which is orders of magnitude faster than network send performance.

    Recv is different because of the allocation problem. When sending, you obviously have the data that you will send, and necessarily have storage for that data. You are also in control of how quickly that can be done because it can’t go any faster than you can generate it. But with recv, data can come for which you have no storage and at a rate that is faster than you can process. Techniques exists for handling this

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!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA