Fw: Re: NdisMAllocateSharedMemory

>

Okay good points,

Look for inline comments

----- Original Message -----
From: Roman Geller
To: NT Developers Interest List
Sent: Wednesday, June 13, 2001 12:18 AM
Subject: [ntdev] Re: NdisMAllocateSharedMemory

Ramit,

You require one map register for each buffer in a packet, and you must not
reuse map registers without returning them, that is to say once you do a
NdisMStartBufferPhysicalMapping you should not reuse the map register
before
calling NdisMCompleteBufferPhysicalMapping, which comes with the packet
Tx.
complete interrupt.
Why do you refer only to Tx side? Why don’t we need map registers for Rx
side?

* On the revceive side we allocate shared memory and hence we get the
fragments/physical addresses immediately and we don’t require map register
to track the buffers since we are passing the buffers to the upper layers
and so we have control over the buffer.
We don’t let the card use the buffers till the upper layers are done with
it, so it eliminates the use of map register on the Rx Side.

One last word of caution, map registers are a very painful thing, if you
lose them or resuse them improperly then you have many panics, I have
faced
innumerable problems with them at veyr high speeds of Tx. Try to use them
scarcely and keep a very good tab on them.
Best still would be to go over to deserial drivers, as I think Microsoft
is
pushing for them from XP onwards, it has no concept of map registers.

Isn’t the DDK’ s E100Bex example deserialized driver? Even being deserial
driver E100Bex still uses map registers on its Tx side. Could you explain
that?

* Yes you can use map register for deserial drivers, like I am for my
NDIS 4 deserial driver where I don’t have a choice, but it’s better no to
use map register is you can , beacuse :

  1. The limit the number of packets you can send, since u neeed 1 map
    register for every buffer and with multiple sends, I have seen ndis give
    upto 120 packets in an array, using jumbo frames, that is 9K packets, so
    you
    can imagine how many map register would be required, and also you to keep
    track of them.
  2. They are a scarce resouce, and also thers is an overhead involved in it,
    where as in scatter gather DMA you have the information required ready in
    the OOB data area and no hassles with keeping track of them.

Still, like I said you can use map registers, but it’s more like saying why
should I make an NDIS 5 driver when I have a NDIS 4 driver

:slight_smile:

thx
RG

:slight_smile:

Ramit.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Ramit,

So if I understood you correctly:

  1. there is no other way for winNT4/2000 but only to use map registers with
    deserialized driver;
  2. Microsoft is introducing a new concept in XP which eliminates
    requirements to use map registers
    for deserial driver;

Is it correct?

thx
RG

-----Original Message-----
From: Ramit Bhalla [mailto:xxxxx@wipro.com]
Sent: Wednesday, June 13, 2001 11:04 AM
To: NT Developers Interest List
Subject: [ntdev] Fw: Re: NdisMAllocateSharedMemory

Okay good points,

Look for inline comments

----- Original Message -----
From: Roman Geller
To: NT Developers Interest List
Sent: Wednesday, June 13, 2001 12:18 AM
Subject: [ntdev] Re: NdisMAllocateSharedMemory

Ramit,

You require one map register for each buffer in a packet, and you must not
reuse map registers without returning them, that is to say once you do a
NdisMStartBufferPhysicalMapping you should not reuse the map register
before
calling NdisMCompleteBufferPhysicalMapping, which comes with the packet
Tx.
complete interrupt.
Why do you refer only to Tx side? Why don’t we need map registers for Rx
side?

* On the revceive side we allocate shared memory and hence we get the
fragments/physical addresses immediately and we don’t require map register
to track the buffers since we are passing the buffers to the upper layers
and so we have control over the buffer.
We don’t let the card use the buffers till the upper layers are done with
it, so it eliminates the use of map register on the Rx Side.

One last word of caution, map registers are a very painful thing, if you
lose them or resuse them improperly then you have many panics, I have
faced
innumerable problems with them at veyr high speeds of Tx. Try to use them
scarcely and keep a very good tab on them.
Best still would be to go over to deserial drivers, as I think Microsoft
is
pushing for them from XP onwards, it has no concept of map registers.

Isn’t the DDK’ s E100Bex example deserialized driver? Even being deserial
driver E100Bex still uses map registers on its Tx side. Could you explain
that?

* Yes you can use map register for deserial drivers, like I am for my
NDIS 4 deserial driver where I don’t have a choice, but it’s better no to
use map register is you can , beacuse :

  1. The limit the number of packets you can send, since u neeed 1 map
    register for every buffer and with multiple sends, I have seen ndis give
    upto 120 packets in an array, using jumbo frames, that is 9K packets, so
    you
    can imagine how many map register would be required, and also you to keep
    track of them.
  2. They are a scarce resouce, and also thers is an overhead involved in it,
    where as in scatter gather DMA you have the information required ready in
    the OOB data area and no hassles with keeping track of them.

Still, like I said you can use map registers, but it’s more like saying why
should I make an NDIS 5 driver when I have a NDIS 4 driver

:slight_smile:

thx
RG

:slight_smile:

Ramit.


You are currently subscribed to ntdev as: xxxxx@envara.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For NDIS 4 there is no other way except to use map register, but for NDIS 5
and NDIS 5.1 you can use scatter gather DMA instead of map registers.
For XP I think it’s mandatory to use scatter gather for deserial driver and
I also think they will stop supporting serial driver all togehter soon.

Ramit.

----- Original Message -----
From: “Roman Geller”
To: “NT Developers Interest List”
Sent: Wednesday, June 13, 2001 4:23 PM
Subject: [ntdev] RE: Fw: Re: NdisMAllocateSharedMemory

> Ramit,
>
> So if I understood you correctly:
> 1. there is no other way for winNT4/2000 but only to use map registers
with
> deserialized driver;
> 2. Microsoft is introducing a new concept in XP which eliminates
> requirements to use map registers
> for deserial driver;
>
> Is it correct?
>
> thx
> RG
>
> -----Original Message-----
> From: Ramit Bhalla [mailto:xxxxx@wipro.com]
> Sent: Wednesday, June 13, 2001 11:04 AM
> To: NT Developers Interest List
> Subject: [ntdev] Fw: Re: NdisMAllocateSharedMemory
>
>
> >
> > Okay good points,
> >
> > Look for inline comments
> >
> >
> > ----- Original Message -----
> > From: Roman Geller
> > To: NT Developers Interest List
> > Sent: Wednesday, June 13, 2001 12:18 AM
> > Subject: [ntdev] Re: NdisMAllocateSharedMemory
> >
> >
> >
> > Ramit,
> >
> > You require one map register for each buffer in a packet, and you must
not
> > reuse map registers without returning them, that is to say once you do a
> > NdisMStartBufferPhysicalMapping you should not reuse the map register
> before
> > calling NdisMCompleteBufferPhysicalMapping, which comes with the packet
> Tx.
> > complete interrupt.
> > Why do you refer only to Tx side? Why don’t we need map registers for Rx
> > side?
> >
> * On the revceive side we allocate shared memory and hence we get the
> fragments/physical addresses immediately and we don’t require map
register
> to track the buffers since we are passing the buffers to the upper layers
> and so we have control over the buffer.
> We don’t let the card use the buffers till the upper layers are done with
> it, so it eliminates the use of map register on the Rx Side.
>
>
> >
> >
> >
> >
> >
> >
> >
> > One last word of caution, map registers are a very painful thing, if you
> > lose them or resuse them improperly then you have many panics, I have
> faced
> > innumerable problems with them at veyr high speeds of Tx. Try to use
them
> > scarcely and keep a very good tab on them.
> > Best still would be to go over to deserial drivers, as I think Microsoft
> is
> > pushing for them from XP onwards, it has no concept of map registers.
> >
> > Isn’t the DDK’ s E100Bex example deserialized driver? Even being
deserial
> > driver E100Bex still uses map registers on its Tx side. Could you
explain
> > that?
> >
> >
> * Yes you can use map register for deserial drivers, like I am for my
> NDIS 4 deserial driver where I don’t have a choice, but it’s better no to
> use map register is you can , beacuse :
> 1. The limit the number of packets you can send, since u neeed 1 map
> register for every buffer and with multiple sends, I have seen ndis give
> upto 120 packets in an array, using jumbo frames, that is 9K packets, so
> you
> can imagine how many map register would be required, and also you to keep
> track of them.
> 2. They are a scarce resouce, and also thers is an overhead involved in
it,
> where as in scatter gather DMA you have the information required ready in
> the OOB data area and no hassles with keeping track of them.
>
> Still, like I said you can use map registers, but it’s more like saying
why
> should I make an NDIS 5 driver when I have a NDIS 4 driver
>
> :slight_smile:
>
>
> >
> >
> >
> >
> > thx
> > RG
> > —
>
> :slight_smile:
>
>
> Ramit.
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@envara.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@wipro.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Win2K NDIS5.0 supports scatter-gather DMA only for deserialized
miniports.

Windows XP NDIS 5.1 supports scatter-gather DMA for both serialized and
deserialized miniports.

-Eliyas

-----Original Message-----
From: Roman Geller [mailto:xxxxx@envara.com]
Sent: Wednesday, June 13, 2001 3:54 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Fw: Re: NdisMAllocateSharedMemory

Ramit,

So if I understood you correctly:

  1. there is no other way for winNT4/2000 but only to use map registers
    with
    deserialized driver;
  2. Microsoft is introducing a new concept in XP which eliminates
    requirements to use map registers
    for deserial driver;

Is it correct?

thx
RG

-----Original Message-----
From: Ramit Bhalla [mailto:xxxxx@wipro.com]
Sent: Wednesday, June 13, 2001 11:04 AM
To: NT Developers Interest List
Subject: [ntdev] Fw: Re: NdisMAllocateSharedMemory

Okay good points,

Look for inline comments

----- Original Message -----
From: Roman Geller
To: NT Developers Interest List
Sent: Wednesday, June 13, 2001 12:18 AM
Subject: [ntdev] Re: NdisMAllocateSharedMemory

Ramit,

You require one map register for each buffer in a packet, and you must
not
reuse map registers without returning them, that is to say once you do
a
NdisMStartBufferPhysicalMapping you should not reuse the map register
before
calling NdisMCompleteBufferPhysicalMapping, which comes with the
packet
Tx.
complete interrupt.
Why do you refer only to Tx side? Why don’t we need map registers for
Rx
side?

* On the revceive side we allocate shared memory and hence we get
the
fragments/physical addresses immediately and we don’t require map
register
to track the buffers since we are passing the buffers to the upper
layers
and so we have control over the buffer.
We don’t let the card use the buffers till the upper layers are done
with
it, so it eliminates the use of map register on the Rx Side.

One last word of caution, map registers are a very painful thing, if
you
lose them or resuse them improperly then you have many panics, I have
faced
innumerable problems with them at veyr high speeds of Tx. Try to use
them
scarcely and keep a very good tab on them.
Best still would be to go over to deserial drivers, as I think
Microsoft
is
pushing for them from XP onwards, it has no concept of map registers.

Isn’t the DDK’ s E100Bex example deserialized driver? Even being
deserial
driver E100Bex still uses map registers on its Tx side. Could you
explain
that?

* Yes you can use map register for deserial drivers, like I am for
my
NDIS 4 deserial driver where I don’t have a choice, but it’s better no
to
use map register is you can , beacuse :

  1. The limit the number of packets you can send, since u neeed 1 map
    register for every buffer and with multiple sends, I have seen ndis
    give
    upto 120 packets in an array, using jumbo frames, that is 9K packets,
    so
    you
    can imagine how many map register would be required, and also you to
    keep
    track of them.
  2. They are a scarce resouce, and also thers is an overhead involved in
    it,
    where as in scatter gather DMA you have the information required ready
    in
    the OOB data area and no hassles with keeping track of them.

Still, like I said you can use map registers, but it’s more like saying
why
should I make an NDIS 5 driver when I have a NDIS 4 driver

:slight_smile:

thx
RG

:slight_smile:

Ramit.


You are currently subscribed to ntdev as: xxxxx@envara.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com