[Click] problem compiling linux kernel driver, plus a code submission

todd lewis tgl2 at yahoo.com
Sun Jun 18 04:35:02 EDT 2006


I come bearing code!  (Patch at the end of this message.)

I have a problem compiling the click.o kernel module for linux:

********************************************************************************************************
../elements/linuxmodule/todevice.cc: In function `static void ToDevice::static_cleanup()':
../elements/linuxmodule/todevice.cc:75: implicit declaration of function `int
unregister_net_tx(...)'
../elements/linuxmodule/todevice.cc: In method `int ToDevice::initialize(ErrorHandler *)':
../elements/linuxmodule/todevice.cc:157: implicit declaration of function `int
register_net_tx(...)'
********************************************************************************************************

The kernel, the modified e1000 driver, the click kernel patch, nothing has these functions.  Heck,
the only google mention is one cvsweb version of the file in question, todevice.cc.  Here is the
annotated code:

********************************************************************************************************
1.137        (eddietwo 03-Jul-04): void
1.137        (eddietwo 03-Jul-04): ToDevice::static_cleanup()
1.109        (eddietwo 21-Jun-01): {
1.137        (eddietwo 03-Jul-04):     unregister_netdevice_notifier(&device_notifier);
1.141        (jbicket  03-Jun-05): #ifdef HAVE_CLICK_KERNEL_TX_NOTIFY
1.141        (jbicket  03-Jun-05):     if (registered_tx_notifiers) {
1.141        (jbicket  03-Jun-05):  unregister_net_tx(&tx_notifier);
1.141        (jbicket  03-Jun-05):     }
1.141        (jbicket  03-Jun-05): #endif
1.141        (jbicket  03-Jun-05): }
********************************************************************************************************

This adds yet another mystery: it's been in there for a year?  Obviously, I am missing something.

After the reported click/driver problems with 2.6, I switched to linux 2.4.32.  It has the click
patch and the click e1000-5 driver.  I'm using g++-2.95.  I configured click thusly:

./configure --enable-all-elements --enable-analysis --enable-grid --enable-ip6
--prefix=/usr/local/click/ --enable-polling --enable-intel-cpu --enable-warp9
--with-linux-map=/usr/src/2.4.clean/linux-2.4.32/System.map

Having repeatedly struggled with these messages:

********************************************************************************************************
config:52: While initializing 'todevice0 :: ToDevice':
  warning: not compiled for a Click kernel
config:51: While initializing 'PollDevice at 6 :: PollDevice':
  warning: can't get packets: not compiled with polling extensions
********************************************************************************************************

I made these changes to include/click/config-linuxmodule.h

********************************************************************************************************
 /* Define if your Linux kernel has Click extensions. */
-/* #undef HAVE_CLICK_KERNEL */
+#define HAVE_CLICK_KERNEL 1

 /* Define if your Linux kernel has Click transmit notification extensions. */
-/* #undef HAVE_CLICK_KERNEL_TX_NOTIFY */
+#define HAVE_CLICK_KERNEL_TX_NOTIFY 1

 /* Define if fast checksum functions available. */
 #define HAVE_FAST_CHECKSUM 1
@@ -34,7 +34,7 @@
 /* #undef HAVE_KERNEL_ASSERT */

 /* Define if your Linux kernel has polling extensions. */
-/* #undef HAVE_LINUX_POLLING */
+#define HAVE_LINUX_POLLING 1
********************************************************************************************************

It probably is something obvious and silly, but I'm a newbie, so please don't be too hard on me.

And now the code.  I've modified make-ip-conf.pl to pull the interface information and static
routes from the operating system, rather than having to be set manually in the script.  Attached
is the diff, submitted for inclusion by someone with cvs access.  If anyone has any change
requests, then please send them my way.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-ip-conf.pl.patch
Type: text/x-patch
Size: 3383 bytes
Desc: 1981485840-make-ip-conf.pl.patch
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20060618/56c70d3e/make-ip-conf.pl-0001.bin


More information about the click mailing list