index == npkt->req_complete - npkt->num_complete -- Assertio

Hi Folks,

I’m getting a strange error message with a driver I’m working on.
Happens during debug mode, and is probably the cause of why my system fails.

Any ideas on what could have caused it? It might be related to the fact
that I’m upward packets back down the stack (after resetting the npkt->
flags etc).

One strange thing, however is that it only happens under load.

Any suggestions would be greatly appreciated

Dave

Dave Edwards <Dave.edwards@abicom-international.com> wrote:

Hi Folks,

I’m getting a strange error message with a driver I’m working on.
Happens during debug mode, and is probably the cause of why my system fails.

Any ideas on what could have caused it? It might be related to the fact
that I’m upward packets back down the stack (after resetting the npkt-
flags etc).

You’re doing what exactly?

One strange thing, however is that it only happens under load.

Any suggestions would be greatly appreciated

Dave

He probably means that he is sending down an upward headed packet by
modifying the npkt->up flag.That gave me lot of trouble( i was doing that
too ) because i think the io-net stores some information in memory locations
next to packet when it is upward directed.By changing the flags that
information is lost…(Don’t murder me if i am wrong…I think that is what i
read in some of the discussions).If you don’t want to copy the whole packet,
then create a new npkt shell(downward headed ofcourse) and put the iov into
it.

Sreekanth

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:b7hll0$3ai$1@nntp.qnx.com

Dave Edwards <> Dave.edwards@abicom-international.com> > wrote:
Hi Folks,

I’m getting a strange error message with a driver I’m working on.
Happens during debug mode, and is probably the cause of why my system
fails.

Any ideas on what could have caused it? It might be related to the fact
that I’m upward packets back down the stack (after resetting the npkt-
flags etc).

You’re doing what exactly?

One strange thing, however is that it only happens under load.

Any suggestions would be greatly appreciated

Dave

Hi Folks,

I’m working on a “bridge” product that receives packets on one interface
and may then pass them out on another. Since this has to run at high
data rates, on a fairly slow processor I need to reduce the amount of
time spent copying.

This redirection code is new, once it receives a frame and determines
that it has to be transmitted out on the other port, I’ve been modifying
the the up/down flag and resetting the ref_cnt and req_complete entries
in the packet.

Once this is done, I do an add TX Done, then send it down the stack.

Once completed, I trap the redirected packets, reset the flags and let
io-net do it’s funky thing.

Is it a) valid to do this? or b)would it be easier to attach the iov to
another npkt?

Thanks for the help

Dave


Sreekanth wrote:

He probably means that he is sending down an upward headed packet by
modifying the npkt->up flag.That gave me lot of trouble( i was doing that
too ) because i think the io-net stores some information in memory locations
next to packet when it is upward directed.By changing the flags that
information is lost…(Don’t murder me if i am wrong…I think that is what i
read in some of the discussions).If you don’t want to copy the whole packet,
then create a new npkt shell(downward headed ofcourse) and put the iov into
it.

Sreekanth

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:b7hll0$3ai$> 1@nntp.qnx.com> …

Dave Edwards <> Dave.edwards@abicom-international.com> > wrote:

Hi Folks,

I’m getting a strange error message with a driver I’m working on.
Happens during debug mode, and is probably the cause of why my system

fails.

Any ideas on what could have caused it? It might be related to the fact
that I’m upward packets back down the stack (after resetting the npkt-
flags etc).

You’re doing what exactly?


One strange thing, however is that it only happens under load.

Any suggestions would be greatly appreciated

Dave

Problem Solved!

One of my other network drivers was wrapping around and re-using the
packet before io-net had released it! Hence the error message about
inconsistent references.

On a related issue, it appears that all that is necessary to move the
packet from up to down, is to change the direction flag and add a TX
done. Once completed, I change the flag back and return EOK.

Seems to be working


Dave


Dave Edwards wrote:

Hi Folks,

I’m working on a “bridge” product that receives packets on one interface
and may then pass them out on another. Since this has to run at high
data rates, on a fairly slow processor I need to reduce the amount of
time spent copying.

This redirection code is new, once it receives a frame and determines
that it has to be transmitted out on the other port, I’ve been modifying
the the up/down flag and resetting the ref_cnt and req_complete entries
in the packet.

Once this is done, I do an add TX Done, then send it down the stack.

Once completed, I trap the redirected packets, reset the flags and let
io-net do it’s funky thing.

Is it a) valid to do this? or b)would it be easier to attach the iov to
another npkt?

Thanks for the help

Dave


Sreekanth wrote:

He probably means that he is sending down an upward headed packet by
modifying the npkt->up flag.That gave me lot of trouble( i was doing that
too ) because i think the io-net stores some information in memory
locations
next to packet when it is upward directed.By changing the flags that
information is lost…(Don’t murder me if i am wrong…I think that is
what i
read in some of the discussions).If you don’t want to copy the whole
packet,
then create a new npkt shell(downward headed ofcourse) and put the
iov into
it.

Sreekanth

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:b7hll0$3ai$> 1@nntp.qnx.com> …

Dave Edwards <> Dave.edwards@abicom-international.com> > wrote:

Hi Folks,


I’m getting a strange error message with a driver I’m working on.
Happens during debug mode, and is probably the cause of why my system


fails.

Any ideas on what could have caused it? It might be related to the fact
that I’m upward packets back down the stack (after resetting the npkt-
flags etc).


You’re doing what exactly?


One strange thing, however is that it only happens under load.


Any suggestions would be greatly appreciated


Dave

\