fc_pool 70 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_init(struct mlx5_fc_pool *fc_pool, struct mlx5_core_dev *dev); fc_pool 71 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_cleanup(struct mlx5_fc_pool *fc_pool); fc_pool 72 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static struct mlx5_fc *mlx5_fc_pool_acquire_counter(struct mlx5_fc_pool *fc_pool); fc_pool 73 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_release_counter(struct mlx5_fc_pool *fc_pool, struct mlx5_fc *fc); fc_pool 223 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_release_counter(&fc_stats->fc_pool, counter); fc_pool 291 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c counter = mlx5_fc_pool_acquire_counter(&fc_stats->fc_pool); fc_pool 390 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_init(&fc_stats->fc_pool, dev); fc_pool 416 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_cleanup(&fc_stats->fc_pool); fc_pool 570 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_init(struct mlx5_fc_pool *fc_pool, struct mlx5_core_dev *dev) fc_pool 572 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->dev = dev; fc_pool 573 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mutex_init(&fc_pool->pool_lock); fc_pool 574 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c INIT_LIST_HEAD(&fc_pool->fully_used); fc_pool 575 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c INIT_LIST_HEAD(&fc_pool->partially_used); fc_pool 576 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c INIT_LIST_HEAD(&fc_pool->unused); fc_pool 577 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->available_fcs = 0; fc_pool 578 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->used_fcs = 0; fc_pool 579 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->threshold = 0; fc_pool 582 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_cleanup(struct mlx5_fc_pool *fc_pool) fc_pool 584 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c struct mlx5_core_dev *dev = fc_pool->dev; fc_pool 588 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_for_each_entry_safe(bulk, tmp, &fc_pool->fully_used, pool_list) fc_pool 590 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_for_each_entry_safe(bulk, tmp, &fc_pool->partially_used, pool_list) fc_pool 592 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_for_each_entry_safe(bulk, tmp, &fc_pool->unused, pool_list) fc_pool 596 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c static void mlx5_fc_pool_update_threshold(struct mlx5_fc_pool *fc_pool) fc_pool 598 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->threshold = min_t(int, MLX5_FC_POOL_MAX_THRESHOLD, fc_pool 599 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->used_fcs / MLX5_FC_POOL_USED_BUFF_RATIO); fc_pool 603 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_alloc_new_bulk(struct mlx5_fc_pool *fc_pool) fc_pool 605 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c struct mlx5_core_dev *dev = fc_pool->dev; fc_pool 610 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->available_fcs += new_bulk->bulk_len; fc_pool 611 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_update_threshold(fc_pool); fc_pool 616 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_free_bulk(struct mlx5_fc_pool *fc_pool, struct mlx5_fc_bulk *bulk) fc_pool 618 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c struct mlx5_core_dev *dev = fc_pool->dev; fc_pool 620 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->available_fcs -= bulk->bulk_len; fc_pool 622 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_update_threshold(fc_pool); fc_pool 644 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_acquire_counter(struct mlx5_fc_pool *fc_pool) fc_pool 649 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mutex_lock(&fc_pool->pool_lock); fc_pool 651 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc = mlx5_fc_pool_acquire_from_list(&fc_pool->partially_used, fc_pool 652 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c &fc_pool->fully_used, false); fc_pool 654 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc = mlx5_fc_pool_acquire_from_list(&fc_pool->unused, fc_pool 655 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c &fc_pool->partially_used, fc_pool 658 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c new_bulk = mlx5_fc_pool_alloc_new_bulk(fc_pool); fc_pool 664 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_add(&new_bulk->pool_list, &fc_pool->partially_used); fc_pool 666 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->available_fcs--; fc_pool 667 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->used_fcs++; fc_pool 670 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mutex_unlock(&fc_pool->pool_lock); fc_pool 675 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_release_counter(struct mlx5_fc_pool *fc_pool, struct mlx5_fc *fc) fc_pool 677 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c struct mlx5_core_dev *dev = fc_pool->dev; fc_pool 681 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mutex_lock(&fc_pool->pool_lock); fc_pool 688 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->available_fcs++; fc_pool 689 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c fc_pool->used_fcs--; fc_pool 693 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_move_tail(&bulk->pool_list, &fc_pool->partially_used); fc_pool 696 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c if (fc_pool->available_fcs > fc_pool->threshold) fc_pool 697 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mlx5_fc_pool_free_bulk(fc_pool, bulk); fc_pool 699 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c list_add(&bulk->pool_list, &fc_pool->unused); fc_pool 703 drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c mutex_unlock(&fc_pool->pool_lock); fc_pool 496 include/linux/mlx5/driver.h struct mlx5_fc_pool fc_pool;