Re: [Click] #include unistd.h header in kernel ?

2013-08-25 Thread Cliff Frey
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 ndrit...@gmail.com wrote:

Re: [Click] #include unistd.h header in kernel ?

2013-08-25 Thread Cliff Frey
/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

Re: [Click] linuxmodule ToDevice

2013-02-09 Thread Cliff Frey
Well, the fact that this was rapidly merged into mainline inspired me to do a bit more testing, and it found a very basic issue which I just fixed in mainline, so if you do want to test this, just test mainline. Cliff On Sat, Feb 9, 2013 at 6:03 PM, Cliff Frey cl...@meraki.com wrote: https

Re: [Click] About Classifier

2013-01-06 Thread Cliff Frey
I would use a config like this: Classifier(12/0800) - CheckIPHeader - IPClassifier(proto IP-ENCAP) // you could also use the value 4 instead of IP-ENCAP If you then wanted to do things with the encapsulated IP packet, you could do something like - StripIPHeader - CheckIPHeader(0) -

Re: [Click] kernel patching elimination

2012-11-02 Thread Cliff Frey
again! Konstantin On Thu, Nov 1, 2012 at 3:15 PM, Cliff Frey cl...@meraki.com wrote: On Thu, Oct 25, 2012 at 5:22 AM, Konstantin Zaykalov zayka...@gmail.com wrote: Hi, I've got a few questions regarding the design of Click router: 1) Why does Click do kernel patching (and fixing

Re: [Click] kernel patching elimination

2012-11-01 Thread Cliff Frey
On Thu, Oct 25, 2012 at 5:22 AM, Konstantin Zaykalov zayka...@gmail.comwrote: Hi, I've got a few questions regarding the design of Click router: 1) Why does Click do kernel patching (and fixing include files via fixincludes.pl script) for g++ compiler instead of providing wrapper functions,

Re: [Click] Passing a element declaration to an elementclass as parameter

2012-06-19 Thread Cliff Frey
Not directly possible. The closest that you can do is either using some other macro language (i.e. the c preprocessor), or making a 2-input, 2-output elementclass, where you do my_eltclass [1] - CONFIG_STUFF_GOES_HERE - [1] my_eltclass; Cliff On Tue, Jun 19, 2012 at 6:56 AM,

Re: [Click] Elements with large arrays - Unable to handle kernel NULL pointer...

2012-06-05 Thread Cliff Frey
). In my opinion all of this should require max ~15MB. Is there any way to debug this problem? Jakub 2012/6/5 Cliff Frey cl...@meraki.com Beyers is correct. However, you will still likely be limited to at most a few hundred MB (and quite possibly much smaller). If you want larger than

Re: [Click] How to user kernel handler?

2012-04-29 Thread Cliff Frey
You don't want to use KernelHandlerProxy, instead you need to mount clickfs. click-install can do this for you, or you can run it yourself mount -t click none /click you might need to install the proclikefs kernel module first though. Cliff On Sun, Apr 29, 2012 at 8:22 AM, Cong Guo

Re: [Click] Bug with click_chatter and %{element}

2012-02-22 Thread Cliff Frey
The format changed, it is now click_chatter(%p{element}, this); if you run this from your click directory, it should fix up all of your code: sed -i -r 's/%\{(element|ip_ptr|ether_ptr|timeval|timestamp)\}/%p{\1}/g' `git grep -l -E '%\{(element|ip_ptr|ether_ptr|timeval|timestamp)\}'` Cliff On

[Click] Fwd: Error inserting click.ko module in kernel mode

2012-02-16 Thread Cliff Frey
On Thu, Feb 16, 2012 at 10:49 AM, Cliff Frey cl...@meraki.com wrote: What version of click are you running? Have you made any changes to the source at all? What options did you use to configure/make? What is the exact symbol error that you are getting? Cliff On Tue, Feb 14, 2012 at 10:26 PM

Re: [Click] Token Bucket Policer

2012-02-15 Thread Cliff Frey
Hi Ruetee, Thanks for the bug report! I just fixed this in mainline click, so if you update to the latest version on github, it should fix the problem. Cliff On Tue, Feb 14, 2012 at 1:26 PM, Ruetee Chitpranee ruet...@gmail.comwrote: Hi, I'm trying to use *BandwidthRatedSplitter* as a

Re: [Click] Error inserting click.ko module in kernel mode

2012-02-15 Thread Cliff Frey
What version of click are you running? Have you made any changes to the source at all? What options did you use to configure/make? What is the exact symbol error that you are getting? Cliff On Tue, Feb 14, 2012 at 10:26 PM, udit kumar yudistra...@gmail.com wrote: Hi, I am an Mtech student

Re: [Click] Bit_Rate measurement

2012-02-14 Thread Cliff Frey
hmm, this looks like a bug to me. However, if you use AverageCounter and the byte_rate handler instead of Counter and the bit_rate handler, it seems to work. Cliff On Tue, Feb 14, 2012 at 10:46 AM, Ruetee Chitpranee ruet...@gmail.comwrote: Hi, I'm trying to measure bit rate of a source by

Re: [Click] External library linking

2012-02-13 Thread Cliff Frey
You make need to do a clean rebuild if you added the ELEMENT_LIBS line to your element more recently. (there is a chance that you can just run 'make elemlist', but I'm not sure) You can run make with V=1 in order to see the actual linker command that click is using (instead of just seeing LINK).

Re: [Click] Error compiling my package in Click for kernel level

2012-02-09 Thread Cliff Frey
debugging info for this crash yet. Can you think of anything why this can be happening? Thank you. Regards, Harkeerat Bedi University of Memphis On Tue, Feb 7, 2012 at 11:04 AM, Cliff Frey cl...@meraki.com wrote: I'm glad that the suggestions helped out. You could try various forms of kernel

Re: [Click] 10GE Click performance

2012-02-08 Thread Cliff Frey
Not sure if you are still working on this, but it is possible that receive offload could affect/hurt you by causing non-linear skbs. to see offload settings: ethtool -k eth0 disable receive offload: ethtool -K eth0 gro off lro off it might be worth a shot if it is still easy for you to test.

Re: [Click] Error compiling my package in Click for kernel level

2012-02-07 Thread Cliff Frey
this? I am able to run my package (and debug it using gdb) in user level and do not experience any issues. Thank you once again. Regards, Harkeerat Bedi University of Memphis On Mon, Feb 6, 2012 at 1:11 AM, Cliff Frey cl...@meraki.com wrote: responses inline On Sun, Feb 5, 2012 at 10:41

Re: [Click] 2nd Try:: chatter: in arp querier: cannot make packet! -- resulting in kernel oops

2012-02-04 Thread Cliff Frey
I don't think that anyone on the mailing list can give much support to such an old version of click. I don't think that ARPQuerier is the problem, the problem is that you are running out of memory. You need to find your memory leak and fix it. Newer versions of click can be configured/compiled

Re: [Click] Traffic Regulator and Scheduler Implementation

2012-01-16 Thread Cliff Frey
Look at RatedUnqueue/RatedSplitter (and there are BW* versions of those elements as well) Also look at DRRSched and StrideSched elements. Cliff On Mon, Jan 16, 2012 at 3:36 AM, Ruetee Chitpranee ruet...@gmail.comwrote: Hi, I would like to know if any or some standard elements can be

Re: [Click] Packet loss even at low sending rate

2011-12-03 Thread Cliff Frey
you should be able to see where the packets are getting dropped. Look for error counters from ifconfig, and look at the drops handlers of each different element. If any of those is going up, that can point to what the problem is. you can actually try just running 'grep . /click/.e/*/drops' to

Re: [Click] Packet loss even at low sending rate

2011-12-03 Thread Cliff Frey
-install --thread=4 site7_router1.click thanks! best Bingyang On Sat, Dec 3, 2011 at 12:42 PM, Cliff Frey cl...@meraki.com wrote: ___ click mailing list click@amsterdam.lcs.mit.edu https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Re: [Click] Packet loss even at low sending rate

2011-12-03 Thread Cliff Frey
mature element, and there should not be a bug there. But the experiment results told me that something got wrong. Should I use a thread safe queue instead of queue, when I use multithreads? Thanks Bingyang Sent from my iPhone On Dec 4, 2011, at 12:31 AM, Cliff Frey cl...@meraki.com wrote

Re: [Click] Alignment issue

2011-11-18 Thread Cliff Frey
if you modify click-align.cc to specify that the FromOcteon element produces packets that are (4,2) aligned, then you won't get the extra Align() element. If you really want to do what you are asking for, you could likely add -DHAVE_INDIFFERENT_ALIGNMENT to CXXFLAGS/CFLAGS, but I'm not positive

Re: [Click] How can i relate to an element by it's name in the configuration file?

2011-10-25 Thread Cliff Frey
but what should i put on Router or context? Thanks On Tue, Oct 25, 2011 at 6:09 PM, Cliff Frey cl...@meraki.com wrote: You can use the cp_element function to do this. On Tue, Oct 25, 2011 at 5:08 AM, Xavier Salip saverion...@gmail.comwrote: Hi list, How can i relate to an element by it's

Re: [Click] Patchless click 2.0.1 on CentOS 6.0 (was: prepend net_device namespace for NETREG_REGISTERED)

2011-10-21 Thread Cliff Frey
You could try adding --disable-linux-symbols to the configure command... not sure if it'll fix the issue for you or not though. (this will break click packages... so if you need to use those, then this isn't the right fix) If that does fix it, then my guess is that the bug is in click-buildtool

Re: [Click] info about HandlerCall::call_read()

2011-10-11 Thread Cliff Frey
You can look at the HandlerCall interface if you really want to use read-handlers. Often in cases like this, it is easier to actually pass a pointer from one element to another through the config. ARPQuerier can do this with ARPTable, or etherswitch/spantree.cc does this as well. Search for

Re: [Click] info about HandlerCall::call_read()

2011-10-11 Thread Cliff Frey
, Oct 11, 2011 at 6:46 PM, Cliff Frey cl...@meraki.com wrote: You can look at the HandlerCall interface if you really want to use read-handlers. Often in cases like this, it is easier to actually pass a pointer from one element to another through the config. ARPQuerier can do

Re: [Click] [click]Problem compiling pathless click with own elements

2011-10-09 Thread Cliff Frey
I suspect that you have a local static variable in one of your elements... something like void MyElt::myfunc() { static String foo = foo; ... } and I believe that your compiler is adding guards around the initialization of that variable (in case multiple threads were to try to do it at the

Re: [Click] insmod: error inserting '/usr/local/lib/click.ko': -1 Cannot allocate memory

2011-10-05 Thread Cliff Frey
You could try adding BURST 10 or something to your FromDevice configuration and see if that makes a difference. You could also try changing tasks_per_iter (there is a top level handler, so you could add Script(write tasks_per_iter 300) to your config). I don't actually think that either of the

Re: [Click] dumb clicky graphs

2011-10-05 Thread Cliff Frey
I find that dot always does a terrible job whenever the graph contains a cycle. I recommend splitting up elements that generate responses to requests... so I would use a ccss file that has the following in it: ICMPPingResponder { port-split: both; } Cliff On Wed, Oct 5, 2011 at 11:12

Re: [Click] info on DATA field of InfiniteSource

2011-10-03 Thread Cliff Frey
-l /tmp/foo.pcap -rw-r--r-- 1 root root *24* 2011-10-03 09:17 /tmp/foo.pcap Cliff On Mon, Oct 3, 2011 at 6:56 AM, Luca Costantino luca.costant...@gmail.comwrote: 2011/9/30 Cliff Frey cl...@meraki.com: This works for me: click -e ' InfiniteSource(DATA packet contents here are ascii, LIMIT

Re: [Click] info on DATA field of InfiniteSource

2011-09-30 Thread Cliff Frey
This works for me: click -e ' InfiniteSource(DATA packet contents here are ascii, LIMIT 1, STOP true) - UDPIPEncap(192.168.1.2, 1000, 10.0.0.2, 2000) - IPPrint(PAYLOAD ascii) - Discard ' You could also look at FromIPSummaryDump to construct packets manually. Cliff On Fri, Sep 30, 2011 at 6:34

Re: [Click] pipes and double pipes in click configurations

2011-09-29 Thread Cliff Frey
The click language man page describes both single and double pipes quite well: man doc/click.5 I don't believe that clicky can auto-generate click configurations, but it is very useful for looking at a pre-built configuration. Cliff 2011/9/29 Luca Costantino luca.costant...@gmail.com hi

Re: [Click] How to use user-mode counter??

2011-09-22 Thread Cliff Frey
You can either add a ControlSocket element to your configuration, or run click with the -p argument to set up a control socket for you. You can then telnet to the control socket and read/write handlers that way. http://read.cs.ucla.edu/click/elements/controlsocket On Thu, Sep 22, 2011 at 7:08

Re: [Click] Custom aggregate element

2011-07-18 Thread Cliff Frey
For your first question, I'm not sure what is going on. It is important that the AggregateCounter is not frozen... perhaps by adding chatter calls to elements/analysis/aggcounter.cc you can get to the bottom of the issue. I'm not quite sure what you mean by this second point, but you could add a

Re: [Click] EtherSwitch and Tap Device

2011-07-17 Thread Cliff Frey
Can you please send the config that you are using? On Sun, Jul 17, 2011 at 6:21 AM, Hamid Farhadi qq119...@iii.u-tokyo.ac.jpwrote: Hi I wanna do this: Tap0 -EtherSwitch - Tap1 To do this I should use FromHost(Tap0). otherwise the switch does not forward my packets. once I use FromHost(), I

Re: [Click] Error: Write handler in RatedSource

2011-06-20 Thread Cliff Frey
Yes, I am the one responsible for this (broken) code, and I think that your assessment is correct, and that both the write handler and the configure() methods should be improved. Ideally we could add a testcase for it too... but it'll be ok without one. If you could make a patch and/or submit a

Re: [Click] VLAN - ARP proposal

2011-05-05 Thread Cliff Frey
Hi Lars, Here are elements that Meraki has used for this purpose. If you find them useful, we can likely commit them in to mainline click. https://github.com/clifffrey/click/tree/vlan-elements Cliff On Thu, May 5, 2011 at 9:23 AM, Bro, Lars lars@siemens.com wrote: Hi, list I am

Re: [Click] About queues scheduling

2011-04-22 Thread Cliff Frey
On Fri, Apr 22, 2011 at 12:59 AM, Roberto Riggio roberto.rig...@create-net.org wrote: Il 22/04/2011 09:31, Cliff Frey ha scritto: Oh yes, sorry for misunderstanding. We actually had issues with KernelTun. We ended up adding a BURST parameter to it. There are weird interactions between

Re: [Click] About queues scheduling

2011-04-20 Thread Cliff Frey
I would expect that you are _not_ CPU limited. This is what I would expect to see if FromDevice is just only rarely scheduled. If you are still worried about fairness, you can set the BURST parameter on FromDevice to be higher, but I really think that the issue is that FromDevice's task is not

[Click] To/FromUserDevice enhancements

2011-03-02 Thread Cliff Frey
Author: Cliff Frey cl...@meraki.com Date: Wed Mar 2 11:01:59 2011 (To/From)UserDevice: cleanups, fixups, features ToUserDevice is now much more configurable, supporting multiple encapsulation types (none, pcap, and length-delimited). It also supports acting like a datagram socket

Re: [Click] Conversion of threads

2011-02-24 Thread Cliff Frey
I wanted to benchmark the difference between ThreadSafeQueue and one-queue-per-thread + RoundRobinScheduler + Unqueue + another-Queue. However, I ended up finding a bug. This config: elementclass Foo { is :: InfiniteSource - [0] output; }; f0::Foo,f1::Foo,f2::Foo,f3::Foo,f4::Foo,f5::Foo -

Re: [Click] Conversion of threads

2011-02-24 Thread Cliff Frey
at the end of InfintieSource::run_task(). I don't know what's going on. Commenting out all notification does not help. Eddie On 2/24/11 8:12 AM, Cliff Frey wrote: I wanted to benchmark the difference between ThreadSafeQueue and one-queue-per-thread + RoundRobinScheduler + Unqueue + another

Re: [Click] click Digest, Vol 92, Issue 25

2011-02-22 Thread Cliff Frey
2011/2/21 Justok Jiang|蒋小可 justo...@gmail.com Dear all, I am sure If I could send email to this mailling-list when I have some Questions about Click. If It's not appropriate, Please skip this email; but I would be thanksful if some do me some favor to answer. Q. 1/ FromDevice(eth1)-

Re: [Click] click Digest, Vol 92, Issue 25

2011-02-22 Thread Cliff Frey
member... no checking whether skb_shinfo has a ufo_size member... for many times, maybe something was wrong, could you point it out or give me some clues? thx. 2011-02-23 -- Justok Jiang|蒋小可 -- *发件人:* Cliff Frey *发送时间:* 2011-02

Re: [Click] Question about cooperating elementclasses

2011-02-16 Thread Cliff Frey
I would say that this is a bug by some definition, but it is a very tricky one to solve. Specifically, even if you did change the queueing to be in arpquerier, you would still need a pointer back from arptable - arpquerier so that if an arp response came in on one querier that updated the

Re: [Click] Core performance checkins

2011-02-09 Thread Cliff Frey
I believe that I can reproduce this, give or take. if I use this click config: InfiniteSource - q1 :: ThreadSafeQueue(CAPACITY 10) - rs :: RatedUnqueue(RATE 1000) - q :: ThreadSafeQueue(CAPACITY 1) - uq :: Unqueue - c :: Counter - d :: Discard; Script(wait 3, print $(c.count) $(uq.scheduled)

Re: [Click] PUSH processed element with timer not working

2011-02-07 Thread Cliff Frey
Yes, you either need to call push() from your run_timer method, or you need to schedule a task, and have the task call push(). However, you can only call push if you have a packet, so one of those methods would need to create a packet first (either by pulling from a pull input, or by creating a

Re: [Click] Memory allocation

2011-02-07 Thread Cliff Frey
On Mon, Feb 7, 2011 at 9:29 AM, Eddie Kohler koh...@cs.ucla.edu wrote: Try CLICK_LALLOC(size) and CLICK_LFREE(pointer, size), which allow larger allocations than operator new. 'git grep LALLOC' But you may just be doomed. It is not generally possible to allocate GBs in the kernel as far

Re: [Click] Graft ports

2011-01-28 Thread Cliff Frey
Eddie very recently made changes to the parser, allowing for new syntax and types of connections, so I would look at his recent commits. Cliff On Fri, Jan 28, 2011 at 11:05 AM, Philip Prindeville philipp_s...@redfish-solutions.com wrote: On 1/21/11 6:48 PM, Eddie Kohler wrote: On 01/21/2011

Re: [Click] Help, about handler

2011-01-19 Thread Cliff Frey
Hi Chuan, Assuming that you are running click in userlevel, you should look at the ControlSocket element. It will open up a socket that you can connect to and send commands to. Cliff On Wed, Jan 19, 2011 at 4:58 AM, wubaochuan wubaoch...@seu.edu.cn wrote: Hi all, I am using user level

Re: [Click] Help, about handler

2011-01-19 Thread Cliff Frey
Can you telnet to that port with the command telnet 127.0.0.1 1234 or telnet 10.3.16.138 1234 or echo read config | nc localhost 1234 ? This will help us see if the problem is with your client.c or with the way you are running click. I can connect to a control socket by running the

Re: [Click] Scoping/naming issues

2011-01-17 Thread Cliff Frey
I actually really like this property of elementclasses. Specifically, an elementclass is a substitute for an element. In cases like you describe Philip, i end up writing configs like: elementclass MyNull { input - output; } // input/output 0: internet // input/output 1: LAN elementclass

Re: [Click] Scoping/naming issues

2011-01-17 Thread Cliff Frey
of a pipeline in one other elementclass (for IP packets); (2) needs to be plumbed to the outputs of several instances of the above elementclass (for the ARP packets); Maybe I'm missing something in what you're saying. On 1/17/11 6:09 PM, Cliff Frey wrote: I actually really like this property

Re: [Click] Random changes

2011-01-05 Thread Cliff Frey
Thank you for the feedback. I pushed both of these changes to mainline. Cliff On Wed, Jan 5, 2011 at 6:30 AM, Ian Rose ianr...@eecs.harvard.edu wrote: I agree! I wrote something (functionally) similar for my own use and found it very helpful (but this patch is much cleaner and simpler).

[Click] Random changes

2011-01-04 Thread Cliff Frey
/cd08cd8b7a14310d029ab6911c701a6c1b1cdd0b https://github.com/clifffrey/click/commit/6e5677a840ecd4991417335834c020ffd58099b0 commit 6e5677a840ecd4991417335834c020ffd58099b0 Author: Cliff Frey cl...@meraki.com Date: Tue Jan 4 21:51:42 2011 Add easy-to-use userlevel backtrace debugging. If you run click

Re: [Click] confparse bug?

2010-12-03 Thread Cliff Frey
Thanks for the report! The function prototype for configure was wrong. I just committed the fix to mainline. On Fri, Dec 3, 2010 at 11:19 AM, Roman Chertov rcher...@cs.ucsb.edu wrote: I am using Click that I pulled from git yesterday, and there is an interesting problem with confparse. I

Re: [Click] patchless click patches

2010-11-16 Thread Cliff Frey
I'm not sure at all what the current best-guess set of patches is to make patchless fully work. I cobbled together enough patches from the list and did very very basic testing on my machine, and came up with this branch https://github.com/clifffrey/click/tree/working-fromhost-fixincludes It

Re: [Click] patchless click patches

2010-11-16 Thread Cliff Frey
see call back trace I'll have a look. Joonwoo. On Tue, Nov 16, 2010 at 10:23 PM, Cliff Frey cl...@meraki.com wrote: I'm not sure at all what the current best-guess set of patches is to make patchless fully work. I cobbled together enough patches from the list and did very very basic

Re: [Click] Alignment info for custom element

2010-11-09 Thread Cliff Frey
Well, you could make it so that click-align knew that there were no alignment guarantees after your element (assuming that your element actually does not provide any alignment guarantees) I think that you would do this by adding a clause in click-align.cc with your element and

Re: [Click] userlevel performance

2010-10-28 Thread Cliff Frey
I don't have a setup that I can easily/quickly use to test. All the same, I'm curious what the interface statistics do during this time on both of the interfaces (i.e. any errors? how many packets transmitted/received) Also, I'm curious what was going on inside of ToDevice and FromDevice. The

Re: [Click] query about handlers

2010-10-22 Thread Cliff Frey
I have some elements that can be useful for this (basically Get/Set/StoreEtherAddress elements to go along with Get/Set/StoreIPAddress elements). You are welcome to take them from here: http://github.com/clifffrey/click/tree/add-get-set-etheraddress If other people on the list would find them

Re: [Click] git head compile error

2010-10-20 Thread Cliff Frey
Xianghua, Thank you for this report, the compile issue that you found should be fixed. Cliff On Wed, Oct 20, 2010 at 1:32 PM, Xianghua Xiao xiaoxiang...@gmail.comwrote: make[1]: Entering directory `/home/xxiao/devel/misc/click/userlevel' CXX ../lib/master.cc ../lib/master.cc: In member

Re: [Click] [Patch] fix endianess in radiotap encap

2010-10-15 Thread Cliff Frey
It sure looks reasonable to me. I'm not actually using the element personally... the cpu_to_leXX changes should all be no-ops on x86, which is likely the only architecture that this has been tested on before... I don't know about the retries part... I might lean towards setting it to

Re: [Click] Race condition with FullNoteQueue signaling in multithreading

2010-10-13 Thread Cliff Frey
I am getting the stuck behavior that Beyers describes. However if I add the script, the problem for the most part goes away. Specifically, if I use this config: // is1::InfiniteSource(DATA \00 00 c0 ae 67 ef 00 00 00 00 00 00 08 00,

[Click] add TCPFragmenter element

2010-09-29 Thread Cliff Frey
I am planning on adding this element to click. If anyone has any comments/feedback on it, let me know. Cliff From 1e1a52e7aa6aa08e362210ba705bac7ca0d5e134 Mon Sep 17 00:00:00 2001 From: Cliff Frey cl...@meraki.com Date: Wed, 29 Sep 2010 15:55:10 -0700 Subject: [PATCH] add TCPFragmenter element

Re: [Click] empty queue

2010-08-20 Thread Cliff Frey
to bypass this difficulty? --- Στις *Πέμ., 19/08/10, ο/η Cliff Frey cl...@meraki.com* έγραψε: Από: Cliff Frey cl...@meraki.com Θέμα: Re: [Click] empty queue Προς: Harald Schioeberg har...@net.t-labs.tu-berlin.de Κοιν.: Panos Μatzakos magic_pa...@yahoo.gr, cl...@pdos.csail.mit.edu Ημερομηνία

Re: [Click] empty queue

2010-08-19 Thread Cliff Frey
I agree with Harald, TimedSource might not be able to fill up a Queue as fast as you think in CPU bound cases. Specifically if you look at timedsource.cc, you can see that it pushes at most one packet per timer-execution, and then schedules another timer for the future (even if TimedSource is

Re: [Click] Question about Element functions

2010-07-18 Thread Cliff Frey
Elements such as ConfParseTest are used exclusively for unit testing running git grep -i confparsetest in the click checkout will show you where it is used, specifically test/standard/confparse-01.testie is a test that uses that element You can run the test with: ./test/testie

Re: [Click] Queue Memory Allocation: vmalloc or kmalloc

2010-07-01 Thread Cliff Frey
if you look at click/lib/glue.cc at the implementation of click_lalloc, you can see that it will use vmalloc for allocations that are larger than 128kb, so that would be queue size of 32k for 32 bit machines, or 16k for 64 bit machines. I don't believe that ThreadSafeQueue is necessary as long as

Re: [Click] Queue Memory Allocation: vmalloc or kmalloc

2010-07-01 Thread Cliff Frey
CLICK_LALLOC_MAX_SMALL 131072 to # define CLICK_LALLOC_MAX_SMALL 99 and it's a 64bit kernel, do we expect a problem here? Thanks, On Thu, Jul 1, 2010 at 5:01 PM, Cliff Frey cl...@meraki.com wrote: if you look at click/lib/glue.cc at the implementation of click_lalloc, you can see

Re: [Click] Scheduling ToDevice

2010-06-01 Thread Cliff Frey
Perhaps you could add a BURST-type parameter to FromDevice to allow it to process multiple packets at once, therefore favoring receive? I'm not sure how easily this could be done while making sure that the fromdevice.cc code doesn't block... but perhaps it is as easy as changing the 1 argument to

Re: [Click] FW: LLRPC Examples

2010-05-14 Thread Cliff Frey
look at the documentation for ControlSocket http://read.cs.ucla.edu/click/elements/controlsocket http://read.cs.ucla.edu/click/elements/controlsocketAlthough I'm curious why you are interested in the LLRPC mechanism. It is generally much easier to use read, write, or read+param handlers to

Re: [Click] LLRPC Examples

2010-05-14 Thread Cliff Frey
Thanks, Patricio *From:* Cliff Frey [mailto:cl...@meraki.com] *Sent:* Friday, May 14, 2010 11:01 AM *To:* Sanhueza, Patricio *Subject:* Re: [Click] LLRPC Examples look at the documentation for ControlSocket http://read.cs.ucla.edu/click/elements/controlsocket Although I'm curious why

Re: [Click] Names of elementclass instances in the elementclass

2010-04-07 Thread Cliff Frey
I believe that the config, exactly as you pasted it, will work just fine. Specifically, if in MyElement::configure(), you use cp_va_kparse with cpElementCast, 0, MyOtherElement, _other_elt_ptr, then I believe that you will see exactly the effect that you want. When searching for the element

Re: [Click] ARP requests being implicit advertisements

2010-04-06 Thread Cliff Frey
} -- sniffs ARP sender info * Cliff Frey * * Copyright (c) 2009 Meraki, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the Software), * to deal in the Software without restriction, subject

Re: [Click] profiling / debugging tools or tips?

2010-03-17 Thread Cliff Frey
click already supports exactly what you are talking about! if you configure it with ./configure --enable-stats=2 then every element is given a 'cycles' read handler. However, using generic profiling tools is likely to also give you feedback (with much lower overhead). Perhaps take a look at

Re: [Click] Script element

2010-03-11 Thread Cliff Frey
First the click configuration is loaded. This means that all elements are created (including all Script elements) and configured and initialized. At this point, the click configuration is considered to be loaded. Then tasks are allowed to run. In your example, the Source element, UnQueue

Re: [Click] Record queue length overtime

2010-03-08 Thread Cliff Frey
. Btw, can you give me any advices on the exponential or poisson arrival rate source? Jimmy On Mon, Mar 8, 2010 at 2:06 AM, Cliff Frey cl...@meraki.com wrote: You can easily do that with a Script element... you could use either 'read' or 'print' to display the data. If you wanted even

Re: [Click] Record queue length overtime

2010-03-07 Thread Cliff Frey
You can easily do that with a Script element... you could use either 'read' or 'print' to display the data. If you wanted even more control, you could add a ControlSocket to your config and then write a script that would access the ControlSocket. Here is an example script element that should do

Re: [Click] Click userlevel performance issues

2010-03-06 Thread Cliff Frey
I'd be curious what the system and interrupt times were on the various machines. Perhaps there is more linux kernel overhead in the different configurations. These numbers likely show up in top, or you can read raw values from /proc/stat and see how they are changing. Cliff On Sat, Mar 6, 2010

Re: [Click] AGNOSTIC vs. PUSH/PULL

2010-03-01 Thread Cliff Frey
Jesse, Generally simple_action() is only used for elements with exactly one input and one or two outputs. If you want to make an element that maps many-to-many, then you would need to define push() and/or pull() methods. There is no need to override the simple_action method if you override

Re: [Click] Problem with structure

2010-02-10 Thread Cliff Frey
The problem is that you defined a constructor method, but didn't give it a body. inline VlanTables::PortInfo::PortInfo(bool _trunk,bool _active,VLANPORT_Table _vlan) :trunk(_trunk),active(_active),vlan(_vlan) *{ /* must have empty body here */ }* In general though, you should probably

Re: [Click] Elements interconnection

2010-02-08 Thread Cliff Frey
you need to use cpElementCast rather than cpElement, see arpquerier.cc for an example. On Mon, Feb 8, 2010 at 8:39 AM, David Sesmero Sáez deivid_se...@hotmail.com wrote: Hi! I'm trying to pass one element into other element for using some functions of the element in the other element.. My

Re: [Click] Internal Handlers

2010-02-01 Thread Cliff Frey
Take a look at click/elements/standard/counter.cc to see a simple example of one element that uses a handler of another... you can pass the handlers as config parameters of your elements. In some cases, it can be easier to just pass the element itself... For instance you can pass an ARPTable

Re: [Click] Alignment problem on ARM

2010-01-26 Thread Cliff Frey
Could this issue be related to the fact that the interface that i'm using is a wireless interface running in monitor mode (madwifi driver)? Yes, this could definitely be related to the issue. As I said, I believe that click assumes that all FromDevice elements will always push packets with 4

Re: [Click] Problem with click fake-router.click and delay elements

2010-01-21 Thread Cliff Frey
Without knowing anything for sure, I suspect that your ethernet driver has a bug in the transmit side when transmitting traffic faster than the wire rate. You could try a configuration like InfiniteSource(LENGTH 1000) - EtherEncap(...) - Queue - ToDevice; and I imagine that you would see the

Re: [Click] Alignment problem on ARM

2010-01-21 Thread Cliff Frey
a ShifterAligner. Cliff On Thu, Jan 21, 2010 at 1:59 PM, Roberto Riggio roberto.rig...@create-net.org wrote: Actually wifidecal pulls 8 bytes (wifi header + llc) and pushes 14 bytes (ethernet header), shouldn't this require the 2 bytes offset Align(4 2)? R. On 01/21/2010 07:24 PM, Cliff

Re: [Click] Use of READ_PARAM ?

2010-01-11 Thread Cliff Frey
Yes, it is possible, that is exactly what READ_PARAM is for. I just looked through the click elements/ source code for READ_PARAM to find an example... I would look at elements/ip/iproutetable.cc:lookup_handler in the most recent git sources for an example. Cliff On Mon, Jan 11, 2010 at 2:29

Re: [Click] One question about configuration time!

2010-01-04 Thread Cliff Frey
You need to run tests and see for yourself. Clearly it depends on the size of the configuration as well. I know that we end up loading a very large click configuration (~2000 click elements) on a 200MHz mips device in approximately 1 second. If super fast configuration changes are required, you

Re: [Click] NAT Latency Measurement

2009-12-17 Thread Cliff Frey
Do you really care about latency? Or just overall performance (which is limited by the sum of the per-element latency)? Are these measurements when _new_ mappings are being created or using existing mappings? Are these packets unique already? or is expensive_uniquify being called? You can try

Re: [Click] High CPU usage with BandwidthShaper Element

2009-12-14 Thread Cliff Frey
The easiest way I have gotten around this is to use LinkUnqueue instead (It is not exactly a drop-in replacement though, as it is pull-to-push). However it would also be possible to set up a timer in the BandwidthShaper element and put the task to sleep. Cliff On Mon, Dec 14, 2009 at 9:39 AM,

Re: [Click] click element handlers

2009-12-08 Thread Cliff Frey
The way Roberto suggests is the highest-performance option. (pass one element as a configuration parameter to another element) If you want to actually use a read handler, look at the HandlerCall class... and the cpHandlerCallRead definition in confparse.hh... and it should be fairly easy to set

Re: [Click] click optimize efficiency

2009-11-29 Thread Cliff Frey
but not the softirq? I can't distinguish between irq and softirq at driver , FromDevice and ToDevice. 2009/11/29 Cliff Frey cl...@meraki.com 56% softirq implies to me that 56% of the time is spent in the packet receive functions in your ethernet or wireless driver as click should not be running

Re: [Click] click optimize efficiency

2009-11-24 Thread Cliff Frey
Your config looks reasonable to me. How are you measuring performance? I know if you are running TCP on the devices as well (if you are testing tcp-to-the-device rather than forwarding perfomance) that can slow things down (because of TCP checksumming and because linux will keep a copy of every

Re: [Click] Using userlevel-click to forward packet

2009-11-19 Thread Cliff Frey
Luca, You need to add a FromHost element to your config which will receive packets from Linux, and a ToHost element that will deliver packets to Linux. Cliff On Thu, Nov 19, 2009 at 10:10 AM, Luca Belforte luca.belfo...@student.uclouvain.be wrote: I put here my click configuration I'm

Re: [Click] Using userlevel-click to forward packet

2009-11-19 Thread Cliff Frey
, 2009 at 10:48 AM, Luca Belforte luca.belfo...@student.uclouvain.be wrote: Hello Cliff, thanks, this sound what i was searching for. (Strange that the xorp generator script doesn't use it) Did you have an example on how i can configure it? Thanks Luca Cliff Frey wrote: Luca, You

Re: [Click] Silly question about dynamic classification request

2009-08-26 Thread Cliff Frey
With some work, you can change Classifier/IPFilter/IPClassifier to be reconfigurable, which might allow this to be possible. I have always done this sort of task by writing my own element, but I'm not exactly sure what you want to do. Cliff On Wed, Aug 26, 2009 at 6:39 AM, blues man

Re: [Click] finding pullers downstream

2009-08-26 Thread Cliff Frey
I would look at click/lib/notifier.cc:downstream_full_signal for an example of using Router::downstream_elements(...), which could likely do what you want.. However given your actual end goal, I think that you might want to do this a different way I would wonder if

  1   2   >