• Yevgeny Petrilin's avatar
    net/mlx5: Rate limit tables support · 1466cc5b
    Yevgeny Petrilin authored
    Configuring and managing HW rate limit tables.
    The HW holds a table of rate limits, each rate is
    associated with an index in that table.
    Later a Send Queue uses this index to set the rate limit.
    Multiple Send Queues can have the same rate limit, which is
    represented by a single entry in this table.
    Even though a rate can be shared, each queue is being rate
    limited independently of others.
    
    The SW shadow of this table holds the rate itself,
    the index in the HW table and the refcount (number of queues)
    working with this rate.
    
    The exported functions are mlx5_rl_add_rate and mlx5_rl_remove_rate.
    Number of different rates and their values are derived
    from HW capabilities.
    Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1466cc5b
fw.c 4.84 KB