/* Firmware currently has 4 pool of 4 sizes that it supports (FT_POOLS), * and a virtual memory region of 16M (MLX5_FT_SIZE), this region is duplicated * for each flow table pool. We can allocate up to 16M of each pool, * and we keep track of how much we used via mlx5_ft_pool_get_avail_sz. * Firmware doesn't report any of this for now. * ESW_POOL is expected to be sorted from large to small and match firmware * pools.
*/ #define FT_SIZE (16 * 1024 * 1024) staticconstunsignedint FT_POOLS[] = { 4 * 1024 * 1024,
1 * 1024 * 1024,
64 * 1024,
128,
1 /* size for termination tables */ }; struct mlx5_ft_pool { int ft_left[ARRAY_SIZE(FT_POOLS)];
};
int mlx5_ft_pool_init(struct mlx5_core_dev *dev)
{ struct mlx5_ft_pool *ft_pool; int i;
ft_pool = kzalloc(sizeof(*ft_pool), GFP_KERNEL); if (!ft_pool) return -ENOMEM;
for (i = ARRAY_SIZE(FT_POOLS) - 1; i >= 0; i--)
ft_pool->ft_left[i] = FT_SIZE / FT_POOLS[i];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.