Sean Boudreau(deleted)
|
Re: Sending down packets from separate thread
|
Sean Boudreau(deleted)
09/12/2008 10:11 AM
post13333
|
Re: Sending down packets from separate thread
On Fri, Sep 12, 2008 at 09:27:54AM -0400, Peter Engstrom wrote:
> Hi,
>
> in io-net it was possible to register a filter/module which would
> create a thread that could receive packets via ipc and then
> send these down to the driver. The thread would receive the packet,
> allocate an npkt, copy the data into it, register to have the npkt
> freed using reg_tx_done and then call tx_down which would send the
> packet down to the driver.
>
> In io-pkt I wonder if this is feasible? We want to use ipc and not
> socket. Sending packets down in io-pkt seems to be limited to work
> threads only and it looks like there is no way of allocating mbufs for
> non-work threads.
>
> Registering a callout which would run in work-thread context and
> thus would be able to allocate mbufs, unfortunately can only be
> triggered every 8.39 ms and so it is too slow for our needs.
>
> Thankful for any help or ideas,
> Peter Engstrom
> Prisma Engineering
>
You can create a work thread with nw_pthread_create() that
can allocate mbufs. You can do this as part of an lsm
entry point. However, bpf / libpcap might also do what you
want (sending raw packets).
-seanb
|
|
|