[Click] Quick newbie questions

Beyers Cronje bcronje at gmail.com
Wed Oct 17 19:01:27 EDT 2007


Hi Kurtis

I'm running in user-level as my application is only a proof of concept, and
> I've been unable to get insmod to load the kernel module correctly.


You should always use 'click-install' to install the click kernel module and
not insmod/modprobe. Follow the INSTALL file and you will get the kernel
module working.

Is there a default configuration for a simple IP router? There is a perl
> script which generates an IP click config file, but it's seemingly for
> kernel mode only. I suppose I could modify it, but what i'm looking for
> now
> is a known working case to help me understand what's going on. I can't
> seem
> to find a default config for user space IP routing.


>From the 'make-ip-conf.pl' file:
"
# Make a Click IP router configuration.  This script generates a
# configuration using PollDevices. You can change it to use
# FromDevices; see the comment above the $ifs array, below.  The
# output is intended for the Linux kernel module; however, by making
# the change from PollDevices to FromDevices, and setting $local_host
# appropriately, the configuration will also work at userlevel.
"

So all you need to do to get a working userlevel config is to change the
second column of the $ifs array to 0 and set the $local_host to something
like "Print(toh) -> Discard", and whoalla you have a working userlevel IP
router config. Obviously you have to also edit the $ifs array entries to
suit your router.

Secondly, what are my losses for running in user mode? I had assumed the
> main loss would be efficiency, but some elements seem to require kernel
> mode. Is this set in stone, or simply the default behavior?


Your main loss will be performance and NOT functionality. Also SMP click is
only supported in the kernel module.

I would say MOST features are available across both userlevel Click and
kernel module Click.
There are some kernel only and userlevel only elements that provide the same
"feature" in both modes i.e. there's a kernel FromDevice element as well as
a userlevel FromDevice element.
Then obviously there are some elements that will only be available in
userlevel, typically elements that require floating point operation or file
access that is not supported in the kernel ie FromDump, and some only
available in kernel module i.e. PollDevice that require kernel level access
to devices etc.

If you have a look at http://read.cs.ucla.edu/click/elements you'll see that
the vast majority of features is provided across both modes.

Hope this helps.

Beyers Cronje


More information about the click mailing list