Skip to content

Commit f11fbaf

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum: Increase number of linear entries
The memory region where adjacency entries (nexthops) are stored is called the KVD linear and is configured during initialization with a size of 64K. Extend this area with 32K more entries, that will be partitioned into 64 groups of 0.5K entries, thereby allowing us to support weighted nexthops with high accuracy. Change the ratio between both types of hash entries, so as to prevent reduction in the number of double hash entries, which are used for IPv6 neighbours and routes with a prefix length greater than 64. Note that the user will be able to control all these sizes once the devlink resource manager is introduced. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent eb78998 commit f11fbaf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,8 +3885,8 @@ static const struct mlxsw_config_profile mlxsw_sp_config_profile = {
38853885
.max_pkey = 0,
38863886
.used_kvd_split_data = 1,
38873887
.kvd_hash_granularity = MLXSW_SP_KVD_GRANULARITY,
3888-
.kvd_hash_single_parts = 2,
3889-
.kvd_hash_double_parts = 1,
3888+
.kvd_hash_single_parts = 59,
3889+
.kvd_hash_double_parts = 41,
38903890
.kvd_linear_size = MLXSW_SP_KVD_LINEAR_SIZE,
38913891
.swid_config = {
38923892
{

drivers/net/ethernet/mellanox/mlxsw/spectrum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
#define MLXSW_SP_PORT_BASE_SPEED 25000 /* Mb/s */
6464

65-
#define MLXSW_SP_KVD_LINEAR_SIZE 65536 /* entries */
65+
#define MLXSW_SP_KVD_LINEAR_SIZE 98304 /* entries */
6666
#define MLXSW_SP_KVD_GRANULARITY 128
6767

6868
struct mlxsw_sp_port;

0 commit comments

Comments
 (0)