[ofa-general] [PATCH] mlx4_core: add module parameter to enable/disable QoS support. (for 2.6.27)
Hal Rosenstock
hal.rosenstock at gmail.com
Mon Jul 21 09:46:55 PDT 2008
On Tue, Jul 15, 2008 at 10:45 AM, Jack Morgenstein
<jackm at dev.mellanox.co.il> wrote:
> From 01d8c13b6dd314b239a5b0b76e57320aeaa5c338 Mon Sep 17 00:00:00 2001
> From: Jack Morgenstein <jackm at dev.mellanox.co.il>
> Date: Tue, 15 Jul 2008 17:19:41 +0300
> Subject: [PATCH] mlx4_core: add module parameter to enable/disable QoS support.
>
> Add a module parameter "enable_qos" to mlx4_core. If this param
> is > 0, support for QoS is enabled in the HCA (INIT_HCA command).
> By default, the parameter is set to 0 (disabled).
Out of curiousity, why is a module parameter needed to enable/disable
QoS ? Is there a downside to enabling it in terms of the HCA ?
-- Hal
>
> Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>
> ---
> drivers/net/mlx4/fw.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
> index 2b5006b..2b60525 100644
> --- a/drivers/net/mlx4/fw.c
> +++ b/drivers/net/mlx4/fw.c
> @@ -46,6 +46,10 @@ enum {
> extern void __buggy_use_of_MLX4_GET(void);
> extern void __buggy_use_of_MLX4_PUT(void);
>
> +static int mlx4_core_enable_qos;
> +module_param_named(enable_qos, mlx4_core_enable_qos, int, 0444);
> +MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA if > 0, (default 0)");
> +
> #define MLX4_GET(dest, source, offset) \
> do { \
> void *__p = (char *) (source) + (offset); \
> @@ -737,6 +741,10 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
> if (dev->caps.flags & MLX4_DEV_CAP_FLAG_IPOIB_CSUM)
> *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 3);
>
> + /* Enable QoS support if module parameter set */
> + if (mlx4_core_enable_qos)
> + *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 2);
> +
> /* QPC/EEC/CQC/EQC/RDMARC attributes */
>
> MLX4_PUT(inbox, param->qpc_base, INIT_HCA_QPC_BASE_OFFSET);
> --
> 1.5.1.6
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
More information about the general
mailing list