[Click] [click] userlevel multi-threads

Beyers Cronje bcronje at gmail.com
Wed Aug 14 07:23:56 EDT 2013


You need to use either StaticThreadSched or BalancedThreadSched  to
schedule tasks on different threads.

http://read.cs.ucla.edu/click/elements/staticthreadsched
http://read.cs.ucla.edu/click/elements/balancedthreadsched

An example of how to use StaticThreadSched would be:

fd0::FromDevice(eth0) -> Discard;
fd1::FromDevice(eth1) -> Discard;
StaticThreadSched(fd0 0, fd1 1);

Beyers


On Wed, Aug 14, 2013 at 5:23 AM, jinho hwang <hwang.jinho at gmail.com> wrote:

> Hi All,
>
> I am new to click. I want to use multi-threading in userlevel. I enabled
> and put -j 2 in command line, and am using test.click. However, thread_id=0
> always calls run_task and processes the packets, but thread_id=1 appears in
> RouterThread, but then is not called at all from run_task in
> infinitesource. thread_id=1 even disappeared after calling twice. This is
> consistent. I could not figure out why thread_id=1 disappeared. There is no
> signal delivered to the thread (checked), it seems naturally gone.
>
> Can anybody help?
>
> Thank you,
>
> Jinho
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list