Click Dynamic loading

Eddie Kohler eddietwo at cag.lcs.mit.edu
Fri Apr 21 09:36:44 EDT 2000


Hi Prem,

> 	Thanks for your prompt reply on dynamic loading of modules in
> Click. We just tried it out and it works fine the first time; but when
> click is already loaded as kernel module and is running as router, it says
> the device is busy and the configuration cannot be loaded. We thought that
> it should be possible for click-install to rmmod click and remove it..but
> that doesnt happen. Why ?

I don't know. That should work, and it generally does work for us. Can you
please send a configuration (including .cc file) and tell me exactly what
steps you followed that didn't work? If you have trouble unloading a Click
configuration, try "click-uninstall"; that should get rid of everything.
However, if there is a bug in your .cc file, such that it gets the
reference counts wrong and ends up with a dangling reference count, that
may prevent tthe unload, and cause the behavior you saw. So send us the
configuration, but check your reference counts too.

> Also, we are trying to build a dynamic loader that automatically downloads
> modules from remote servers if they do not exist on the same server. So we
> are interested in knowing if the click configuration is ripped apart each
> time we do click-install with a different archive made with the same
> configuration file but with a different (downloaded) module. Or does it
> just install the package/module and leaves the config in
> /proc/click/config intact ? 

It always does a new install to /proc/click/config.

> In case, it does change the configuration file on the fly, what happens to
> packets "trapped" in elements/queues as per the old configuration.

They are thrown away. We do plan to change this behavior eventually. It
sounds like you would want us to change it soon.

> Do let us know if our line of thinking is on the right track. Thanks a
> million for all your help.

I think your line of thinking is correct. But there's one thing that
confuses me. Is the dynamic loader designed to download Click code from
other places? Or just arbitrary modules that have nothing to do with Click?

Sounds like a cool project!

love,
ed



More information about the click mailing list