ethernet buffers in local memory (PowerPC)

We would like to offload 60x bus and to use local memory for ethernet
buffers. Accordingly Motorola it should increase throuput since CPM is truly
a co-processor and CPM-to-local-memory and CPU-SDRAM operations could be
done in parallel. I am thinking to mmap() local memory and to allocate
npkt_buffers there. I wonder if io-net would be unhappy with that.

Thanks,
-Dmitri

io-net doesn’t really care as long as you do the right thing
(whatever it may be) when the packet is returned to you.

-seanb

Dmitri Poustovalov <pdmitri@sympatico.ca> wrote:

We would like to offload 60x bus and to use local memory for ethernet
buffers. Accordingly Motorola it should increase throuput since CPM is truly
a co-processor and CPM-to-local-memory and CPU-SDRAM operations could be
done in parallel. I am thinking to mmap() local memory and to allocate
npkt_buffers there. I wonder if io-net would be unhappy with that.

Thanks,
-Dmitri

I thought the io-net itself uses mempool to allocate the npkts and
buffers.Am i wrong?

Sreekanth

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

io-net doesn’t really care as long as you do the right thing
(whatever it may be) when the packet is returned to you.

-seanb

Dmitri Poustovalov <> pdmitri@sympatico.ca> > wrote:
We would like to offload 60x bus and to use local memory for ethernet
buffers. Accordingly Motorola it should increase throuput since CPM is
truly
a co-processor and CPM-to-local-memory and CPU-SDRAM operations could be
done in parallel. I am thinking to mmap() local memory and to allocate
npkt_buffers there. I wonder if io-net would be unhappy with that.

Thanks,
-Dmitri

Sreekanth <nospam@nospam.com> wrote in message
news:b8p670$isl$1@inn.qnx.com

I thought the io-net itself uses mempool to allocate the npkts and
buffers.Am i wrong?

io-net maintain it’s own memory pool. A module could either allocate memory
from there (use npi->alloc()/alloc_up_pkt()/alloc_down_pkt()), and then
return it back (use npi->free()).

A module can also malloc()/mmap() it’s own memory, and when the packet
return to you rx_done(), instead of npm->free(), just free()/munmap() or
recycle them. Problem is, you have to figure out how to build an “up
packet”.

The most usual way, is call npi->alloc_up_packet() to get a npkt, setup
the net_bufs, but have it’s iov point to your private mmap()'d memory.
The packet will then return to your rx_done() function, where you can
release you private mmap()'d memory, and npi->free() the packet.

Only thing to remind is, if you private memory is limited, and upper
layer hold you packets “too long”, you might run into the satuation
that run out of private memroy.

-xtang

Sreekanth

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

io-net doesn’t really care as long as you do the right thing
(whatever it may be) when the packet is returned to you.

-seanb

Dmitri Poustovalov <> pdmitri@sympatico.ca> > wrote:
We would like to offload 60x bus and to use local memory for ethernet
buffers. Accordingly Motorola it should increase throuput since CPM is
truly
a co-processor and CPM-to-local-memory and CPU-SDRAM operations could
be
done in parallel. I am thinking to mmap() local memory and to allocate
npkt_buffers there. I wonder if io-net would be unhappy with that.

Thanks,
-Dmitri
\