From llong_li at 163.com Sat Jun 8 03:33:16 2013 From: llong_li at 163.com (albert) Date: Sat, 08 Jun 2013 15:33:16 +0800 Subject: [Click] can not ping with a simple switch config Message-ID: <51B2DE3C.5030003@163.com> Dear all, I have a simple switch with EtherSwitch, as follows: 1 switch :: EtherSwitch; 2 3 queue1 :: Queue; 4 queue2 :: Queue; 5 queue3 :: Queue; 6 queue4 :: Queue; 7 8 FromDevice(eth6) -> [0]switch; 9 FromDevice(eth7) -> [1]switch; 10 FromDevice(eth8) -> [2]switch; 11 FromDevice(eth9) -> [3]switch; 12 13 switch[0] -> queue1 -> ToDevice(eth6); 14 switch[1] -> queue2 -> ToDevice(eth7); 15 switch[2] -> queue3 -> ToDevice(eth8); 16 switch[3] -> queue4 -> ToDevice(eth9); I have four servers h1, h2, h3, h4 connect to eth6, eth7, eth8 and eth9 of click host respresently. When I ping h2 from h1, the screen tells that the destination is unreachale. But when I start tcpdump on eth6 and eth7, then I can ping h2 successufully. Is there any ideas about that? Thanks anyway. From cliff at meraki.net Sat Jun 8 09:15:58 2013 From: cliff at meraki.net (Cliff Frey) Date: Sat, 8 Jun 2013 09:15:58 -0400 Subject: [Click] can not ping with a simple switch config In-Reply-To: <51B2DE3C.5030003@163.com> References: <51B2DE3C.5030003@163.com> Message-ID: <3B60B821-146D-4368-842D-B84242D207CF@meraki.net> Add "PROMISC true" to the FromDevice elements On Jun 8, 2013, at 3:33 AM, albert wrote: > Dear all, > I have a simple switch with EtherSwitch, as follows: > > 1 switch :: EtherSwitch; > 2 > 3 queue1 :: Queue; > 4 queue2 :: Queue; > 5 queue3 :: Queue; > 6 queue4 :: Queue; > 7 > 8 FromDevice(eth6) -> [0]switch; > 9 FromDevice(eth7) -> [1]switch; > 10 FromDevice(eth8) -> [2]switch; > 11 FromDevice(eth9) -> [3]switch; > 12 > 13 switch[0] -> queue1 -> ToDevice(eth6); > 14 switch[1] -> queue2 -> ToDevice(eth7); > 15 switch[2] -> queue3 -> ToDevice(eth8); > 16 switch[3] -> queue4 -> ToDevice(eth9); > > > I have four servers h1, h2, h3, h4 connect to eth6, eth7, eth8 and eth9 > of click host respresently. > When I ping h2 from h1, the screen tells that the destination is > unreachale. > > But when I start tcpdump on eth6 and eth7, then I can ping h2 successufully. > > Is there any ideas about that? > > Thanks anyway. > > > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click From llong_li at 163.com Wed Jun 12 04:06:29 2013 From: llong_li at 163.com (llong_li) Date: Wed, 12 Jun 2013 16:06:29 +0800 Subject: [Click] Error in getting queue size References: <51B2DE3C.5030003@163.com>, <3B60B821-146D-4368-842D-B84242D207CF@meraki.net> Message-ID: <201306121606276240467@163.com> Dear all: I create a click element named AF to get the size of a queue element In the implementation file, I override the simple_action method as follows: Packet * simple_action(Packet *p) { uint32_t _qlen = queue_size() ; //and something else just as in the EtherSwitch element. } where the method queue_size is defined as follows: uint32_t queue_size() const{ if(_queue1){ if(_queue1->size() != 0) click_chatter("_queue1->size: %d\n", _queue1->size()); return _queue1->size(); } else{ int s = 0; for(int i = 0; i < _queues.size(); i++) s += _queues[i]->size(); return s; } I have a similar initialization like the RED element to initialize the _queues/_queue1 . And the configuration files is as follows: switch :: EtherSwitch; queue1 :: Queue queue2 :: Queue queue3 :: Queue queue4 :: Queue FromDevice(eth6, PROMISC true) -> [0]switch; FromDevice(eth7, PROMISC true) -> [1]switch; FromDevice(eth8, PROMISC true) -> [2]switch; FromDevice(eth9, PROMISC true) -> [3]switch; switch[0] -> AF -> queue1 -> ToDevice(eth6); switch[1] -> AF -> queue2 -> ToDevice(eth7); switch[2] -> AF -> queue3 -> ToDevice(eth8); switch[3] -> AF -> queue4 -> ToDevice(eth9); In my configuration, eth6~eth8 are connected to host 1, 2, 3, and 4 I start iperf test (UDP) on my servers, host 1 and 3 as the client and host2 as the server, none on host4. h1: iperf3 -u -c h2 -b 1000m h3: iperf3 -u -c h2 -b 1000m -p 5202. The screen output that the queue size is 0, and sometimes 1. In my opinion, the queue's input rate is 2x larger than the output rate, so the queue size should increase continuous, util the queue overflow. But the screen output is different. Are there any wrong with configuration or implementation. Thanks. From ekohler at gmail.com Wed Jun 12 09:18:53 2013 From: ekohler at gmail.com (Eddie Kohler) Date: Wed, 12 Jun 2013 09:18:53 -0400 Subject: [Click] Error in getting queue size In-Reply-To: <201306121606276240467@163.com> References: <51B2DE3C.5030003@163.com> <3B60B821-146D-4368-842D-B84242D207CF@meraki.net> <201306121606276240467@163.com> Message-ID: Hi, The queue will only grow if the input rates are greater than the output CAPACITY. And this might not be the case; maybe iperf3 isn't generating traffic as fast as you think. Counter can tell you the actually observed input rates, as can Linux settings. Eddie On Wed, Jun 12, 2013 at 4:06 AM, llong_li wrote: > Dear all: > > I create a click element named AF to get the size of a queue element > In the implementation file, I override the simple_action method as follows: > > Packet * > simple_action(Packet *p) { > uint32_t _qlen = queue_size() ; > //and something else just as in the EtherSwitch element. > } > where the method queue_size is defined as follows: > uint32_t > queue_size() const{ > if(_queue1){ > if(_queue1->size() != 0) > click_chatter("_queue1->size: %d\n", _queue1->size()); > return _queue1->size(); > } > else{ > int s = 0; > for(int i = 0; i < _queues.size(); i++) > s += _queues[i]->size(); > return s; > } > > I have a similar initialization like the RED element to initialize the > _queues/_queue1 . > And the configuration files is as follows: > switch :: EtherSwitch; > queue1 :: Queue > queue2 :: Queue > queue3 :: Queue > queue4 :: Queue > FromDevice(eth6, PROMISC true) -> [0]switch; > FromDevice(eth7, PROMISC true) -> [1]switch; > FromDevice(eth8, PROMISC true) -> [2]switch; > FromDevice(eth9, PROMISC true) -> [3]switch; > > switch[0] -> AF -> queue1 -> ToDevice(eth6); > switch[1] -> AF -> queue2 -> ToDevice(eth7); > switch[2] -> AF -> queue3 -> ToDevice(eth8); > switch[3] -> AF -> queue4 -> ToDevice(eth9); > > > In my configuration, eth6~eth8 are connected to host 1, 2, 3, and 4 > I start iperf test (UDP) on my servers, host 1 and 3 as the client and > host2 as the server, none on host4. > h1: iperf3 -u -c h2 -b 1000m > h3: iperf3 -u -c h2 -b 1000m -p 5202. > > The screen output that the queue size is 0, and sometimes 1. > > In my opinion, the queue's input rate is 2x larger than the output rate, > so the queue size should increase continuous, util the queue overflow. But > the screen output is different. > Are there any wrong with configuration or implementation. > > Thanks. > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > From llong_li at 163.com Wed Jun 12 21:54:02 2013 From: llong_li at 163.com (llong_li) Date: Thu, 13 Jun 2013 09:54:02 +0800 Subject: [Click] Error in getting queue size References: <51B2DE3C.5030003@163.com> <3B60B821-146D-4368-842D-B84242D207CF@meraki.net> <201306121606276240467@163.com>, Message-ID: <201306130954007684414@163.com> Hi Eddie, Thanks for you response. I print out the message in /proc/click/... such as queue length and packet bit rate. As a result, the queue length is about 25. And the sum bit rate of the two input port is somewhat equal to the bit rate of the output one; But I am wonder, why it is that. In my point of view, the two input port will saturate the one output port? Is there something wrong with my opinion? llong_li From: Eddie Kohler Date: 2013-06-12 21:18 To: llong_li CC: click at pdos.csail.mit.edu Subject: Re: [Click] Error in getting queue size Hi, The queue will only grow if the input rates are greater than the output CAPACITY. And this might not be the case; maybe iperf3 isn't generating traffic as fast as you think. Counter can tell you the actually observed input rates, as can Linux settings. Eddie On Wed, Jun 12, 2013 at 4:06 AM, llong_li wrote: Dear all: I create a click element named AF to get the size of a queue element In the implementation file, I override the simple_action method as follows: Packet * simple_action(Packet *p) { uint32_t _qlen = queue_size() ; //and something else just as in the EtherSwitch element. } where the method queue_size is defined as follows: uint32_t queue_size() const{ if(_queue1){ if(_queue1->size() != 0) click_chatter("_queue1->size: %d\n", _queue1->size()); return _queue1->size(); } else{ int s = 0; for(int i = 0; i < _queues.size(); i++) s += _queues[i]->size(); return s; } I have a similar initialization like the RED element to initialize the _queues/_queue1 . And the configuration files is as follows: switch :: EtherSwitch; queue1 :: Queue queue2 :: Queue queue3 :: Queue queue4 :: Queue FromDevice(eth6, PROMISC true) -> [0]switch; FromDevice(eth7, PROMISC true) -> [1]switch; FromDevice(eth8, PROMISC true) -> [2]switch; FromDevice(eth9, PROMISC true) -> [3]switch; switch[0] -> AF -> queue1 -> ToDevice(eth6); switch[1] -> AF -> queue2 -> ToDevice(eth7); switch[2] -> AF -> queue3 -> ToDevice(eth8); switch[3] -> AF -> queue4 -> ToDevice(eth9); In my configuration, eth6~eth8 are connected to host 1, 2, 3, and 4 I start iperf test (UDP) on my servers, host 1 and 3 as the client and host2 as the server, none on host4. h1: iperf3 -u -c h2 -b 1000m h3: iperf3 -u -c h2 -b 1000m -p 5202. The screen output that the queue size is 0, and sometimes 1. In my opinion, the queue's input rate is 2x larger than the output rate, so the queue size should increase continuous, util the queue overflow. But the screen output is different. Are there any wrong with configuration or implementation. Thanks. _______________________________________________ click mailing list click at amsterdam.lcs.mit.edu https://amsterdam.lcs.mit.edu/mailman/listinfo/click From nsclick at gmx.de Thu Jun 13 07:20:17 2013 From: nsclick at gmx.de (nsclick at gmx.de) Date: Thu, 13 Jun 2013 13:20:17 +0200 (CEST) Subject: [Click] elements/ip/lineariplookup.cc --> _last_addr Message-ID: Hello, in the file elements/ip/lineariplookup (https://github.com/patsgit/Click-OLSR/blob/master/elements/ip/lineariplookup.cc Line: 219) there is a variable _last_entry and also a variable _last_addr. Could someone please tell me what these variables are for? What ist the last_entry and last_addr in this context? Thanks, Thomas From pradeep_addada at yahoo.co.in Sun Jun 16 05:58:21 2013 From: pradeep_addada at yahoo.co.in (Pradeep Pradeep) Date: Sun, 16 Jun 2013 17:58:21 +0800 (SGT) Subject: [Click] FW: Pradeep Pradeep Message-ID: <1371376701.98348.YahooMailNeo@web192405.mail.sg3.yahoo.com> wer http://www.frog-systems.de/tfjzas/enrgljafcrqjb/uyezpurpcun/zkjophhdk.php Pradeep Pradeep From pradeep_addada at yahoo.co.in Sun Jun 16 06:00:04 2013 From: pradeep_addada at yahoo.co.in (Pradeep Pradeep) Date: Sun, 16 Jun 2013 18:00:04 +0800 (SGT) Subject: [Click] FW: Pradeep Pradeep Message-ID: <1371376804.10043.YahooMailNeo@web192404.mail.sg3.yahoo.com> wer http://selfhelped.net/hrdyyw/tfmpbffbm/ptmmbgie/fykcqcbgzrqdtq.php Pradeep Pradeep From momina.azam at gmail.com Sun Jun 16 14:05:08 2013 From: momina.azam at gmail.com (Momina Khan) Date: Sun, 16 Jun 2013 23:05:08 +0500 Subject: [Click] How to call handlers of elements declared in a .click file from another element. Message-ID: Hi, I need to call live_reconfigure handlers of elements A and B (to differentiate) declared in my configuration file from inside another element C. element C has to call live_reconfigure on elements A and C periodically after every timescale x. However i cannot seem to find a way to give the references of classes A and B to class C. Since all are independently declared in the .click configuration file. I tried element->router() and thought that if i got the router reference pointer i could find other elements registered with the same router using the router->find() method but element->router() returns a NULL. If i am thinking in the wrong direction plz correct me. thank you! momina From bcronje at gmail.com Sun Jun 16 16:49:12 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Sun, 16 Jun 2013 22:49:12 +0200 Subject: [Click] How to call handlers of elements declared in a .click file from another element. In-Reply-To: References: Message-ID: Hi, I think you can only call router()->find() from the initialize and later state, so you are probably calling this during constructor or configure phase? The are a number of ways to gain access to other elements inside your code: 1) Use Router::find() or Router::visit_upstream() or Router::visit_downstream(). Here are a couple of examples how this is used, see the initialize functions: https://github.com/kohler/click/blob/5c0455ad6400007ae7eaa41d689918f5635ff79a/elements/local/tcpconn.cc https://github.com/kohler/click/blob/5c0455ad6400007ae7eaa41d689918f5635ff79a/etc/ron/discardnotify.cc 2) You can pass an element as an argument inside you click configuration file to another element. You read this argument in the configure() function and get a pointer to the element. Use ElementArg(). See following for example of cp_element: https://github.com/kohler/click/blob/5c0455ad6400007ae7eaa41d689918f5635ff79a/elements/analysis/aggregateipflows.cc 3) Pass in the handler as configuration argument. Use HandlerCall class: https://github.com/kohler/click/blob/5c0455ad6400007ae7eaa41d689918f5635ff79a/include/click/handlercall.hh Hope this helps. Beyers On Sun, Jun 16, 2013 at 8:05 PM, Momina Khan wrote: > Hi, > > I need to call live_reconfigure handlers of elements A and B (to > differentiate) declared in my configuration file from inside another > element C. > > element C has to call live_reconfigure on elements A and C periodically > after every timescale x. However i cannot seem to find a way to give the > references of classes A and B to class C. Since all are independently > declared in the .click configuration file. > > I tried element->router() and thought that if i got the router reference > pointer i could find other elements registered with the same router using > the router->find() method but element->router() returns a NULL. > If i am thinking in the wrong direction plz correct me. > > thank you! > momina > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click >