Question regarding NBs/NBLs

Hello Gurus,

Is there a way to tell the OS to limit number of NBs per NBLs in send path?

Regards,
Chakri
P.S.: This questionis purely for academic purposes.

No. Why?

Calvin

On Thu, May 31, 2012 at 2:58 PM, Driver Learner > wrote:

> Hello Gurus,
>
> Is there a way to tell the OS to limit number of NBs per NBLs in send path?
>
> Regards,
> Chakri
> P.S.: This questionis purely for academic purposes.
> — 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

Thanks for the response Calvin.

Any hardware has limited number of descriptors for the data path rings. The
idea behind this question is, if somehow, we could let OS know of this
limitation and the OS will limit the maximum number of the NBs in an NBL to
this known number, one of the options I could consider is, wait out till I
get all the descriptors required before attempting sending nbl.

How much this would buy me in terms of processing or throughput - that is a
different story, but it will give me opportunity to shrink my logic.

Hope that clarifies.

Regards,
Chakri

On Thu, May 31, 2012 at 4:09 PM, Calvin Guan (news) <
xxxxx@gradovec.com> wrote:

No. Why?

Calvin

On Thu, May 31, 2012 at 2:58 PM, Driver Learner <
xxxxx@gmail.com> wrote:

> Hello Gurus,
>
> Is there a way to tell the OS to limit number of NBs per NBLs in send
> path?
>
> Regards,
> Chakri
> P.S.: This questionis purely for academic purposes.
> — 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

— 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

Hi Chakri,

The standard way to handle it is having the miniport driver maintain is
list of pending tx NBLs when there is no resource to accommodate the send
requests. In your send complete DPC, you are the first in the system know
that send resources (i.e. transmit descriptors are replenished hence became
available) so that you can pick up from what is left in the earliest
possible. This is usually more efficient than backing off at upper layer.

On a historical note, serialized miniport does allow you to fail the
NDIS_PACKET with NDIS_STATUS_RESOURCES. NDIS will in turn push the packet
into wait queue and post it back to you later. Serialize miniport model has
died since perhaps NDIS5? I tend to forget things that I don’t like:) But
you can’t have a serialized miniport that uses NBL for sure.

Calvin

On Fri, Jun 1, 2012 at 12:16 AM, Driver Learner > wrote:

> Thanks for the response Calvin.
>
> Any hardware has limited number of descriptors for the data path rings.
> The idea behind this question is, if somehow, we could let OS know of this
> limitation and the OS will limit the maximum number of the NBs in an NBL to
> this known number, one of the options I could consider is, wait out till I
> get all the descriptors required before attempting sending nbl.
>
> How much this would buy me in terms of processing or throughput - that is
> a different story, but it will give me opportunity to shrink my logic.
>
> Hope that clarifies.
>
> Regards,
> Chakri
>
>
>
> On Thu, May 31, 2012 at 4:09 PM, Calvin Guan (news) <
> xxxxx@gradovec.com> wrote:
>
>> No. Why?
>>
>> Calvin
>>
>> On Thu, May 31, 2012 at 2:58 PM, Driver Learner <
>> xxxxx@gmail.com> wrote:
>>
>>> Hello Gurus,
>>>
>>> Is there a way to tell the OS to limit number of NBs per NBLs in send
>>> path?
>>>
>>> Regards,
>>> Chakri
>>> P.S.: This questionis purely for academic purposes.
>>> — 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
>>
>>
>> — 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
>
>
> — 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
>

Thanks Calvin.

That definitely saved some of the experimentation effort :slight_smile:

Regards,
Chakri

On Fri, Jun 1, 2012 at 11:06 AM, Calvin Guan (news) <
xxxxx@gradovec.com> wrote:

Hi Chakri,

The standard way to handle it is having the miniport driver maintain is
list of pending tx NBLs when there is no resource to accommodate the send
requests. In your send complete DPC, you are the first in the system know
that send resources (i.e. transmit descriptors are replenished hence became
available) so that you can pick up from what is left in the earliest
possible. This is usually more efficient than backing off at upper layer.

On a historical note, serialized miniport does allow you to fail the
NDIS_PACKET with NDIS_STATUS_RESOURCES. NDIS will in turn push the packet
into wait queue and post it back to you later. Serialize miniport model has
died since perhaps NDIS5? I tend to forget things that I don’t like:) But
you can’t have a serialized miniport that uses NBL for sure.

Calvin

On Fri, Jun 1, 2012 at 12:16 AM, Driver Learner <
xxxxx@gmail.com> wrote:

> Thanks for the response Calvin.
>
> Any hardware has limited number of descriptors for the data path rings.
> The idea behind this question is, if somehow, we could let OS know of this
> limitation and the OS will limit the maximum number of the NBs in an NBL to
> this known number, one of the options I could consider is, wait out till I
> get all the descriptors required before attempting sending nbl.
>
> How much this would buy me in terms of processing or throughput - that is
> a different story, but it will give me opportunity to shrink my logic.
>
> Hope that clarifies.
>
> Regards,
> Chakri
>
>
>
> On Thu, May 31, 2012 at 4:09 PM, Calvin Guan (news) <
> xxxxx@gradovec.com> wrote:
>
>> No. Why?
>>
>> Calvin
>>
>> On Thu, May 31, 2012 at 2:58 PM, Driver Learner <
>> xxxxx@gmail.com> wrote:
>>
>>> Hello Gurus,
>>>
>>> Is there a way to tell the OS to limit number of NBs per NBLs in send
>>> path?
>>>
>>> Regards,
>>> Chakri
>>> P.S.: This questionis purely for academic purposes.
>>> — 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
>>
>>
>> — 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
>
>
> — 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
>

— 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