Re: [PATCH 09/22] misc: xlink-pcie: lh: Add core communication logic

From: Greg Kroah-Hartman
Date: Tue Dec 01 2020 - 05:15:21 EST


On Mon, Nov 30, 2020 at 03:06:54PM -0800, mgross@xxxxxxxxxxxxxxx wrote:
> +static int rx_pool_size = SZ_32M;
> +module_param(rx_pool_size, int, 0664);
> +MODULE_PARM_DESC(rx_pool_size, "receiving pool size (default 32 MiB)");
> +
> +static int tx_pool_size = SZ_32M;
> +module_param(tx_pool_size, int, 0664);
> +MODULE_PARM_DESC(tx_pool_size, "transmitting pool size (default 32 MiB)");
> +
> +static int fragment_size = XPCIE_FRAGMENT_SIZE;
> +module_param(fragment_size, int, 0664);
> +MODULE_PARM_DESC(fragment_size, "transfer descriptor size (default 128 KiB)");
> +
> +static bool tx_pool_coherent = true;
> +module_param(tx_pool_coherent, bool, 0664);
> +MODULE_PARM_DESC(tx_pool_coherent,
> + "transmitting pool using coherent memory (default true)");
> +
> +static bool rx_pool_coherent;
> +module_param(rx_pool_coherent, bool, 0664);
> +MODULE_PARM_DESC(rx_pool_coherent,
> + "receiving pool using coherent memory (default false)");

This is not the 1990's anymore, please never use module parameters for
new drivers as they do not work well (i.e. they do not work at all on a
individual device basis.)

Make this all "just work" so that userspace does not have to "tune"
anything. But if you really must allow configuration like this, then
use configfs, as that's what it is there for.

thanks,

greg k-h