ref_cnt

Hi
Can somebody explain how the npkt->ref_cnt is used? Although the
documentation says that the npkt->ref_cnt should not be modified i see l
code where the ref_cnt is incremented(for e.g., ipfilter).

Sreekanth

The ref_cnt is the number of layers above the originator that are looking
at the up headed packet. On up headed packets, the originator’s tx_done()
func is not called until the ref_cnt reaches 0.

-seanb

Sreekanth <sreekanth@cambira.com> wrote:
: Hi
: Can somebody explain how the npkt->ref_cnt is used? Although the
: documentation says that the npkt->ref_cnt should not be modified i see l
: code where the ref_cnt is incremented(for e.g., ipfilter).

: Sreekanth

Does that mean that If i am doing a reg_tx_done in my module(It is a filter
below ip) i should increment the ref_cnt ?I seem to have this problem that
when there is only IP(npm-tcpip.so) is loaded my module works fine but if i
load QNET(npm-qnet.so) The io-net crashes in the receive complete routine of
the nic.Any thoughts?


Thanks
Sreekanth

“Sean Boudreau” <seanb@qnx.com> wrote in message
news:a1up9u$sao$1@nntp.qnx.com

The ref_cnt is the number of layers above the originator that are looking
at the up headed packet. On up headed packets, the originator’s tx_done()
func is not called until the ref_cnt reaches 0.

-seanb

Sreekanth <> sreekanth@cambira.com> > wrote:
: Hi
: Can somebody explain how the npkt->ref_cnt is used? Although the
: documentation says that the npkt->ref_cnt should not be modified i see l
: code where the ref_cnt is incremented(for e.g., ipfilter).

: Sreekanth

No. You generally only do a reg_tx_done() if you modify down headed
packets or originate up headed packets. io-net handles the ref_cnt
on up headed packets.

-seanb

Sreekanth <sreekanth@cambira.com> wrote:
: Does that mean that If i am doing a reg_tx_done in my module(It is a filter
: below ip) i should increment the ref_cnt ?I seem to have this problem that
: when there is only IP(npm-tcpip.so) is loaded my module works fine but if i
: load QNET(npm-qnet.so) The io-net crashes in the receive complete routine of
: the nic.Any thoughts?


: Thanks
: Sreekanth

: “Sean Boudreau” <seanb@qnx.com> wrote in message
: news:a1up9u$sao$1@nntp.qnx.com
:>
:> The ref_cnt is the number of layers above the originator that are looking
:> at the up headed packet. On up headed packets, the originator’s tx_done()
:> func is not called until the ref_cnt reaches 0.
:>
:> -seanb
:>
:> Sreekanth <sreekanth@cambira.com> wrote:
:> : Hi
:> : Can somebody explain how the npkt->ref_cnt is used? Although the
:> : documentation says that the npkt->ref_cnt should not be modified i see l
:> : code where the ref_cnt is incremented(for e.g., ipfilter).
:>
:> : Sreekanth
:>
:>