[Click] linuxpatchless

Eddie Kohler kohler at cs.ucla.edu
Fri Nov 27 19:33:35 EST 2009


Mainline also now mostly compiles on 2.6.31 with --enable-fixincludes. 
FromHost and ToDevice do not compile; they need to be 
ELEMENT_REQUIRES(false)d out.

E


Eddie Kohler wrote:
> Hello all,
> 
> Harald Schiöberg wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Eddie started to pick up on his patch-making perl magic and tries to
>> write some magic to automatically mangle those into C++ compliance
>> independently from the kernel version used.
> 
> This is now done.  On current git, if you configure with --enable-fixincludes, 
> Click will automatically fix Linux's headers for C++ compatibility -- at least 
> on my 2.6.27 Ubuntu laptop, it succeeds, though I'm sure every now and then a 
> new version will require an update to the scripts.  I have successfully run 
> conf/test.click on an unpatched kernel!  Neat.
> 
> FWIW on linuxpatchless, at least FromDevice, ToDevice, ToHost, and FromHost 
> will need closer attention.  (Not just From and ToDevice.)
> 
> Thanks to you and to our most excellent Syclick hosts!
> 
> Eddie
> 
> 
> 
>> For documentation:
>> Everthing should be simple almost regular expressions, like the notorious
>> - - asm ( foo :: bar )
>> + asm ( foo : : bar )
>> One notable exception:
>> the current click patch changes
>> - - struct foo {}
>> + EMPTY_STRUCT_DECL(foo)
>> The EMPTY_STRUCT_DECL is one byte long, because empty structs are one
>> byte in C++ but zero bytes in C. so this actually changes linux's
>> internal structures. The prosed solution it to redefine that into a
>> char[0] with is also zero bytes in C++, so we can still interface with
>> the now unpatched structures of the kernel.
>>
>> On the functional patches:
>> We will try to exchange anything in the linuxpatchless directory that
>> accesses one of click's hooks into something that uses a similar linux
>> hook instead. Probably only the FromDevice and ToDevice Elements will
>> have to be updated.
>> The theory converged on registering click with dev_add_pack() and then
>> overwriting skb->protocol in the received sk_buffs to prevent other's
>> from handling the packet as well...
>> Whoever feels more practical: post your patches ;-)
>>
>> That's all I remember on that part, a BIG THANK YOU again to the
>> organizers of syclick who made all that possible in the first place.
>>
>> - --
>> Harald Schiöberg
>> Technische Universität Berlin | T-Laboratories | FG INET
>> www: http://www.net.t-labs.tu-berlin.de
>> Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFLDY1ay8wrZ9OvkU0RAniwAJ9slIU/lUypJovGmTYIfMKW5G5hXwCfWCi0
>> ay61mfOJbRUcXRlXEeg9Xdc=
>> =Udn3
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> 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



More information about the click mailing list