Skip to content

Commit 38438f7

Browse files
shamoyadavem330
authored andcommitted
net/mlx4: Set enhanced QoS support by default when ETS supported
If HCA supports ETS QoS feature, set enhanced QoS bit in init_hca as default. Signed-off-by: Ido Shamay <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3742cc6 commit 38438f7

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+3
-3
lines changed

drivers/net/ethernet/mellanox/mlx4/fw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ enum {
4949
extern void __buggy_use_of_MLX4_GET(void);
5050
extern void __buggy_use_of_MLX4_PUT(void);
5151

52-
static bool enable_qos;
52+
static bool enable_qos = true;
5353
module_param(enable_qos, bool, 0444);
54-
MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA (default: off)");
54+
MODULE_PARM_DESC(enable_qos, "Enable Enhanced QoS support (default: on)");
5555

5656
#define MLX4_GET(dest, source, offset) \
5757
do { \
@@ -1709,7 +1709,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
17091709
*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 3);
17101710

17111711
/* Enable QoS support if module parameter set */
1712-
if (enable_qos)
1712+
if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ETS_CFG && enable_qos)
17131713
*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 2);
17141714

17151715
/* enable counters */

0 commit comments

Comments
 (0)