-----Leon Romanovsky <leon@xxxxxxxxxx> wrote: ----- >To: Bernard Metzler <BMT@xxxxxxxxxxxxxx> >From: Leon Romanovsky <leon@xxxxxxxxxx> >Date: 10/14/2017 08:41AM >Cc: linux-rdma@xxxxxxxxxxxxxxx >Subject: Re: [PATCH v2 03/13] Attach/detach SoftiWarp to/from network >and RDMA subsystem > >On Sat, Oct 14, 2017 at 01:28:43AM +0000, Bernard Metzler wrote: >> -----Leon Romanovsky <leon@xxxxxxxxxx> wrote: ----- >> >> >> + >> >> +#define SIW_MAX_IF 12 >> >> +static int if_cnt; >> >> +static char *iface_list[SIW_MAX_IF] = {[0 ... (SIW_MAX_IF-1)] = >> >'\0'}; >> >> +module_param_array(iface_list, charp, &if_cnt, 0444); >> >> +MODULE_PARM_DESC(iface_list, "Interface list siw attaches to if >> >present"); >> >> + >> >> +static bool loopback_enabled = 1; >> >> +module_param(loopback_enabled, bool, 0644); >> >> +MODULE_PARM_DESC(loopback_enabled, "enable_loopback"); >> >> + >> >> +LIST_HEAD(siw_devlist); >> >> + >> >> +static int cpu_cnt; >> >> +static char *tx_cpu_list[MAX_CPU] = {[0 ... (MAX_CPU-1)] = >'\0'}; >> >> +module_param_array(tx_cpu_list, charp, &cpu_cnt, 0444); >> >> +MODULE_PARM_DESC(tx_cpu_list, "List of CPUs siw TX thread shall >be >> >bound to"); >> > >> >No module parameters please. >> OK. Would you have a pointer which sheds some light on that >> rule? Thank you! >> > >It is not rule, but common knowledge exactly as BUG_ON which is not >prohibited, but makes no sense in low level driver code. > >The module parameters sometimes make sense, for example in subsystem >level where they can apply to whole devices underneath. > >But most of the time, they indicate complete ignorance of users in >favor >of easy developer's life. > >For people, like me, who doesn't run modules at all, the change in >module parameters require rebuild of initramfs and in more extreme >cases rebuild of SELinux labels. > I will try to finish up a new patch set for siw over Christmas holidays. One question I have - what is the recommended way of replacing those module parameters, if we need to flexibly parameterize things from user land? For the rxe driver, I see the usage of module_param_cb, but this probably is not what we want in the long run? Would a sysctl be appropriate, or a char device (we may need to pass strings like interface names), or configfs? Thanks very much! Bernard. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html