Date: Mon, 13 May 2013 11:04:23 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Warner Losh <imp@bsdimp.com> Cc: Oded Shanoon <odeds@mellanox.com>, "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org> Subject: Re: Passing Parameters to Device Drivers and ethtool like functionality Message-ID: <20130513180423.GO1491@funkthat.com> In-Reply-To: <A5CCFA48-7E20-46A8-8FE5-E164D45C58B8@bsdimp.com> References: <058596FC127BDB469D7D60F04E37C63F73456337@MTLDAG01.mtl.com> <37E63364-EBD9-4813-A111-8B983EB9748F@cyclaero.com> <A5CCFA48-7E20-46A8-8FE5-E164D45C58B8@bsdimp.com>
index | next in thread | previous in thread | raw e-mail
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@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."
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130513180423.GO1491>
