From piotr.jerzy.jurkiewicz at gmail.com Thu May 2 06:05:19 2013 From: piotr.jerzy.jurkiewicz at gmail.com (Piotr Jurkiewicz) Date: Thu, 2 May 2013 12:05:19 +0200 Subject: [Click] Quagga to Click interface for routes pushing Message-ID: I am a MSc student at AGH University of Science and Technology, Krakow, Poland. We are using Click in many research projects here. It is a really great tool. However, as you may know, there is a problem with using dynamic routing protocols together with Click. There are two widespread open source routing protocols daemons: XORP and Quagga. XORP has built in Click support, but integrating it with Click is pretty tricky. Many users are unable to cope with that (basing on opinions found on forums and mailing lists). Quagga is more popular and better maintained suit from XORP. But it lacks of Click support. Last time Quagga has introduced FIB push interface ( http://www.nongnu.org/quagga/docs/docs-info.html#zebra-FIB-push-interface). It could be used for pushing routing information to the (hardware or software) dataplane. Quagga is participating this year in Google Summer of Code. Therefore, I came up with the idea of implementing Quagga -> Click interface as my GSoC project. The plan for now is as follows: - create Click element which will accept connection from Quagga interface, for example: "QuaggaSocket(IPRouteTable rt)" - the element will receive route updates from Quagga and update table rt inside the Click - this will work in case of userlevel Click In case of kernel Click I plan as follows: - implement ability for pushing FIB data through the file socket (in addition to existing TCP socket support) in Quagga's FIB push interface - element "QuaggaSocket(IPRouteTable rt)" in case of kernel will receive data from Quagga through the handler (file in /click filesystem which will Quagga write into) I have already submitted that idea to Quagga developers and I received a moderate enthusiasm. I am very keen on this idea. I think that the implementation of Click -> Quagga interface could be very profitable for both. The choice of the accepted projects will be made by Quagga maintainers. Therefore, I would be very grateful if you could support my proposal. For example you could write a post on the Quagga dev mailing list supporting the idea: http://lists.quagga.net/pipermail/quagga-dev/2013-April/010490.html You can found my proposal here: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/piotrjurkiewicz/1 From latencybuster at gmail.com Sat May 11 00:23:08 2013 From: latencybuster at gmail.com (Neel Sheyal) Date: Sat, 11 May 2013 00:23:08 -0400 Subject: [Click] FileReader and Pattern Matching with Click Message-ID: Hi All, I want to use click to create a distributed pattern matching and messaging system. The starting point is a series of Syslog messages. Since Click does not have an inbuilt Syslog (AFAIK) element, I am dumping all the Syslog messages to a file index first. Then, I am asking Click to read each line of the Syslog content, convert it to a packet that passes through my PatternMatcher element . Here is what I am trying to do and failing: 1. FromSyslogFile() -> EtherEncap(..) -> UDPIPEncap(..) -> ToDump() EherEncap is correctly putting the Ethernet header but UDPIPEncap() is not doing anything.. How do I put Ethernet/IP/UDP header to my data that I am reading from my file using the element (created by me) FromSyslogFile()? 2. Suppose Step 1 succeeds i.e. I have the packet with the Syslog data in the payload, I am now want it to pass through my element, StringClassifer(, ,..). I am using the C++ lib re2( https://code.google.com/p/re2/) inside my StringClassifier class for pattern matching. Is this the correct/recommended approach to pattern matching at Layer7? Thanks, NeelSheyal From rajamhayek at yahoo.com Sat May 11 00:43:33 2013 From: rajamhayek at yahoo.com (R H) Date: Fri, 10 May 2013 21:43:33 -0700 (PDT) Subject: [Click] FileReader and Pattern Matching with Click Message-ID: <1368247413.11332.androidMobile@web161006.mail.bf1.yahoo.com> Hi Neel, Syslog can forward its messages to an external server, so you may be able to have click listen on a tcp or udp socket and receive the syslog messages directly. For example, in rsyslog adding something like: #forward all to tcp address *.*?? @@ip:port Or #forward all to udp address *.*? @ip:port The @@ is for tcp, the single @ is for udp... Cheers, Raja Sent from Yahoo! Mail on Android From bcronje at gmail.com Sat May 11 03:41:38 2013 From: bcronje at gmail.com (Beyers Cronje) Date: Sat, 11 May 2013 09:41:38 +0200 Subject: [Click] FileReader and Pattern Matching with Click In-Reply-To: References: Message-ID: Hi Neel, 1. I would think you should do UDP encap first and then Ether encap: FromSyslogFile -> UDPIPEncap -> EtherEncap. Personally I would use Socket http://read.cs.ucla.edu/click/elements/socket to transmit the packets, then you dont need to worry about Ether/UDP encapsulation. 2. That sounds about right. Pattern matching can obviously be a performance bottle neck, so you might need to consider using multiple threads to do concurrent matching, e.g. Syslogdata -> q::ThreadSafeQueue; q -> sc1::StringClassifier q -> sc2:: StringClassifier q -> sc3:: StringClassifier etc You would then implement StringClassifier as a Pull element with a task or use Unqueue element and use StaticThreadSched to schedule each instance of it on its own thread. Beyers On Sat, May 11, 2013 at 6:23 AM, Neel Sheyal wrote: > Hi All, > > I want to use click to create a distributed pattern matching and > messaging system. > > The starting point is a series of Syslog messages. Since Click does not > have an inbuilt Syslog (AFAIK) element, I am dumping all the Syslog > messages to a file index first. Then, I am asking Click to read each line > of the Syslog content, convert it to a packet that passes through my > PatternMatcher element . Here is what I am trying to do and failing: > > > 1. FromSyslogFile() -> EtherEncap(..) -> UDPIPEncap(..) -> > ToDump() > EherEncap is correctly putting the Ethernet header but UDPIPEncap() is not > doing anything.. How do I put Ethernet/IP/UDP header to my data that I am > reading from my file using the element (created by me) FromSyslogFile()? > > 2. Suppose Step 1 succeeds i.e. I have the packet with the Syslog data in > the payload, I am now want it to pass through my element, > StringClassifer(, ,..). I am using the C++ lib re2( > https://code.google.com/p/re2/) inside my StringClassifier class for > pattern matching. Is this the correct/recommended approach to pattern > matching at Layer7? > > Thanks, > NeelSheyal > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > From latencybuster at gmail.com Sat May 11 11:27:03 2013 From: latencybuster at gmail.com (Neel Sheyal) Date: Sat, 11 May 2013 11:27:03 -0400 Subject: [Click] FileReader and Pattern Matching with Click In-Reply-To: References: Message-ID: Hi Beyers - 1. Do you guys have any recommendation for a regex matching library in C++ (used with click)? I am using RE2( https://code.google.com/p/re2) but if you guys (or anyone for that matter) has used one with good performance, I would appreciate sharing the information. 2. Also, I am converting the payload to a String using t he _c.str() function. Since I need to do pattern matching, I figured I would need the String object. Is there other (and better) ways of doing pattern matching on the payload data? Thanks, Neel On Sat, May 11, 2013 at 3:41 AM, Beyers Cronje wrote: > Hi Neel, > > 1. I would think you should do UDP encap first and then Ether encap: > FromSyslogFile -> UDPIPEncap -> EtherEncap. Personally I would use Socket > http://read.cs.ucla.edu/click/elements/socket to transmit the packets, > then > you dont need to worry about Ether/UDP encapsulation. > > 2. That sounds about right. Pattern matching can obviously be a performance > bottle neck, so you might need to consider using multiple threads to do > concurrent matching, e.g. > > Syslogdata -> q::ThreadSafeQueue; > q -> sc1::StringClassifier > q -> sc2:: StringClassifier > q -> sc3:: StringClassifier > etc > > You would then implement StringClassifier as a Pull element with a task or > use Unqueue element and use StaticThreadSched to schedule each instance of > it on its own thread. > > Beyers > > > On Sat, May 11, 2013 at 6:23 AM, Neel Sheyal >wrote: > > > Hi All, > > > > I want to use click to create a distributed pattern matching and > > messaging system. > > > > The starting point is a series of Syslog messages. Since Click does not > > have an inbuilt Syslog (AFAIK) element, I am dumping all the Syslog > > messages to a file index first. Then, I am asking Click to read each line > > of the Syslog content, convert it to a packet that passes through my > > PatternMatcher element . Here is what I am trying to do and failing: > > > > > > 1. FromSyslogFile() -> EtherEncap(..) -> UDPIPEncap(..) -> > > ToDump() > > EherEncap is correctly putting the Ethernet header but UDPIPEncap() is > not > > doing anything.. How do I put Ethernet/IP/UDP header to my data that I am > > reading from my file using the element (created by me) FromSyslogFile()? > > > > 2. Suppose Step 1 succeeds i.e. I have the packet with the Syslog data in > > the payload, I am now want it to pass through my element, > > StringClassifer(, ,..). I am using the C++ lib re2( > > https://code.google.com/p/re2/) inside my StringClassifier class for > > pattern matching. Is this the correct/recommended approach to pattern > > matching at Layer7? > > > > Thanks, > > NeelSheyal > > _______________________________________________ > > 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 george.ioannidis at epfl.ch Sun May 12 22:28:50 2013 From: george.ioannidis at epfl.ch (George Ioannidis) Date: Mon, 13 May 2013 04:28:50 +0200 Subject: [Click] Kernel NULL pointer dereference when forwarding packets Message-ID: <51904FE2.5030702@epfl.ch> Hello, I am trying to run a simple Click kernel module which captures all packets from interface *gbe0* and forwards them to the interface *gbe1*; these are 10 Gigabit Intel Network cards. My issue is that I get a NULL pointer dereference when I forward packets, even with a very simple configuration. Setup of *host A*: *Click version*: 2.1 (latest from github), kernel module *Configuration*: FromDevice(gbe0, PROMISC true) -> Queue(10000) -> ToDevice(gbe1); *kernel*: 3.2.0-39-generic x86_64 GNU/Linux. *Distro*: Ubuntu 12.04.2 LTS *Ethernet card*: [detailed in the *attachment*] 84:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) Subsystem: Intel Corporation Ethernet Server Adapter X520-2 Kernel driver in use: ixgbe Kernel modules: ixgbe *Test*: another machine, host B, is connected directly to host A. Userspace click also runs on *host B* with the following configuration: RandomSource( LENGTH 1514 ) -> ToDevice(gbe0); So, the simple packet flow should be the following: Host_B [gbe0] -> Host_A [gbe0] -> Host_A [gbe1] *Kernel panic* produced at host A, 10-20 seconds after the experiment starts: [full log in the *attachment*] [ 1907.823186] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 [ 1907.870136] IP: [] ixgbe_xmit_frame_ring+0x54/0x390 [ixgbe] For 10-20 seconds, the experiment runs and packets are indeed forwarded from gbe0 -> gbe1. Do you have any ideas about what the problem could be? Best Regards, George -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: click-panic.txt Url: http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20130513/bd17bf17/attachment-0002.txt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ethernet-lspci-vvv.txt Url: http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20130513/bd17bf17/attachment-0003.txt From latencybuster at gmail.com Thu May 16 20:11:39 2013 From: latencybuster at gmail.com (Neel Sheyal) Date: Thu, 16 May 2013 20:11:39 -0400 Subject: [Click] Click and userland live reconfiguration Message-ID: Hi - I have used the live reconfiguration functionality of Click with the click-install tool. However, it requires that Click be running as a driver inside the Linux module. Is it possible to achieve the same hop swap functionality with Click running in the user land? Thanks, Neel From llong_li at 163.com Wed May 29 00:32:13 2013 From: llong_li at 163.com (albert) Date: Wed, 29 May 2013 12:32:13 +0800 Subject: [Click] error in connecting a agnositc output port to a push input port Message-ID: <51A584CD.5070102@163.com> Hi all, when i use click elements to construt a simple router, i encounter a weird problem. I implemented a simple element named elename, which has a agnostic input and at least one push output: /const char *processing() const { return "a/h"; }/ In my configuration file, i connect the output of elename to the Strip element as following: ...-> q1::Queue -> elename -> strip :: Strip(14) -> check :: CheckIPHeader -> lookup::StaticIPLookup(..) -> ... when i install this configuration with click-install, the following problem occurs: 'strip :: Strip' pull output 0 connected to 'check :: CheckIPHeader' push input 0 Anyway, when i install a similar configuration without elename element, i can install it successfully. Any advice? Thanks! From ekohler at gmail.com Wed May 29 10:23:10 2013 From: ekohler at gmail.com (Eddie Kohler) Date: Wed, 29 May 2013 10:23:10 -0400 Subject: [Click] error in connecting a agnositc output port to a push input port In-Reply-To: <51A584CD.5070102@163.com> References: <51A584CD.5070102@163.com> Message-ID: Hi Albert, It seems likely that your "elename"'s processing() call is not actually registering. Configurations like this should definitely work. How to debug? Well, one guess is that you changed the element's processing, but did not actually re-install the Click module, so your click-install was running old code. Try `click-install -u`. Other possibilities: From within elename's configure() method, print out "this->Element::processing()" using click_chatter(). Is it "a/h" as you expect? Eddie On Wed, May 29, 2013 at 12:32 AM, albert wrote: > Hi all, > when i use click elements to construt a simple router, i encounter > a weird problem. > > I implemented a simple element named elename, which has a agnostic input > and at least one push output: > /const char *processing() const { return "a/h"; }/ > > In my configuration file, i connect the output of elename to the Strip > element as following: > ...-> q1::Queue -> elename -> strip :: Strip(14) -> check :: > CheckIPHeader -> lookup::StaticIPLookup(..) -> ... > > when i install this configuration with click-install, the following > problem occurs: > 'strip :: Strip' pull output 0 connected to 'check :: CheckIPHeader' > push input 0 > > > Anyway, when i install a similar configuration without elename element, > i can install it successfully. > Any advice? > > Thanks! > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click From momina.azam at gmail.com Thu May 30 03:21:34 2013 From: momina.azam at gmail.com (Momina Khan) Date: Thu, 30 May 2013 12:21:34 +0500 Subject: [Click] trouble live reconfiguration of IPClassifier Message-ID: Dear All Can someone plz help me do live reconfigure on IPClassifier. What i want to do is to change the configuration string i give to the IPClassifier while the router is live. I know that it relies on IPFilter element for all its functionality. So i call reconfigure_keyword_handler() in IPFilter when a timer fires but my computer halts with a Null Pointer exception ... some message about memo and click_lfree() ... can't paste the core dump as the computer halts. I have used the same handler to reconfigure other elements live but for the life of me i cannot decipher as to what is different about the IPFilter. Plz someone point me in the right direction! i did notice that for other config parameters the conf[argno] references a value that matches a keyword for instance a SimpleQueue has a CAPACITY keyword and its conf[argno] references to the numeric value of queue capacity. While in IPFilter conf[argno] references the entire string like "tcp && ttl > 0". are there any other fundamental differeneces i am missing! thank you! momina From ekohler at gmail.com Fri May 31 09:12:05 2013 From: ekohler at gmail.com (Eddie Kohler) Date: Fri, 31 May 2013 09:12:05 -0400 Subject: [Click] trouble live reconfiguration of IPClassifier In-Reply-To: References: Message-ID: Hi Momina, My best guess is that you are calling reconfigure_keyword_handler() incorrectly. reconfigure_keyword_handler() actually expects a STRING argument, but the arguments to IPClassifier are POSITIONAL (i.e. integers). For that you want reconfigure_positional_handler. Since what you want seems like a useful feature (Meraki has something like it), I've checked it in. IPClassifier now supports per-argument reconfiguration handlers. If you look at this commit, you could probably match to your code and fix your version. https://github.com/kohler/click/commit/6ea8bf580d9276a477196d2517664b7925d3a763 Eddie On Thu, May 30, 2013 at 3:21 AM, Momina Khan wrote: > Dear All > > Can someone plz help me do live reconfigure on IPClassifier. What i want to > do is to change the configuration string i give to the IPClassifier while > the router is live. I know that it relies on IPFilter element for all its > functionality. So i call reconfigure_keyword_handler() in IPFilter when a > timer fires but my computer halts with a Null Pointer exception ... some > message about memo and click_lfree() ... can't paste the core dump as the > computer halts. > > I have used the same handler to reconfigure other elements live but for the > life of me i cannot decipher as to what is different about the IPFilter. > Plz someone point me in the right direction! > > i did notice that for other config parameters the conf[argno] references a > value that matches a keyword for instance a SimpleQueue has a CAPACITY > keyword and its conf[argno] references to the numeric value of queue > capacity. While in IPFilter conf[argno] references the entire string like > "tcp && ttl > 0". > > are there any other fundamental differeneces i am missing! > > > > thank you! > momina > _______________________________________________ > click mailing list > click at amsterdam.lcs.mit.edu > https://amsterdam.lcs.mit.edu/mailman/listinfo/click