_NPKT_NO_RES

Please tell me the exact meaning of _NPKT_NO_RES…

Yoshiaki Funaki <yfunaki@jp.ibm.com> wrote:

Please tell me the exact meaning of _NPKT_NO_RES…

It is saying the “up producer”, usually the driver,
want the npkt back “right away”.

This is usually happened the driver have it’s own
dma memory and have npkt build up in there. Thus,
the driver don’t want the memory be locked until
all upper layer done with the npkt.

What happened, is, when the driver call “tx_up()”,
io-net will check this flag, before the npkt handed
to next module, io-net will copy the npkt, “tx_done()”
the orignal npkt, and “tx_up()” the copied npkt.

-xtang

Tang-san,

Thank you very much. I understand very well !

Y.Funaki

NICE EXPLANATION :slight_smile:
ya i mean it.

“Yoshiaki Funaki” <yfunaki@jp.ibm.com> wrote in message
news:9js009$bri$1@nntp.qnx.com

Tang-san,

Thank you very much. I understand very well !

Y.Funaki

Does the io-net “tx_up()” really call “tx_done()” with the original
npkt? In my tests it appears that the io-net “tx_up()” just returns 0,
and leaves it up to the driver to call the io-net “tx_done().” If, on
the other hand, you use the io-net “tx_up_start()” instead of “tx_up()”,
then “tx_done()” will be called before “tx_up_start()” returns —
because “tx_up_start()” will see “tx_up()” return 0. Or am I even more
confused than usual?

The documentation is a bit confusing: it says “_NPKT_NO_RES – the up
producer that originated the packet wants its buffer back right away. If
the up producer that originates the packet sets this flag, the up
producer’s tx_done() function is guaranteed to be called by the time
io-net’s tx_done() has returned. The implication is that the up producer
can reuse the buffer right away.” The second reference to tx_done(),
the part that says “by the time io-net’s tx_done() has returned”, looks
like it should be either tx_up() or tx_up_start().

Murf

Xiaodan Tang wrote:

Yoshiaki Funaki <> yfunaki@jp.ibm.com> > wrote:
Please tell me the exact meaning of _NPKT_NO_RES…

It is saying the “up producer”, usually the driver,
want the npkt back “right away”.

This is usually happened the driver have it’s own
dma memory and have npkt build up in there. Thus,
the driver don’t want the memory be locked until
all upper layer done with the npkt.

What happened, is, when the driver call “tx_up()”,
io-net will check this flag, before the npkt handed
to next module, io-net will copy the npkt, “tx_done()”
the orignal npkt, and “tx_up()” the copied npkt.

-xtang