颜玮 | 1 Dec 2011 10:24
Picon

a problem about FromDevice

Hi,
    I have suffered from a problem when running Click configuration in 
the following simple topology:

    vedio server  ->  (ethi) host (ethj)  ->  client

    I use Click on host, with the following configuration:

   FromDevice(ethi) -> RED(...) -> Queue(20) -> ToDevice(ethj) ;

   device name "ethi" and "ethj" is the corresponding Ethernet port 
connected to server and client. When running this "*.click" file with 
"click-install" command in kernel mode, packets can not pass through 
host at all, while they can do this without click's installation
  so, what may the problem be?Or how can I write the configuration file 
if trying to process packets on some midway nodes on its end-to end way?
I guess there must be wrong usage of FromDevice or Todevice elements in 
my configuration, so if not, which other relevant elements should I use 
to achieve my requirement? Looking forward to your answer, thanks a lot!

----
yan
Beyers Cronje | 1 Dec 2011 13:16
Picon
Gravatar

Re: a problem about FromDevice

Hi,

Try setting FromDevice in promiscious mode: FromDevice(ethi, PROMISC true)

Beyers

On Thu, Dec 1, 2011 at 11:24 AM, 颜玮 <yanwei <at> bupt.edu.cn> wrote:

> Hi,
>    I have suffered from a problem when running Click configuration in
> the following simple topology:
>
>    vedio server  ->  (ethi) host (ethj)  ->  client
>
>    I use Click on host, with the following configuration:
>
>   FromDevice(ethi) -> RED(...) -> Queue(20) -> ToDevice(ethj) ;
>
>   device name "ethi" and "ethj" is the corresponding Ethernet port
> connected to server and client. When running this "*.click" file with
> "click-install" command in kernel mode, packets can not pass through
> host at all, while they can do this without click's installation
>  so, what may the problem be?Or how can I write the configuration file
> if trying to process packets on some midway nodes on its end-to end way?
> I guess there must be wrong usage of FromDevice or Todevice elements in
> my configuration, so if not, which other relevant elements should I use
> to achieve my requirement? Looking forward to your answer, thanks a lot!
>
> ----
> yan
(Continue reading)

颜玮 | 1 Dec 2011 13:54
Picon

Re: a problem about FromDevice

Thanks,Beyers,I tried that ,but it does not work.
It seems that packets can not pass through the router when using FromDevice and ToDevice as input and output
port,especially,when configuring like this on host:
FromDevice(ethi) -> t1 :: Tee(2) -> SetIPDSCP(18) -> IPPrint(TOS true) -> ToDevice(ethj);
t1[1] -> ToHost;
I try to ping from server to client with normal ICMP packets, then tcpdump on client has a result with dscp
value 0, while "dmesg" display dscp value 18 on host.
I want to send out packets with dscp value 18 after host.
So,how to deal with packets on host with click rather than linux  TCP/IP stack, while not suffering from the
packets blocking problem I mentioned at the beginning.
Thanks all!

于 2011/12/1 20:16, Beyers Cronje 写道:
> Hi,
>
> Try setting FromDevice in promiscious mode: FromDevice(ethi, PROMISC true)
>
> Beyers
>
> On Thu, Dec 1, 2011 at 11:24 AM, 颜玮<yanwei <at> bupt.edu.cn>  wrote:
>
>> Hi,
>>     I have suffered from a problem when running Click configuration in
>> the following simple topology:
>>
>>     vedio server  ->   (ethi) host (ethj)  ->   client
>>
>>     I use Click on host, with the following configuration:
>>
>>    FromDevice(ethi) ->  RED(...) ->  Queue(20) ->  ToDevice(ethj) ;
(Continue reading)

Eddie Kohler | 1 Dec 2011 14:53
Picon
Gravatar

Re: add routing enteries from an external file to Click configuration file

Hi Ahmed, Sandeep,

Another way is to use Script elements.  For example, create a file
like this; say it is in /tmp/myroutes

add 1.0.0.0/8 1.0.0.1 0
add 2.0.0.0/8 2.0.0.1 1
...

Then, in your configuration:

.... -> my_routing_table :: RadixIPLookup -> ....
Script(write my_routing_table.ctrl $(cat /tmp/myroutes))

Eddie

On Mon, Nov 28, 2011 at 2:43 PM, sandeep <sandeep048 <at> gmail.com> wrote:
> Hi Ahmed,
>
> One way to do it is using
> RadixIPLookup's<http://read.cs.ucla.edu/click/elements/radixiplookup>
> add
> write handler.
>
> Write a program which reads your file and prints appropriate write
> statements.  Eg: write ril.add(ADDR/MASK [GW] OUT)
>
> Send this output to "netcat <host> <port>". This method is for userlevel
> click and works using
> ControlSocket<http://read.cs.ucla.edu/click/elements/controlsocket>
(Continue reading)

Eddie Kohler | 1 Dec 2011 14:54
Picon
Gravatar

Re: How to develop the element running in nsclick?

Hi Liang,

You want "ELEMENT_REQUIRES(ns)", or "ELEMENT_REQUIRES(userlevel|ns)".

Eddie

On Wed, Nov 30, 2011 at 8:36 AM, liang jiao <jiaoliang547 <at> gmail.com> wrote:
> Hi,all,
>        I am developing new elements that can run in nsclick. I know how to
> develop a new element in userlevel by add the declaration at the bottom of
>  xx.cc like* "ELEMENT_REQUIRES(userlevel)". When I replace "userlevel" with
> "nsclick" or "nslevel", new elements can't run in nsclick. Who can help me?*
> *Best wishes,*
> *Messi,*
>
> **
> _______________________________________________
> click mailing list
> click <at> amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click

_______________________________________________
click mailing list
click <at> amsterdam.lcs.mit.edu
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
Eddie Kohler | 1 Dec 2011 15:02
Picon
Gravatar

Re: click trunk bsdmodule on FreeBSD 10.0-CURRENT HEAD

Hey,

Can you send your bsdmodule/Makefile ? (Not the .in version.)

Eddie

On Fri, Nov 25, 2011 at 10:16 PM, Outback Dingo <outbackdingo <at> gmail.com> wrote:
> seems FreeBSD 10.0-CURRENT HEAD doesnt appear to like -ffreestanding
> uname -a
> 10.0-CURRENT FreeBSD 10.0-CURRENT
>
> bsddev# make
> echo "bsdmodule  app aqm ethernet icmp ip standard tcpudp threads" |
> /usr/home/dingo/click/bsdmodule/..//click-buildtool findelem -r
> bsdmodule -p /usr/home/dingo/click/bsdmodule/../ -X
> /usr/home/dingo/click/bsdmodule/..//elements.exclude > elements.conf
> /usr/home/dingo/click/bsdmodule/..//click-buildtool elem2make --bsd <
> elements.conf > elements.mk
> /usr/home/dingo/click/bsdmodule/..//click-buildtool elem2export <
> elements.conf > elements.cc
> awk -f  <at> /tools/vnode_if.awk  <at> /kern/vnode_if.src -p
> awk -f  <at> /tools/vnode_if.awk  <at> /kern/vnode_if.src -q
> awk -f  <at> /tools/vnode_if.awk  <at> /kern/vnode_if.src -h
> c++ -O2 -pipe -DCLICK_BSDMODULE -DHAVE_CONFIG_H -fno-strict-aliasing
> -Werror -D_KERNEL -DKLD_MODULE -nostdinc
> -I/usr/home/dingo/click/bsdmodule/..//include
> -I/usr/home/dingo/click/bsdmodule
> -I/usr/home/dingo/click/bsdmodule/../ -I. -I <at>  -I <at> /contrib/altq
> -finline-limit=8000 --param inline-unit-growth=100 --param
> large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer
(Continue reading)

Eddie Kohler | 1 Dec 2011 15:06
Picon
Gravatar

Re: a problem about FromDevice

Yanwei,

First of all it looks to me like you are assuming that all packets are
IP, which they aren't. They are most likely Ethernet. You probably
need to set up some ARP elements, etc.

Use Print elements to ensure that packets are arriving as you expect.

Eddie

On Thu, Dec 1, 2011 at 7:54 AM, 颜玮 <yanwei <at> bupt.edu.cn> wrote:
> Thanks,Beyers,I tried that ,but it does not work.
> It seems that packets can not pass through the router when using FromDevice and ToDevice as input and
output port,especially,when configuring like this on host:
> FromDevice(ethi) -> t1 :: Tee(2) -> SetIPDSCP(18) -> IPPrint(TOS true) -> ToDevice(ethj);
> t1[1] -> ToHost;
> I try to ping from server to client with normal ICMP packets, then tcpdump on client has a result with dscp
value 0, while "dmesg" display dscp value 18 on host.
> I want to send out packets with dscp value 18 after host.
> So,how to deal with packets on host with click rather than linux  TCP/IP stack, while not suffering from
the packets blocking problem I mentioned at the beginning.
> Thanks all!
>
> 于 2011/12/1 20:16, Beyers Cronje 写道:
>> Hi,
>>
>> Try setting FromDevice in promiscious mode: FromDevice(ethi, PROMISC true)
>>
>> Beyers
>>
(Continue reading)

Eddie Kohler | 1 Dec 2011 15:30
Picon
Gravatar

Re: cross compile the click

For what it's worth, --enable-fixincludes is the default in click-2.0.
But click-2.0.1 is better.

Eddie

On Fri, Nov 25, 2011 at 4:34 AM, Sascha Alexander Jopen
<jopen <at> informatik.uni-bonn.de> wrote:
> Hi,
>
> i'm not sure what the status of patchless click is in click-2.0. Maybe
> you have to enable it with --enable-fixincludes while configuring the
> sources. However, if you do not explicitly need kernel level support, i
> suggest compiling with --disable-linuxmodule and only use the userlevel
> driver. Debugging of your click configurations is much easier in
> userlevel and segmentation faults won't take down your machine, as click
> in kernel space.
>
> Regards,
> Sascha
>
> On 11/24/11 17:55, kele kele wrote:
>>    Hi,
>>        Thanks for telling me how to cross compile the click last days.
>>        Now, my target rmilinux kernel is 2.6.21.  click version is 2.0.
>>        You tell me use these flags:
>> CPPFLAGS="-I/path/to/include/
>>
>> CFLAGS="-I/path/to/include/dir -MD" \
>> CXXFLAGS="-I/path/to/include/dir -MD" \
>> LDFLAGS="-L/path/to/library/dir" \
(Continue reading)

Bingyang LIU | 2 Dec 2011 00:08
Picon

Click running on multi-core processor

Hi all,

I'm using click for performance evaluation of IPSec. But it seems that only
one core of the processor is used. I'm wondering how Click can fully use
the multi-core for computation to achieve high performance.

The detail of my experiment is as follows:

* Hardware: CPU Inter Xeon X3210 (quad core at 2.13Ghz), 4GB RAM. (a server
on deterlab)
* Software: Ubuntu8.04 + Click1.8, with PollDevice enabled.
* Configuration: ./configure --with-linux=/usr/src/linux-2.6.24.7
--enable-ipsec --enable-warp9 --enable-multithread=4 (I also tried 16, but
the outcome is similar with 4)
* mode: kernel

The outcome:
* The click router has the loss rate of about 0.5% when incoming packet
rate is only 200000 pps (packet size = 64B). If I remove the ipsec modules,
the loss rate is about 0.1%.
* I checked the CPU usage. Anyway, the click used only one cpu.
* If there is no input packet, the cpu usage is as follows, I guess
PollDevice consumes the cpu time:
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,
 0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,
 0.0%st
Cpu2  :  0.0%us, 48.0%sy,  0.0%ni, 25.0%id,  0.0%wa,  0.0%hi, 27.0%si,
 0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,
(Continue reading)

Beyers Cronje | 2 Dec 2011 01:27
Picon
Gravatar

Re: Click running on multi-core processor

Hi,

You need to use StaticThreadSched
http://read.cs.ucla.edu/click/elements/staticthreadsched element to tell
Click how to allocate tasks to threads. Without this element Click will use
only one thread.

A simple example on how to use is:

fd0::FromDevice(eth0) -> Queue -> td1::ToDevice(eth1);
fd1::FromDevice(eth1) -> Queue -> td0::ToDevice(eth0);

StaticThreadSched(fd0 0, td1 0, fd1 1, tf0 1);

This config schedules fd0 and td1 on thread 0 and the other two elements on
thread 1. It is highly recommended to read the following publication
http://pdos.csail.mit.edu/papers/click:usenix01/usenix01.pdf which delves
into much more details around multithreading and Click and how to best use
it.

Also, highly recommended to upgrade to latest version of Click, there have
been many multithreading stability and performance changes implemented
inside Click since v1.8

Also note not all elements are multithread safe.

Beyers

On Fri, Dec 2, 2011 at 1:08 AM, Bingyang LIU <bjornliu <at> gmail.com> wrote:

(Continue reading)


Gmane