Passing Parameters to Device Drivers and ethtool like functionality
John-Mark Gurney
jmg at funkthat.com
Mon May 13 18:04:33 UTC 2013
Warner Losh wrote this message on Mon, May 13, 2013 at 07:58 -0600:
> On May 13, 2013, at 6:15 AM, Dr. Rolf Jansen wrote:
>
> > Am 13.05.2013 um 08:22 schrieb Oded Shanoon <odeds at mellanox.com>:
> >
> >> ... that the only way to pass parameters to modules is by using sysctl. Is this correct?
> >
> > In the sense of something that you can set at the command line, I cannot think of anything either.
> >
> >> Is there no other way to pass parameters when I load my driver (dynamically)?
> >
> > You could write a wrapper to kldload, that calls appropriate ioctl() commands directly after your module has been loaded. In this scenario, you could read the settings to be passed via ioctl() from the wrapper's command line arguments.
>
> We have a shell script that sets things in kenv before doing the kldload for our driver.
The kenv is accessable through the TUNABLE_ macros... Sadly it looks
like we are lacking man pages for these calls... But they are defined
in sys/kernel.h...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-drivers
mailing list