Skip to content

Commit 91363f0

Browse files
Dotan BarakSomasundaram Krishnasamy
authored andcommitted
mlx4_core: allow to use 0 in log_mtts_per_seg
This allows us to obtain MTTs starting at any index thus give better cache utilization. Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Dotan Barak <[email protected]> Reviewed-by: Jack Morgenstein <[email protected]> Signed-off-by: Vladimir Sokolovsky <[email protected]> (Ported from Mellanox OFED 2.4) Signed-off-by: Mukesh Kacker <[email protected]> Orabug: 27510509 (cherry picked from commit 08c75b2) cherry-pick-repo=linux-uek.git Signed-off-by: Qing Huang <[email protected]> Signed-off-by: Aron Silverton <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 13a4f2d commit 91363f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ static bool use_prio;
149149
module_param_named(use_prio, use_prio, bool, 0444);
150150
MODULE_PARM_DESC(use_prio, "Enable steering by VLAN priority on ETH ports (deprecated)");
151151

152-
int log_mtts_per_seg = ilog2(MLX4_MTT_ENTRY_PER_SEG);
152+
int log_mtts_per_seg = ilog2(1);
153153
module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444);
154-
MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-7)");
154+
MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment "
155+
"(0-7) (default: 0)");
155156

156157
static int port_type_array[2] = {MLX4_PORT_TYPE_NONE, MLX4_PORT_TYPE_NONE};
157158
static int arr_argc = 2;
@@ -4316,7 +4317,7 @@ static int __init mlx4_verify_params(void)
43164317
if (use_prio != 0)
43174318
pr_warn("mlx4_core: use_prio - obsolete module param, ignored\n");
43184319

4319-
if ((log_mtts_per_seg < 1) || (log_mtts_per_seg > 7)) {
4320+
if ((log_mtts_per_seg < 0) || (log_mtts_per_seg > 7)) {
43204321
pr_warn("mlx4_core: bad log_mtts_per_seg: %d\n",
43214322
log_mtts_per_seg);
43224323
return -1;

drivers/net/ethernet/mellanox/mlx4/mlx4.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ enum {
8484
MLX4_MIN_MGM_LOG_ENTRY_SIZE = 7,
8585
MLX4_MAX_MGM_LOG_ENTRY_SIZE = 12,
8686
MLX4_MAX_QP_PER_MGM = 4 * ((1 << MLX4_MAX_MGM_LOG_ENTRY_SIZE) / 16 - 2),
87-
MLX4_MTT_ENTRY_PER_SEG = 8,
8887
};
8988

9089
enum {

0 commit comments

Comments
 (0)