From jopen at informatik.uni-bonn.de Thu Aug 1 13:19:28 2013 From: jopen at informatik.uni-bonn.de (Sascha Alexander Jopen) Date: Thu, 01 Aug 2013 19:19:28 +0200 Subject: [Click] Packet alignment In-Reply-To: References: <51F7C314.5030607@informatik.uni-bonn.de> Message-ID: <51FA98A0.9000801@informatik.uni-bonn.de> Hey, i already implemented this solution, it's the easiest one. I hoped for a more generic solution, which allows to define that my element has an arbitrary or unknown alignment, another element like UDPIPEncap requires a specific alignment and click-align would do the rest. Implementing hardcoded alignements in click-align.cc seems not the best solution, especially when i use click packages. A more dynamic approach with elementmap.xml or something like this would be nice, but i guess there is not enough demand to implement this. Thanks anyway, Sascha Am 31.07.2013 20:05, schrieb Eddie Kohler: > Another solution is of course to generate the correct amount of > headroom (say 48B) so that UDPIPEncap is naturally aligned! > > > On Wed, Jul 31, 2013 at 2:05 PM, Eddie Kohler wrote: >> (Not sure but:) Basically, if Click sees an element it doesn't >> understand, it assumes the element either doesn't generate packets, or >> that it generates packets with correct alignment requirements. >> >> Probably it would be better to default to "arbitrary alignment" rather >> than "correct alignment," but that might be difficult. >> >> Eddie >> >> >> On Wed, Jul 31, 2013 at 12:41 PM, Cliff Frey wrote: >>> You need to add your custom element to the "class_factory" function of >>> tools/click-align/click-align.cc to indicate the alignment of the packets >>> generated by your element. Then click-align will add the necessary Align >>> elements for you. >>> >>> Cliff >>> >>> >>> On Tue, Jul 30, 2013 at 6:43 AM, Sascha Alexander Jopen < >>> jopen at informatik.uni-bonn.de> wrote: >>> >>>> Hey, >>>> >>>> I have a question regarding the click packet data alignment. >>>> >>>> I have an element which generates packets with 46 bytes of headroom >>>> followed by some data. The whole packet gets aligned in memory, but >>>> data() points to a memory section which is 2 bytes off the alignment on >>>> a 32bit machine. This packet will eventually be pushed into an >>>> UDPIPEncap element. On some architectures (where >>>> HAVE_INDIFFERENT_ALIGNMENT is not defined) a 4-byte alignment is >>>> expected (see line 94 udpipencap.cc). However, click-align does not >>>> insert an Align element on those architectures. If i do this manually, >>>> everything is fine. How can i make click-align insert the Align element? >>>> >>>> Thanks in advance, >>>> Sascha >>>> >>>> -- >>>> Dipl.-Inform. Sascha Jopen >>>> >>>> University of Bonn Tel.: +49-228-73-54219 >>>> Institute of Computer Science 4 Fax: +49-228-73-4571 >>>> Friedrich-Ebert-Allee 144 E-mail: jopen at cs.uni-bonn.de >>>> D-53113 Bonn, Germany >>>> _______________________________________________ >>>> 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 From hwang.jinho at gmail.com Tue Aug 13 23:23:57 2013 From: hwang.jinho at gmail.com (jinho hwang) Date: Tue, 13 Aug 2013 23:23:57 -0400 Subject: [Click] [click] userlevel multi-threads Message-ID: 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 From bcronje at gmail.com Wed Aug 14 07:23:56 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Wed, 14 Aug 2013 13:23:56 +0200 Subject: [Click] [click] userlevel multi-threads In-Reply-To: References: Message-ID: 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 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 > From hwang.jinho at gmail.com Wed Aug 14 10:38:55 2013 From: hwang.jinho at gmail.com (jinho hwang) Date: Wed, 14 Aug 2013 10:38:55 -0400 Subject: [Click] [click] userlevel multi-threads In-Reply-To: References: Message-ID: On Wed, Aug 14, 2013 at 7:23 AM, Beyers Cronje wrote: > 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 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 Hi Beyers, Thank you. It works like charm, and fits to my goal. One more question is whether it uses cpu affinity? From my analysis, there is no such thing. I have to fix each thread to each core. Does Click have CPU affinity option somewhere? Otherwise, I will add that for my purpose. Thanks, Jinho From bcronje at gmail.com Wed Aug 14 11:02:14 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Wed, 14 Aug 2013 17:02:14 +0200 Subject: [Click] [click] userlevel multi-threads In-Reply-To: References: Message-ID: Hi Jinho, I'm not too sure, but I dont think so. Beyers On Wed, Aug 14, 2013 at 4:38 PM, jinho hwang wrote: > On Wed, Aug 14, 2013 at 7:23 AM, Beyers Cronje wrote: > > 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 > 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 > > Hi Beyers, > > Thank you. It works like charm, and fits to my goal. One more question > is whether it uses cpu affinity? From my analysis, there is no such > thing. I have to fix each thread to each core. Does Click have CPU > affinity option somewhere? Otherwise, I will add that for my purpose. > > Thanks, > > Jinho > From hwang.jinho at gmail.com Wed Aug 14 11:22:21 2013 From: hwang.jinho at gmail.com (jinho hwang) Date: Wed, 14 Aug 2013 11:22:21 -0400 Subject: [Click] [click] userlevel multi-threads In-Reply-To: References: Message-ID: On Wed, Aug 14, 2013 at 11:02 AM, Beyers Cronje wrote: > Hi Jinho, > > I'm not too sure, but I dont think so. > > Beyers > > > On Wed, Aug 14, 2013 at 4:38 PM, jinho hwang wrote: > >> On Wed, Aug 14, 2013 at 7:23 AM, Beyers Cronje wrote: >> > 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 >> 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 >> >> Hi Beyers, >> >> Thank you. It works like charm, and fits to my goal. One more question >> is whether it uses cpu affinity? From my analysis, there is no such >> thing. I have to fix each thread to each core. Does Click have CPU >> affinity option somewhere? Otherwise, I will add that for my purpose. >> >> Thanks, >> >> Jinho >> I thought the section written on the website applies only to kernel-mode, but it seems outdated. The following also applies to the userlevel multi-threads from http://www.read.cs.ucla.edu/click/clickunderhood#multi-threaded-click. ----- Lastly, we haven't talked about setting CPU affinities, i.e., how threads are assigned to CPU cores. Click largely leaves this up to the OS. Under Linux, users can install a Click configuration and then set affinities afterwards, either through command-line tools like taskset or by calling the sched_setaffinity and sched_getaffinity functions. If no affinities are set, the OS will decide the assignment. Another way would be to write a new Click element to configure this; no such element exists yet. ---- Thanks, Jinho From salman.khalid at epfl.ch Thu Aug 22 05:14:15 2013 From: salman.khalid at epfl.ch (Salman Khalid) Date: Thu, 22 Aug 2013 11:14:15 +0200 Subject: [Click] Help in packet data In-Reply-To: <5214D896.3040900@epfl.ch> References: <5214D896.3040900@epfl.ch> Message-ID: <5215D667.9070903@epfl.ch> hi all, i am very much new to click. just learning it from scratch. Kindly tell me that how can i know the destination port if i generate packet from a random source. i want tosort packets depending upon their destination sources kindly help me From claudehangui at ymail.com Fri Aug 23 06:25:56 2013 From: claudehangui at ymail.com (Claude Hangui) Date: Fri, 23 Aug 2013 03:25:56 -0700 (PDT) Subject: [Click] running click examples in ubuntu 12.04 !! Message-ID: <1377253556.55832.YahooMailNeo@web122402.mail.ne1.yahoo.com> Hello everyone! i'm a newbie in click, tring to figure out how click language works and i've got some difficulties in running click examples available in the conf folder.when I ran ?click udpgen.click The following error occur. ?/conf/udpgen.click:28: unknown element class ?FastUDPSource? ?./conf/udpgen.click:30: unknown element class ?PollDevice' It doesn't work in the userlevel mode, so I tried the kernel istallation but the appropriate patch doesn't exist for my kernel.i'm working on ubuntu 12.04 and my kernel version is 3.2.0.52, and the latest patch i've got on my PC is linux-2.6.24.7-patch. I discovered this once I wanted to patch my linux kernel. I checked on the forum for answers and the ISTALL file, I saw that we could use the patchless mode. I don't really understand this mode,I would appreciate someone explain to me what this means. Moreover, I would like to know if installing an old linux kernel version on my PC will solve the issue ? thx in advance From ndritsos at gmail.com Sun Aug 25 16:35:16 2013 From: ndritsos at gmail.com (ndritsos) Date: Sun, 25 Aug 2013 22:35:16 +0200 Subject: [Click] #include header in kernel ? In-Reply-To: References: Message-ID: <521A6A84.5050400@gmail.com> Hello everyone , i have created an element that uses the library unistd.h, and in the user level it works fine . Now i'm working in kernel level , and it doesn't work. in kernel level i have imported : #include and i have this compile time error: --- In file included from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23:0: /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:5:3: error: #error "missing #include " In file included from /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12:0, from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:4:3: error: #error "missing #include " In file included from /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:8:0, from /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12, from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd_32.h:5:3: error: #error "missing #include " /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc: In member function 'virtual int NdritsoElement::initialize(ErrorHandler*)': /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:59:8: error: 'getpid' was not declared in this scope make[3]: *** [/home/dritsos/click/linuxmodule/ndritso.o] Error 1 make[2]: *** [_module_/home/dritsos/click/linuxmodule] Error 2 make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/dritsos/click/linuxmodule' make: *** [install-linuxmodule] Error 2 --- Any idea how i can fix this error?? thanks in advance From clfrey at cisco.com Sun Aug 25 20:23:58 2013 From: clfrey at cisco.com (Cliff Frey) Date: Sun, 25 Aug 2013 17:23:58 -0700 Subject: [Click] #include header in kernel ? In-Reply-To: <521A6A84.5050400@gmail.com> References: <521A6A84.5050400@gmail.com> Message-ID: You cannot use unistd.h (or any other standard userlevel headers) in the kernel. Whatever you are trying to do must be done in a different way. Specifically you cannot use getpid(). What do you want/need getpid for? Cliff On Sun, Aug 25, 2013 at 1:35 PM, ndritsos wrote: > Hello everyone , > > i have created an element that uses the library unistd.h, and in the > user level it works fine . > Now i'm working in kernel level , and it doesn't work. > > in kernel level i have imported : > > #include > > and i have this compile time error: > --- > In file included from > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23:0: > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:5:3: > error: #error "missing #include " > In file included from > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12:0, > from > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:4:3: > error: #error "missing #include " > In file included from > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:8:0, > from > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12, > from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd_32.h:5:3: > error: #error "missing #include " > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc: In member > function 'virtual int NdritsoElement::initialize(ErrorHandler*)': > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:59:8: > error: 'getpid' was not declared in this scope > make[3]: *** [/home/dritsos/click/linuxmodule/ndritso.o] Error 1 > make[2]: *** [_module_/home/dritsos/click/linuxmodule] Error 2 > make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/home/dritsos/click/linuxmodule' > make: *** [install-linuxmodule] Error 2 > > > --- > > > Any idea how i can fix this error?? > > thanks in advance > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > From ndritsos at gmail.com Mon Aug 26 00:41:49 2013 From: ndritsos at gmail.com (ndritsos) Date: Mon, 26 Aug 2013 06:41:49 +0200 Subject: [Click] #include header in kernel ? In-Reply-To: References: <521A6A84.5050400@gmail.com> Message-ID: <521ADC8D.2070304@gmail.com> hello , iam trying to port code from openssl , especially at this time i need the function Rand_poll() https://github.com/openssl/openssl/blob/master/crypto/rand/rand_unix.c lines 237 - 420 The function Rand_poll use 1)getpid() 2)close(..) 3)open(...) 4getuid() and all this functions are defined on unistd.h ! any idea someone how i can run this code on kernel level? On 08/26/2013 02:23 AM, Cliff Frey wrote: > You cannot use unistd.h (or any other standard userlevel headers) in > the kernel. Whatever you are trying to do must be done in a different > way. Specifically you cannot use getpid(). > > What do you want/need getpid for? > > Cliff > > > On Sun, Aug 25, 2013 at 1:35 PM, ndritsos > wrote: > > Hello everyone , > > i have created an element that uses the library unistd.h, and in the > user level it works fine . > Now i'm working in kernel level , and it doesn't work. > > in kernel level i have imported : > > #include > > and i have this compile time error: > --- > In file included from > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23:0: > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:5:3: > error: #error "missing #include " > In file included from > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12:0, > from > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:4:3: > error: #error "missing #include " > In file included from > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:8:0, > from > /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12, > from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: > /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd_32.h:5:3: > error: #error "missing #include " > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc: In > member > function 'virtual int NdritsoElement::initialize(ErrorHandler*)': > /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:59:8: > error: 'getpid' was not declared in this scope > make[3]: *** [/home/dritsos/click/linuxmodule/ndritso.o] Error 1 > make[2]: *** [_module_/home/dritsos/click/linuxmodule] Error 2 > make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/home/dritsos/click/linuxmodule' > make: *** [install-linuxmodule] Error 2 > > > --- > > > Any idea how i can fix this error?? > > thanks in advance > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > > From clfrey at cisco.com Mon Aug 26 01:06:08 2013 From: clfrey at cisco.com (Cliff Frey) Date: Sun, 25 Aug 2013 22:06:08 -0700 Subject: [Click] #include header in kernel ? In-Reply-To: <521ADC8D.2070304@gmail.com> References: <521A6A84.5050400@gmail.com> <521ADC8D.2070304@gmail.com> Message-ID: you can likely just use click_random() if you need random data and you want it to work at both userlevel and in the kernel. Otherwise, you can use stuff like #ifdef CLICK_LINUXMODULE and use get_random_bytes() from the linux kernel. You cannot do direct filesystem access from linux modules, and there is no (not-very-very-difficult) way around that Cliff On Sun, Aug 25, 2013 at 9:41 PM, ndritsos wrote: > hello , > > iam trying to port code from openssl , especially > at this time i need the function Rand_poll() > https://github.com/openssl/openssl/blob/master/crypto/rand/rand_unix.c > lines 237 - 420 > > The function Rand_poll use > 1)getpid() > 2)close(..) > 3)open(...) > 4getuid() > > and all this functions are defined on unistd.h ! > > any idea someone how i can run this code on kernel level? > > > > On 08/26/2013 02:23 AM, Cliff Frey wrote: > > You cannot use unistd.h (or any other standard userlevel headers) in the > kernel. Whatever you are trying to do must be done in a different way. > Specifically you cannot use getpid(). > > What do you want/need getpid for? > > Cliff > > > On Sun, Aug 25, 2013 at 1:35 PM, ndritsos wrote: > >> Hello everyone , >> >> i have created an element that uses the library unistd.h, and in the >> user level it works fine . >> Now i'm working in kernel level , and it doesn't work. >> >> in kernel level i have imported : >> >> #include >> >> and i have this compile time error: >> --- >> In file included from >> /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23:0: >> /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:5:3: >> error: #error "missing #include " >> In file included from >> >> /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12:0, >> from >> /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: >> /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:4:3: >> error: #error "missing #include " >> In file included from >> /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd.h:8:0, >> from >> /home/dritsos/click/include/click-linuxmodule/include2/linux/unistd.h:12, >> from /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:23: >> >> /home/dritsos/click/include/click-linuxmodule/include0/asm/unistd_32.h:5:3: >> error: #error "missing #include " >> /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc: In member >> function 'virtual int NdritsoElement::initialize(ErrorHandler*)': >> /home/dritsos/click/linuxmodule/../elements/local/ndritso.cc:59:8: >> error: 'getpid' was not declared in this scope >> make[3]: *** [/home/dritsos/click/linuxmodule/ndritso.o] Error 1 >> make[2]: *** [_module_/home/dritsos/click/linuxmodule] Error 2 >> make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' >> make[1]: *** [all] Error 2 >> make[1]: Leaving directory `/home/dritsos/click/linuxmodule' >> make: *** [install-linuxmodule] Error 2 >> >> >> --- >> >> >> Any idea how i can fix this error?? >> >> thanks in advance >> _______________________________________________ >> click mailing list >> click at amsterdam.lcs.mit.edu >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click >> > > > From amer7777 at hotmail.com Mon Aug 26 09:58:29 2013 From: amer7777 at hotmail.com (Amer) Date: Mon, 26 Aug 2013 16:58:29 +0300 Subject: [Click] Logic operation on destination IP Message-ID: Hello folks, I want your help in the following issues: I want the click router do some arithmetic/logic operations on the IP address of the arriving packets before checking the routing table. Operations like: ptk.dstip AND "x.y.z.v" Best wishes, Amer From bcronje at gmail.com Mon Aug 26 10:49:19 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Mon, 26 Aug 2013 16:49:19 +0200 Subject: [Click] Logic operation on destination IP In-Reply-To: References: Message-ID: Hi Amer, So what exactly is your question? On Mon, Aug 26, 2013 at 3:58 PM, Amer wrote: > Hello folks, > > I want your help in the following issues: > > I want the click router do some arithmetic/logic operations on the IP > address of the arriving packets before checking the routing table. > Operations like: > ptk.dstip AND "x.y.z.v" > > > Best wishes, > Amer > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > From amer7777 at hotmail.com Mon Aug 26 16:25:43 2013 From: amer7777 at hotmail.com (Amer) Date: Mon, 26 Aug 2013 23:25:43 +0300 Subject: [Click] Logic operation on destination IP In-Reply-To: References: Message-ID: Hi, Thank you for ur msg I want know how to do that, where to start which function to modify and which to use. I am new in click Best regards, Amer Sent from my iPhone On ???/???/????, at ?:?? ?, Beyers Cronje wrote: > Hi Amer, > > So what exactly is your question? > > > On Mon, Aug 26, 2013 at 3:58 PM, Amer wrote: > >> Hello folks, >> >> I want your help in the following issues: >> >> I want the click router do some arithmetic/logic operations on the IP >> address of the arriving packets before checking the routing table. >> Operations like: >> ptk.dstip AND "x.y.z.v" >> >> >> Best wishes, >> Amer >> _______________________________________________ >> 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 > From bcronje at gmail.com Mon Aug 26 17:23:55 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Mon, 26 Aug 2013 23:23:55 +0200 Subject: [Click] Logic operation on destination IP In-Reply-To: References: Message-ID: I would recommend you start from here: http://read.cs.ucla.edu/click/learning Everything to start off with is from that page. Once you have the basics covered feel free to post more specific questions. On Mon, Aug 26, 2013 at 10:25 PM, Amer wrote: > Hi, > > Thank you for ur msg > I want know how to do that, where to start which function to modify and > which to use. > I am new in click > > Best regards, Amer > > Sent from my iPhone > > On ???/???/????, at ?:?? ?, Beyers Cronje wrote: > > Hi Amer, > > So what exactly is your question? > > > On Mon, Aug 26, 2013 at 3:58 PM, Amer wrote: > > Hello folks, > > > I want your help in the following issues: > > > I want the click router do some arithmetic/logic operations on the IP > > address of the arriving packets before checking the routing table. > > Operations like: > > ptk.dstip AND "x.y.z.v" > > > > Best wishes, > > Amer > > _______________________________________________ > > 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 > > From claudehangui at ymail.com Thu Aug 29 18:28:51 2013 From: claudehangui at ymail.com (Claude Hangui) Date: Thu, 29 Aug 2013 15:28:51 -0700 (PDT) Subject: [Click] ping tutorial !! Message-ID: <1377815331.30924.YahooMailNeo@web122406.mail.ne1.yahoo.com> Hi folks, I'm having an issue when compiling the ping-5.click script as a userlevel. ./userlevel/click conf/ping-5.click . I get the following error : conf/ping-5.click:6: unknown element class ?ListenEtherSwitch? I kept on recompiling and even reinstalling click, but I still get the same bug. Any clues please ?? From bart.braem at uantwerpen.be Fri Aug 30 03:58:42 2013 From: bart.braem at uantwerpen.be (Braem Bart) Date: Fri, 30 Aug 2013 07:58:42 +0000 Subject: [Click] ping tutorial !! In-Reply-To: <1377815331.30924.YahooMailNeo@web122406.mail.ne1.yahoo.com> References: <1377815331.30924.YahooMailNeo@web122406.mail.ne1.yahoo.com> Message-ID: <8EAC56A8-5A3F-4568-87FA-527EAFA10E8E@uantwerpen.be> You should enable this element by adding it to your configure: ./configure --enable-etherswitch Bart On 30 Aug 2013, at 00:28, Claude Hangui wrote: > Hi folks, I'm having an issue when compiling the ping-5.click script as a userlevel. > > ./userlevel/click conf/ping-5.click . > I get the following error : > conf/ping-5.click:6: unknown element class ?ListenEtherSwitch? > I kept on recompiling and even reinstalling click, but I still get the same bug. Any clues please ?? > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click From qubu88 at gmail.com Fri Aug 30 06:33:59 2013 From: qubu88 at gmail.com (Jakub Dudek) Date: Fri, 30 Aug 2013 12:33:59 +0200 Subject: [Click] Activation of element handlers in ToDevice element Message-ID: Hi All, I want to activate optional handlers in ToDevice element by uncomment above lines: #define CLICK_DEVICE_CYCLES 1 #define CLICK_DEVICE_PRFCTR 1 During compilation I get errors: ...todevice.cc: In member function 'virtual void Todevice::add_handlers()' ...tidevuce.cc:613: error: no matching function for call to 'ToDevice::add_read_handler(const char [12], Handler:DeprecatedFlags, click_cycles_t*)' ..element.hh:161: note: canditates are: void Element:add_read_handler(const String&, String (*)(Element*, void*),int, uint32_t) Do you have any ideas how to solve this issue? Or is there some other way to measure inactivity of NIC link? Thanks! Kuba From ndritsos at gmail.com Fri Aug 30 13:37:14 2013 From: ndritsos at gmail.com (ndritsos) Date: Fri, 30 Aug 2013 19:37:14 +0200 Subject: [Click] Kernel : insmod: error inserting Message-ID: <5220D84A.1000305@gmail.com> Hello all, i have taken some code from openssl and it works fine on click- userlevel. Now i am trying to port it , to run on kernel level . In my code i don't use other libraries (i don't use math.h ), just only the libraries that click provides. so, when i compile it : ./configure --enable-local --disable-userlevel make install at compile time i have only this three Warnings : ======================================== 1] CXX [M] myElement.o /home/dritsos/click/linuxmodule/../elements/local/myElement.cc: In member function ?virtual int myElement::initialize(ErrorHandler*)?: /home/dritsos/click/linuxmodule/../elements/local/myElement.cc:177:1: warning: the frame size of 1036 bytes is larger than 1024 bytes [-Wframe-larger-than=] 2] CXX [M] pem_lib.o /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc: In function ?int PEM_do_header(EVP_CIPHER_INFO*, unsigned char*, long int*, int (*)(char*, int, int, void*), void*)?: /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc:303:2: warning: the frame size of 1092 bytes is larger than 1024 bytes [-Wframe-larger-than=] 3] Building modules, stage 2. MODPOST 2 modules WARNING: "__floatsidf" [/home/dritsos/click/linuxmodule/click.ko] undefined! WARNING: "__subdf3" [/home/dritsos/click/linuxmodule/click.ko] undefined! WARNING: "__gedf2" [/home/dritsos/click/linuxmodule/click.ko] undefined! WARNING: "__ltdf2" [/home/dritsos/click/linuxmodule/click.ko] undefined! WARNING: "__adddf3" [/home/dritsos/click/linuxmodule/click.ko] undefined! CC /home/dritsos/click/linuxmodule/click.mod.o LD [M] /home/dritsos/click/linuxmodule/click.ko CC /home/dritsos/click/linuxmodule/proclikefs.mod.o LD [M] /home/dritsos/click/linuxmodule/proclikefs.ko make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' ======================================================= The compiler ends normaly , BUT when i try to run it : click-install -u test.click it doesn't work and appears this message :: root at dritsos-VirtualBox:~/click/conf# click-install -u test.click insmod: error inserting '/usr/local/lib/click.ko': -1 Unknown symbol in module click-install: '/sbin/insmod /usr/local/lib/click.ko' failed Any idea someone where is the problem ??? thanks in advance From ekohler at gmail.com Fri Aug 30 14:10:51 2013 From: ekohler at gmail.com (Eddie Kohler) Date: Fri, 30 Aug 2013 14:10:51 -0400 Subject: [Click] Kernel : insmod: error inserting In-Reply-To: <5220D84A.1000305@gmail.com> References: <5220D84A.1000305@gmail.com> Message-ID: It looks like your code uses floating-point arithmetic. And the kernel does not support floating-point arithmetic. Can you avoid floating-point arithmetic? On Fri, Aug 30, 2013 at 1:37 PM, ndritsos wrote: > Hello all, > > i have taken some code from openssl and it works fine on click- userlevel. > Now i am trying to port it , to run on kernel level . In my code i don't > use other libraries (i don't use math.h ), > just only the libraries that click provides. > > so, when i compile it : > ./configure --enable-local --disable-userlevel > make install > > at compile time i have only this three Warnings : > > ======================================== > 1] > CXX [M] myElement.o > /home/dritsos/click/linuxmodule/../elements/local/myElement.cc: In > member function ?virtual int myElement::initialize(ErrorHandler*)?: > /home/dritsos/click/linuxmodule/../elements/local/myElement.cc:177:1: > warning: the frame size of 1036 bytes is larger than 1024 bytes > [-Wframe-larger-than=] > > 2] > CXX [M] pem_lib.o > /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc: In > function ?int PEM_do_header(EVP_CIPHER_INFO*, unsigned char*, long int*, > int (*)(char*, int, int, void*), void*)?: > /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc:303:2: > warning: the frame size of 1092 bytes is larger than 1024 bytes > [-Wframe-larger-than=] > > 3] > Building modules, stage 2. > MODPOST 2 modules > WARNING: "__floatsidf" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > WARNING: "__subdf3" [/home/dritsos/click/linuxmodule/click.ko] undefined! > WARNING: "__gedf2" [/home/dritsos/click/linuxmodule/click.ko] undefined! > WARNING: "__ltdf2" [/home/dritsos/click/linuxmodule/click.ko] undefined! > WARNING: "__adddf3" [/home/dritsos/click/linuxmodule/click.ko] undefined! > CC /home/dritsos/click/linuxmodule/click.mod.o > LD [M] /home/dritsos/click/linuxmodule/click.ko > CC /home/dritsos/click/linuxmodule/proclikefs.mod.o > LD [M] /home/dritsos/click/linuxmodule/proclikefs.ko > make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' > ======================================================= > > > The compiler ends normaly , BUT when i try to run it : > click-install -u test.click > > it doesn't work and appears this message :: > > root at dritsos-VirtualBox:~/click/conf# click-install -u test.click > insmod: error inserting '/usr/local/lib/click.ko': -1 Unknown symbol in > module > click-install: '/sbin/insmod /usr/local/lib/click.ko' failed > > > Any idea someone where is the problem ??? > > thanks in advance > > > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > From ndritsos at gmail.com Fri Aug 30 17:02:09 2013 From: ndritsos at gmail.com (ndritsos) Date: Fri, 30 Aug 2013 23:02:09 +0200 Subject: [Click] Kernel : insmod: error inserting In-Reply-To: References: <5220D84A.1000305@gmail.com> Message-ID: <52210851.2070504@gmail.com> Hello , yes , i had a function that used floating-point arithmetic , i fixed it , and now i have only two warnings : ============================================ 1] CXX [M] myElement.o /home/dritsos/click/linuxmodule/../elements/local/myElement.cc: In member function ?virtual int myElement::initialize(ErrorHandler*)?: /home/dritsos/click/linuxmodule/../elements/local/myElement.cc:177:1: warning: the frame size of 1036 bytes is larger than 1024 bytes [-Wframe-larger-than=] 2] CXX [M] pem_lib.o /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc: In function ?int PEM_do_header(EVP_CIPHER_INFO*, unsigned char*, long int*, int (*)(char*, int, int, void*), void*)?: /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc:303:2: warning: the frame size of 1092 bytes is larger than 1024 bytes [-Wframe-larger-than=] ============================================ So the compiler ends normaly , BUT again when i try to run it : click-install -u test.click it doesn't work and appears a little bit different message : root at dritsos-VirtualBox:~/click/conf# click-install -u test.click insmod: error inserting '/usr/local/lib/click.ko': -1 Invalid module format click-install: '/sbin/insmod /usr/local/lib/click.ko' failed Any idea, what this new message means? thanks in andvance On 08/30/2013 08:10 PM, Eddie Kohler wrote: > It looks like your code uses floating-point arithmetic. And the kernel > does not support floating-point arithmetic. Can you avoid > floating-point arithmetic? > > > > On Fri, Aug 30, 2013 at 1:37 PM, ndritsos > wrote: > > Hello all, > > i have taken some code from openssl and it works fine on click- > userlevel. > Now i am trying to port it , to run on kernel level . In my code i > don't > use other libraries (i don't use math.h ), > just only the libraries that click provides. > > so, when i compile it : > ./configure --enable-local --disable-userlevel > make install > > at compile time i have only this three Warnings : > > ======================================== > 1] > CXX [M] myElement.o > /home/dritsos/click/linuxmodule/../elements/local/myElement.cc: In > member function ?virtual int myElement::initialize(ErrorHandler*)?: > /home/dritsos/click/linuxmodule/../elements/local/myElement.cc:177:1: > warning: the frame size of 1036 bytes is larger than 1024 bytes > [-Wframe-larger-than=] > > 2] > CXX [M] pem_lib.o > /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc: In > function ?int PEM_do_header(EVP_CIPHER_INFO*, unsigned char*, long > int*, > int (*)(char*, int, int, void*), void*)?: > /home/dritsos/click/linuxmodule/../elements/local/pem/pem_lib.cc:303:2: > warning: the frame size of 1092 bytes is larger than 1024 bytes > [-Wframe-larger-than=] > > 3] > Building modules, stage 2. > MODPOST 2 modules > WARNING: "__floatsidf" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > WARNING: "__subdf3" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > WARNING: "__gedf2" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > WARNING: "__ltdf2" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > WARNING: "__adddf3" [/home/dritsos/click/linuxmodule/click.ko] > undefined! > CC /home/dritsos/click/linuxmodule/click.mod.o > LD [M] /home/dritsos/click/linuxmodule/click.ko > CC /home/dritsos/click/linuxmodule/proclikefs.mod.o > LD [M] /home/dritsos/click/linuxmodule/proclikefs.ko > make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' > ======================================================= > > > The compiler ends normaly , BUT when i try to run it : > click-install -u test.click > > it doesn't work and appears this message :: > > root at dritsos-VirtualBox:~/click/conf# click-install -u test.click > insmod: error inserting '/usr/local/lib/click.ko': -1 Unknown > symbol in > module > click-install: '/sbin/insmod /usr/local/lib/click.ko' failed > > > Any idea someone where is the problem ??? > > thanks in advance > > > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > > From claudehangui at ymail.com Sat Aug 31 13:51:44 2013 From: claudehangui at ymail.com (Claude Hangui) Date: Sat, 31 Aug 2013 10:51:44 -0700 (PDT) Subject: [Click] Differences between User-level and Nsclick !! Message-ID: <1377971504.99030.YahooMailNeo@web122404.mail.ne1.yahoo.com> Hi everyone !! I would like to know what's the major difference between running click scripts in the user-level program using click and in the NS3-simulator using nsclick. thx in advance !! Claude