Skip to content
  • Alex Vesker's avatar
    net/mlx5: DR, ICM pool memory allocator · 29cf8feb
    Alex Vesker authored
    
    
    ICM device memory is used for writing steering rules (STEs) to the NIC.
    An ICM memory pool allocator was implemented to manage the required
    memory. The pool consists of buckets, a bucket per chunk size.
    Once a bucket is empty we will cut a row of memory from the latest
    allocated MR, if the MR size is not sufficient we will allocate a new MR.
    HW design requires that chunks memory address should be aligned to the
    chunk size, this is the reason for managing the MR with row size that
    insures memory alignment.
    Current design is greedy in memory but provides quick allocation times
    in steady state.
    
    Signed-off-by: default avatarAlex Vesker <valex@mellanox.com>
    Reviewed-by: default avatarErez Shitrit <erezsh@mellanox.com>
    Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    29cf8feb