Skip to content

Commit

Permalink
mlx4_core: Add module parameter to enable QoS support
Browse files Browse the repository at this point in the history
Add a module parameter "enable_qos" to mlx4_core.  If this param is
set, enable support for QoS in the INIT_HCA command.  By default, the
parameter is set to 0 (disabled).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Jul 22, 2008
1 parent d35cb36 commit 51f5f0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/mlx4/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ enum {
extern void __buggy_use_of_MLX4_GET(void);
extern void __buggy_use_of_MLX4_PUT(void);

static int enable_qos;
module_param(enable_qos, bool, 0444);
MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA (default: off)");

#define MLX4_GET(dest, source, offset) \
do { \
void *__p = (char *) (source) + (offset); \
Expand Down Expand Up @@ -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 (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);
Expand Down

0 comments on commit 51f5f0e

Please sign in to comment.